I’m interested in building a bridge between Ethereum Mainnet and Ropsten testnet. The user will send USDT/ETH to the mainnet contract and will receive tokens on Ropsten(and the other way around).
What is the easiest way to achieve this?
Thanks.
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityYou can spin up your own TokenBridge.
Note that this would be a horrible idea as any testnet is subject to state resets. Anyone who deposit real money to testnet would be subject to losing them.
This isn't a good idea. It will likely result in loss of user funds.
Two main points:
These two points are somewhat related.
Firstly, the testnets are for testing. There is no guarantee to the user that they will remain up-and-running from one day to the next. At various times in the past they have been taken down (see the old Morden testnet, which was the precursor to Ropsten: What is Olympic, Frontier, Morden, Homestead and Ropsten Ethereum blockchain?).
Ropsten itself is on either its second or third incarnation, with the previous instances being attacked and shut down1. (See Ropsten testnet is under kind of attack? What can we do? and associated threads.)
Because testnets are for testing, test ETH - in your case Ropsten ETH - is freely available from faucets. As such, they have no value. As far as I'm aware, no markets exist where test ETH is freely traded.
Secondly, although Ropsten uses proof of work as its consensus mechanism - in a similar way to the main net - there are far fewer miners providing far less by way of hashing power, making Ropsten much less secure, and much easier and cheaper to launch an attack against. (1See my earlier mention of previous attacks.)
If a user's testnet ETH is effectively his/her way of redeeming their real mainnet ETH, and if they lose their testnet ETH either through an attack or because Ropsten has been reset, they will have lost their money.
Further, if a user spends their testnet ETH... on testing... how do they redeem their mainnet ETH?