Quick bridge questions

faq
#1

We’d like to set up a bridge to transfer an ERC20 token from Ethereum to a newly deployed sidechain. Is it possible to disable the other direction? Our naive approach would be to deploy the bridge contract on Ethereum without any validators. Would this work? Is there a better solution?

I guess we should use the ERC20 -> native type (which would mint the tokens on the sidechain if I understand correctly). As this appears to be the newest type, is it already fully implemented, including the user interface? How much of the code is covered by previous audits?

1 Like
#2

Depending on your goal their are several ways to achieve this. What is your motivation? Are you simply looking for a one-way transfer? Do the assets already exist on the Ethereum blockchain? If not, why would you want to create them on Ethereum and then bridge them to a network with nope hope of return?

#3

We have a trusted validator set on the sidechain, but not on the main chain. Therefore, we can only safely transfer from main to side.

Fortunately, one way transfers are totally fine for us. It’s a token specifically created for the side chain and only useful there, so the users never have to send it back. The only reason why it exists on the main chain is for the initial distribution and easy access to exchanges.

1 Like
#4

You could change daily limit to 0 on one side. No need to change code.

2 Likes
#5

Based on what you described you would like to have the bridge configured in ERC20-to-native mode. Is your sidechain based on Parity? Does your consensus include support of the block reward contract and it is already deployed?

2 Likes
#6

Nice! This sounds like a clean way to do it.

Yep, it’s a Parity Aura chain and we can use a block reward contract. I guess another option would be to allocate the total number of tokens to the bridge contract at genesis, but if the reward contract is the standard way we should go for this.

#7

I guess another option would be to allocate the total number of tokens to the bridge contract at genesis, but if the reward contract is the standard way we should go for this.

Yes, it is true. But in this case we will talk about native-to-ERC20 type of the bridge. Native coins in this case will go through the process “mint-burn”, but will be “locked-unlocked”. Please note that the token on the side of the mainnet must support ERC677 extension.