Forum

Cross Chain Farming from BSC to ETH ( Compound & Aave )

We want to use Smart Contract ( in BSC ) to interact with contracts in Ethereum.

Operations may include, investing DAI, USDC, USDT in Compound ( Eth ) from BSC Contracts.
Needed to know more about how xDai Bridge can help to facilitate the same with minimal fees and in a trustless manner.

The bridge does not guarantee low fees to execute operations in the Ethereum Mainnet. You can check how the transfer through the bridge cost by looking through the transactions to Arbitrary Message Bridge: POA Network: AMB-ETH-XDAI | 0x4c36d2919e407f0cc2ee3c993ccf8ac26d9ce64e.

If it is OK for you, you can learn how AMB works starting from here: About the AMB - TokenBridge.

1 Like

Got an Idea of how to facilitate the transfer but I had some doubts regarding the token mapping. Will the swap will lock and provide the native tokens on the respective chains USDT BEP-20 → USDT-ERC20
If so what about the liquidity fragmentation?
or
it will provide the wrapped token on the other chain?

I see through AMB, we can facilitate cross-chain contract calls. What about the GAS estimation?

If you write your own extension on top of AMB, it is up to its logic. E.g. you can choose the same approach as the connext bridge does: someone should provide liquidity for the bridge you are implementing.

I see through AMB, we can facilitate cross-chain contract calls. What about the GAS estimation?

Definitely the crosschain contract call cannot be estimated. That’s why the recommendation is to calculate the max gas limit in advance and use it in the AMB mediator. This gas limit must be provided as part of the requireToPassMessage call.