Guys, please help. The task is to write a smart contract that accepts BUSD (Binance Smart Chain) and converts them into USDT coins on the Tron network. The obvious option is to use the Binance API for this task, but I'm wondering if there are simpler solutions, like a bridge or cross-chain. I've been searching, but I can't find any solutions that support both coins and both networks. If anyone knows of any ready-made solutions, could you please advise me?

Mar 2, 2023, 1:17 PM
Look into anyswap
And how is using binance api the obvious solution? Contracts cannot communicate with external world
Mar 2, 2023, 1:19 PM
it means to send from the address of the contract to the address that has tokens in the binance, and then through the api do everything you need and send the exchanged tokens back to the address of the contract
Mar 2, 2023, 1:29 PM
That last part, it won't trigger any functions on contract. you'll need an external listener to listen for the transfer event and manually make a function call on the contract to move the funds from contract to desired wallet
If the task is to keep the exchanged token on contract itself, then it should be fine
Mar 2, 2023, 1:33 PM
yes, I didn't think it through, thanks for pointing out the error
Mar 2, 2023, 1:36 PM
There is a few options to achieve the conversion of BUSD to USDT across BSC netowrk and Tron Network.
1. Use an existing bridge protocol: There are several braidge protocols available that allow you to transfer tokens between different network.
2. Use a crosschian propocal:
3. Use a DEX
4. Build a custom bridge
Mar 2, 2023, 9:48 PM

© 2024 Draquery.com All rights reserved.