When China averted a default in its shadow banking industry last week in the midst of an emerging market meltdown, investors globally heaved a sigh of relief.
They may however be overlooking another major stress point in China's backyard: a mountain of foreign money invested in the yuan carry trade.
The foreign dollars invested in China's high-yielding yuan and credit stayed there through the past week's emerging markets selloff from Argentina to Turkey, taking comfort in the currency's stability, China's unstated support for its banking sector and the view that Beijing will not let the economy stall.
(Read more: Are China shadow banking woes exaggerated?)
That confidence could be put to the test if the emerging markets selloff continues and China shows any signs that its own outlook is darkening. Such a test could come this weekend, when China releases its official monthly survey of manufacturing in the wake of a private-sector report that showed the sector was contracting.
The emerging world's biggest economy has been an anchor for Asian markets so far in the selloff, providing relative stability to the region's currencies and preventing what has been so far a hasty but selective exit of investors from turning into an indiscriminate stampede.
"It is a very large trade and part of it is carry driven, so if it unravels then you are talking of a Lehman crisis here, I think," said Mirza Baig, the head of Asian rates and currency strategy at BNP Paribas in Singapore.
"But I don't think it will unravel. To get that trade to unravel, you need a complete credit meltdown in China, something that causes a run on the currency."
Confidence that the yuan carry trade - essentially foreign investment chasing yuan appreciation and yield - will not unravel, stems from how tightly China's authorities manage the currency.
(Read more: China must accept global banking standards: Ex-UK PM)
Technically, it is a highly managed floating currency, but in reality it rarely strays far from a daily fixing set by the central bank.
Still, there are several factors that could spook investors and put the yuan positions at risk.
One is that the emerging markets selloff becomes indiscriminate. So far sellers have focused on the weakest developing economies and most of emerging Asia has avoided the worst of the selling.
Another risk is that the central bank's campaign to clampdown on risky lending leads to a more pronounced slowdown in China's economy. A corporate default could raise the spectre of financial instability and rattle nerves in markets worried about high debt levels in China.
"The highest risk is over-tightening," said Craig Chan, rates and currency strategist with Nomura in Singapore. "For instance, if there is a big clampdown, and there is a credit slowdown, investment slowdown and the risks of defaults rise."
Chan however also believes the Chinese authorities would step in pre-emptively to prevent a financial sector crisis.
A purchasing managers' report on Thursday on Chinese manufacturing in January revealed shrinking output and new orders, adding to a sense economic growth is easing.
(Read more: China's shadow banking reform faces its first test)
The government's official version of how the manufacturing sector did in January is due to be published on Saturday.
The massive carry trade
Estimates of how much foreign investment is parked in the yuan carry trade can only be vague at best because of the numerous routes investors can use to get around China's opaque systems and rigorous capital controls.
The most straightforward bets on yuan appreciation are buying the yuan in forward markets, either through the offshore yuan market largely centered in Hong Kong or in non-deliverable forwards, another offshore market.
Volumes in these two offshore yuan markets on average are about $6 billion each day.
But the biggest bets are through the options market, where dollar puts, or options to sell the dollar for yuan, permit investors a cheap gamble on yuan appreciation, traders said.
Then there are wealth management products sold by Chinese banks, which offer offshore investors the opportunity to lend yuan onshore at attractive yields averaging about 6 percent. These are typically structured products routed through banks in Hong Kong.
The claims Hong Kong banks have on mainland counterparts give a rough idea of the size of these yield-seeking structured products. As of October, those claims were a record HK$2.3 trillion ($295 billion) and had climbed 53 percent since the end of 2012, a rise many analysts said reflected speculation on the yuan.
Another potential hit to the carry trade could come from within China. Some onshore exporters and importers have been inflating their receipts and under-stating their payments in order to earn more yuan. That would stop if their bullish outlook for the yuan changes.
(Read more: China's bad-loan skeletons to haunt markets)
Those camouflaged trade flows are also difficult to estimate. But hot money flows into China in the final quarter of 2013 were about $38 billion, based on the difference between the rise in China's dollar reserves and the total for trade and investment flows.
Still, a 50 percent growth rate in trade financing by Hong Kong banks, the trillion yuan that depositors have placed with those banks and the jump in the value of Chinese exports - all point to how big the carry trade might be.
There is little doubt China can defend its currency, given it has $3.8 trillion in currency reserves.
If and when the yuan carry trade unwinds, analysts expect volatility will increase first, causing some of the options trades to reverse. That will be followed by investors trimming their long-yuan positions, and some hedging of payments by Chinese importers.
Even then, the yuan exchange rate might at the most move lower and stop trading at a premium to the central bank's fixing rate. The offshore yuan was quoted at 6.0350 on Thursday and the onshore rate was 6.0594, firmer than the daily fixing of 6.1050 per dollar.
"There might be an increase in volatility, and people will need to de-lever their portfolios and they will need to cut their short dollar-yuan positions," said Baig.
"But that won't drive China to devalue the yuan. It won't drive them to take the fixing higher. After the initial correction, when people realise that fixings aren't going up, then they will go back and buy China."
The odds of China becoming a source of stress for emerging markets are still low, but China will dominate sentiment, analysts said.
News this week that a Chinese trust firm had reached an agreement to resolve a troubled high-yield investment product to avoid a default relieved markets fearful that one default could trigger others and so undermine China financial stability.
But China's 10 trillion yuan shadow banking market, or non-bank lenders, is seen as a big source of risk, and one that is directly linked to the prospects for the economy and policy.
"We are skeptical that we will see any fundamental rebound in emerging markets before we get more transparency on the outlook for the Chinese economy and the Chinese financial system and that could take some time," said Lars Christensen, a strategist at Danske Bank in Copenhagen, in a note to clients. "Therefore, caution is still very much warranted."