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

Watch for UserRequestForAffirmation if the token on the Foreign side is ERC677 in case of the erc-to-erc bridge mode #25

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

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 monitor to discover the transfer issues with the bridge in the erc-to-erc mode its behavior should be extended to watch for UserRequestForAffirmation events on the Foreign Brdige contract. The approach to look for exact event and use a right contract for this could be identified by checking whether the ERC20 token contract has the bridgeContract method and it points to the same bridge contract the monitor must work with.

@akolotov
Copy link
Collaborator Author

akolotov commented May 8, 2019

Addressed by #26

@akolotov akolotov closed this as completed May 8, 2019
@ghost ghost removed the review label May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants