Beijing and Tokyo sealed a multi-billion dollar currency swap arrangement on Friday, aimed at enhancing financial stability and spurring business activity in both countries.

According to the Bank of Japan (BOJ), the arrangement which will last until October 25, 2021, will allow the exchange of local currencies between the two central banks for up to 200 billion yuan or 3.4 trillion yen ($30 billion).

The agreement was sealed during Japanese Prime Minister Shinzo Abe’s visit to Beijing for the first formal Sino-Japanese summit in seven years. The meeting comes as Asia’s two biggest economies look to strengthen relations against a backdrop of trade friction with the United States.

The two main holders of the US Treasury securities, China and Japan have trimmed their ownership of notes and bonds in August.

“With the strengthening of economic and financial linkages between Japan and China, Japanese financial institutions have been expanding their renminbi-based businesses,” said the BOJ.

It added that would be prepared to provide liquidity in the yuan currency, should Japanese financial institutions face unexpected difficulties in yuan settlements, and if the bank judges the liquidity provision to be necessary for ensuring the stability of Japan’s financial system.

China has been actively seeking to boost the use of its currency in mutual trade settlements with partners, bypassing the US dollar. The idea of moving away from the dollar in global trade has become a trend lately among countries like Russia, China, Japan, Iran, Turkey, Venezuela, and others.

Russian President Vladimir Putin has recently supported weaning the country’s financial sector off the greenback, saying the dollar monopoly was unsafe and dangerous for the global economy.