> For the complete documentation index, see [llms.txt](https://monobridge.gitbook.io/monobridge/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://monobridge.gitbook.io/monobridge/case-study/3.2-cross-chain-dexs-powered-by-mono-bridge.md).

# 3.2 Cross-chain DEXs powered by Mono Bridge

To realize unified cross-chain rewards for liquidity providers, Curve builds a holistic reward distribution logic based on the total liquidity of the same transaction pair on Ethereum and Fantom. This approach can be extended to cross-chain DEXs, where a holistic AMM business logic can be built based on the total liquidity of the same transaction pair on different chains.

DEXs in the form of cross-chain Dapps built with anyCall can directly implement transactions between two chains, that is, to use Token A on Blockchain A to exchange for Token B on Blockchain B.

<figure><img src="/files/uVfbuz6mSnTYAbbUfesx" alt=""><figcaption></figcaption></figure>

The specific process is as follows:

1. Other than deploying smart contracts that can conduct assets swap on different chains, like AMM, Cross-Chain DEX also deploys contracts of Cross-Chain Swap Agent on these chains. The Agent contracts can identify and accept users’ trade requests. If the traded assets are located on different chains, the Agent contract can transmit the trade request to the destination chain via calling anyCall so as to realize cross-chain transactions.
2. Users can send trade requests to Cross-Chain Swap Agent on Fantom. The requests should include information about the swapped assets, the chains where the traded assets are located, trade amount and exchange rate for traded pairs.
3. The Agent will first identify the trade request. If the assets to buy are located on other chains except Fantom, the Agent will call the DEX contract on Fantom to make the assets to sell locked into the designated liquidity pool and meanwhile, call the anyCall API on Fantom to submit to it information about the transaction, the designated destination chain and aggregated liquidity of the traded pairs in the Fantom pool.
4. The trade message will be transmitted by FastMPC network to anyExec deployed on the designated destination chain--Ethereum.
5. anyExec will call theAgent contract deployed on Ethereum so asto transmit the trade request initiated from Fantom and all the relevant information to Ethereum, ending up with the cross-chain reception and execution of trade requests.
6. The Agent deployed on Ethereum will retrieve the price of the traded pair via calling the DEX contract on Ethereum. The final exchange rate is calculated by AMM based on the aggregated liquidity of traded assets in pools of both Fantom and Ethereum.
7. The DEX contract deployed on Ethereum will send the transaction result back to the Agent contract on Fantom through the anyCallAPI on Ethereum so that the Agent contract there can update the trade status. And the DEX contact will at the same time transfer the assets bought by users to their addresses on Ethereum. In so doing, the transaction will no longer be priced only by the depth of the liquidity pool on one chain where the user's asset is located, but by the total liquidity of a given trading pair on all the chains where the DEX is deployed. Thus multi-chain-deployed DEXs will no longer rely on the deployment on a certain chain to attract the user groups of that particular chain, but can attract liquidity and users from many chains simultaneously to expand its business coverage. Building a cross-chain DEX on the basis of anyCall will inevitably entail more detailed issues on implementation. For example, there may be a situation where the total liquidity of multiple chains is sufficient, while that of the chain where the transaction is executed is not. If that's the case, Multichain Cross-chain Bridge/Router can be leveraged to allocate the liquidity among the chains concerned.
