Skip to content
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

ERC677 support on the Foreign side in the erc20-to-erc20 bridge mode #213

Closed
akolotov opened this issue May 1, 2019 · 1 comment
Closed
Assignees
Labels

Comments

@akolotov
Copy link
Collaborator

akolotov commented May 1, 2019

Current implementation of the erc20-to-erc20 bridge mode assumes that pure ERC20 token is used on the Foreign side. So, when the tokens are relayed to the Home side, the method transfer is invoked by the user and the relay request is handled by the TokenBridge oracle without involvement the bridge contract on the Foreign side. It is inconvenient due to following:

  • there is no way to revert the request if it exceeds the limits.
  • there is no way to halt the bridge operations

Historically, such kind of functionality was suggested for already deployed ERC20 tokens to enhance them through the bridging ability and described shortcomings were considered as insignificant in comparison with the value such solution could bring. But for there are the cases for the bridge when it is going to be used with just deployed tokens. In this case the token could be extended by ERC677 standard in order to address issues described above.

That's why the PR omni/tokenbridge-contracts#175 was created in the bridge contracts repo.

In order to allow the Token Bridge UI to work with new contracts, it is necessary for the erc-to-erc mode consider an option to call transferAndCall on the token contract instead of transfer. The apporach to work with token could be identified by checking whether the ERC20 token contract has the bridgeContract method and it points to the same bridge contract the UI must work with.

If the ERC677 is discovered to work with the erc-to-erc bridge the UI should also display statistic related to limits on the Foreign side.

@akolotov
Copy link
Collaborator Author

Available in the release 2.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants