The yuan was up slightly against the dollar on Wednesday, though a lower official mid-point and uncertainty ahead of Britain's referendum on whether to remain in the European Union capped gains. Spot yuan opened at 6.5899 per dollar and was changing hands at 6.5857 at midday, 0.07 percent above the previous close, with traders saying the overnight close of 6.5900 had already factored some of the dollar's global strength. That allowed the yuan to shrug off the People's Bank of China setting the midpoint rate at 6.5935 per dollar prior to market open, 0.42 percent weaker than the previous fix at 6.5656. Wednesday's midpoint was the second lowest fixing in over five years after last Wednesday's record of 6.6001. Markets also took in stride Federal Reserve chair Janet Yellen's testimony before Congress where she expressed general optimism about the U.S. economy and said gradual hikes in the federal funds rate were likely to be needed. "Yellen's testimony is within market expectations. Right now, all the focus is on Britain's referendum," said a trader at a Chinese commercial bank in Shanghai. "China's forex market has been relatively quiet of late. If Britain chooses to leave, that could give China's central bank a test on how equipped the market is now for uncertain events." Also Read:\u00a0Federal Reserve cautious on rates due to Brexit, US hiring slowdown: Janet Yellen The dollar index rose over 0.4 percent on Tuesday, back above 94.00 before losing some steam in Wednesday's Asian trade, standing at 93.900 around midday. On Tuesday, the PBOC said that China is considering allowing local commercial banks to participate in offshore yuan trade, as the country looks to project greater influence in the offshore currency market. Traders said the move is in line with China's efforts to achieve yuan unification in both the onshore and offshore markets, but initial progress may be slow. The offshore yuan was trading 0.15 percent softer than the onshore spot at 6.5956 per dollar. The yuan market at a glance: ONSHORE: Item Current Previous Change PBOC midpoint 6.5935 6.5656 -0.42% Spot yuan 6.5857 6.59 0.07% Divergence from -0.12% midpoint * Spot change YTD -1.40% Spot change since 2005 25.67% revaluation *Divergence of the dollar\/yuan exchange rate. Negative number indicates that spot yuan is trading stronger than the midpoint. The People's Bank of China (PBOC) allows the exchange rate to rise or fall 2 percent from official midpoint rate it sets each morning.