-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strategy to migrate an origin native-to-erc bridge to AMB #365
Comments
Here is the result of my review. SecurityAMB validators will listen to different events on different contracts with different types of messages and how they are processed. Also, validators could be different. So there is no risk to reprocess a completed message. FunctionalityAll functionality from the bridge can be kept as a mediator. Bridge stateUpgrading the implementation contract will not affect the locked ETC value in the proxy contract nor the ERC677 tokens hold by the users. If
Given that the contracts are already initialized, the following parameters need to be set/updated as part of the implementation contract upgrade:
ETC special considerationsPreviously, contracts needed to be adapted and compiled to the
To confirm this, a native-to-erc bridge was deployed in Kotti-Kovan networks and tested along with all the components with successful results. Bridge UIThe UI will be needed to be adapted to work with the new mediator. So far there is no AMB mediator supported. |
@patitonar thanks for detailed analysis! Please find my comments below:
At this moment I suggest to consider the way to integrate the storage of reward recipient into the fee manager (or something like this). It looks logical since we assume that the mediator contracts could be owned by a different project rather than the project who deployed the Arbitrary Message Bridge.
Could we add a code to a migration method to release the storage for these parameters. It will allows us to refund some gas.
As far as I remember we didn't use Kotti for testing last time by some reason. Do you recall these reasons?
I discussed this with @igorbarinov and we agreed that it could be a good idea to start looking on more generic approach for the bridge UI with respect to AMB. The current view is that we can consider to develop a Burner Wallet plug-in (https://github.com/burner-wallet/sample-plugin). The rationale here is that it is already works with the xDai chain to bridge Dai to xDai (https://github.com/burner-wallet/burner-wallet-2/tree/develop/packages/exchange). |
After reviewing the structure and code of the Burner Wallet, I think the easiest way to integrate and interact with new mediators contracts is to create a plugin that adds a new Pair (ETC <-> WETC) in the exchange plugin, similar on how the xDai bridge works. Here are some possibles steps to do this:
|
This issue is being opened to make research to identify ability of migrating a native-to-erc bridge (e.g. WETC bridge) to be an extension of AMB bridge.
The following is required to be considered:
0x073081832B4Ecdce79d4D6753565c85Ba4b3BeA9
, Ethereum Mainnet:0x0cB781EE62F815bdD9CD4c2210aE8600d43e7040
) must be the proxy for AMB mediators contractsPlease provide an analysis if the migration is possible, what limitations need to be taken into account (e.g. due to limited number of functionality existing in Ethereum Classic), what special handling must be done in comparison with a generic native-to-erc20 extension for AMB.
The implementation stage will begin only after the review of the analysis described above.
The text was updated successfully, but these errors were encountered: