-
Notifications
You must be signed in to change notification settings - Fork 35
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
Bridging Native Token between Rootchain and Childchain #299
Comments
A cleaner implementation path (imo) would be adding support to wrap ether+bridge within the same txn. Keeps the implementation details the same for token bridging. otherwise, you're adding more configuration complexity and another branching path for how the bridge works. (NativeToken vs normal ERC20) |
I considered that approach but a few things come up:
Overall, it makes more sense to use a WETH copy regardless. When and how it is deployed would be up to discussion, but regardless, I currently feel that the changes required to support native token would require ugly specialised handling in the RootERC20Predicate. I'm happy to PoC this approach and make a PR though |
Thinking about this more, wrapping does not make sense since none of the ERC20 operations are required on the native token. There is no transfers or approvals etc. |
$ npm run deploy
Generating typings for: 0 artifacts in dir: types for target: ethers-v5 |
Currently, there is no support for bridging the native token between rootchain and childchain.
For example, on Ethereum, the native token is Ether, i.e. not an ERC20. This means the
RootERC20Predicate
contract cannot be used to facilitate the deposit and withdrawal of Ether.This Github issue proposes adding new contracts
RootNativePredicate
andChildNativePredicate
which can be used to facilitate the deposit and withdrawal of Ether. (Open to naming convention changes)One could argue that users can deposit WETH (an ERC20 wrapper of Ether) however, this causes significant UX friction, requiring users to wrap and unwrap, while also introducing issues for non-crypto native users who are not familiar with WETH and the need for wrapping.
I will be implementing the contracts required to support Native Token Bridging and ideally, it would be merged back to this repository. I'll share a draft PR as it progresses. Open to discussion here
The text was updated successfully, but these errors were encountered: