-
Notifications
You must be signed in to change notification settings - Fork 529
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
Add ERC: Sovereign Bridged Token #89
base: master
Are you sure you want to change the base?
Conversation
ERCS/eip-7281.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function setLimits(address _bridge, uint256 _mintingLimit, uint256 _burningLimit) external;
pls, change it to function setBridgeLimits(...
to distinguish that from other ERC20 features / extensions.
There has been no activity on this pull request for 2 weeks. It will be closed after 3 months of inactivity. If you would like to move this PR forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review. |
There has been no activity on this pull request for 2 weeks. It will be closed after 3 months of inactivity. If you would like to move this PR forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review. |
👍 would love this to be supported |
|
||
## Abstract | ||
|
||
This proposal defines a minimal extension to [ERC-20](../EIPS/eip-20.md) (affectionately called `XERC20`) that enables bridging tokens across domains without creating multiple infungible representations of the same underlying asset. It introduces the concept of a Lockbox to allow existing tokens to comply with the specification through a familiar wrapping mechanism and exposes new interfaces that allow token issuers to apply custom risk profiles at a per bridge per domain granularity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is better! I'd still like to see a bit more detail on what a "Lockbox" is here, but you can work on that after you get merged as Draft.
ERCS/erc-7281.md
Outdated
- Suppose Alice pays Bob her 100 USDT on L2. Bob now has 200 USDT. | ||
- Bob attempts to bridge the 200 USDT from L2→L1 through Bridge 2. This transaction fails because Bridge 2 only has 100 USDT custodied that it can give to Bob. | ||
|
||
The core property that this example illustrates is that locking tokens across multiple bridges on the token’s home domain makes it impossible to have fungibility without impeding user experience on remote domains. Minting or burning the token can solve this problem, but not all `ERC20` tokens implement a configurable mint/burn interface. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you aren't talking about the interface, and are instead talking about the standard as a whole, don't use backticks:
The core property that this example illustrates is that locking tokens across multiple bridges on the token’s home domain makes it impossible to have fungibility without impeding user experience on remote domains. Minting or burning the token can solve this problem, but not all `ERC20` tokens implement a configurable mint/burn interface. | |
The core property that this example illustrates is that locking tokens across multiple bridges on the token’s home domain makes it impossible to have fungibility without impeding user experience on remote domains. Minting or burning the token can solve this problem, but not all [ERC-20](./eip-20.md) tokens implement a configurable mint/burn interface. |
If you tick the "Allow edits from maintainers" checkbox on the pull request, I can apply these minor edits for you.
ERCS/erc-7281.md
Outdated
|
||
All `XERC20` tokens MUST implement the following interface. | ||
|
||
```ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```ts | |
```solidity |
ERCS/erc-7281.md
Outdated
Implementations MUST additionally satisfy the following requirements: | ||
|
||
- `mint` MUST check that the caller's current available `limit` is greater than or equal to `_amount` | ||
- `mint` MUST increase the supply of the underlying `ERC20` by `_amount` and reduce the current available `limit` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `mint` MUST increase the supply of the underlying `ERC20` by `_amount` and reduce the current available `limit` | |
- `mint` MUST increase the supply of the underlying ERC-20 token by `_amount` and reduce the current available `limit` |
ERCS/erc-7281.md
Outdated
- `mint` MUST check that the caller's current available `limit` is greater than or equal to `_amount` | ||
- `mint` MUST increase the supply of the underlying `ERC20` by `_amount` and reduce the current available `limit` | ||
- `burn` MUST check that the caller's current available `limit` is greater than or equal to `_amount` | ||
- `burn` MUST decrease the supply of the underlying `ERC20` by `_amount` and reduce the current available `limit` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `burn` MUST decrease the supply of the underlying `ERC20` by `_amount` and reduce the current available `limit` | |
- `burn` MUST decrease the supply of the underlying ERC-20 token by `_amount` and reduce the current available `limit` |
ERCS/erc-7281.md
Outdated
} | ||
``` | ||
|
||
Lockboxes SHOULD additionally implement the following alternative `deposit` function for native (non-`ERC20`) assets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lockboxes SHOULD additionally implement the following alternative `deposit` function for native (non-`ERC20`) assets. | |
Lockboxes SHOULD additionally implement the following alternative `deposit` function for native (non-ERC-20) assets. |
ERCS/erc-7281.md
Outdated
|
||
Lockboxes SHOULD additionally implement the following alternative `deposit` function for native (non-`ERC20`) assets. | ||
|
||
```ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```ts | |
```solidity |
ERCS/erc-7281.md
Outdated
3. On the target domain, the bridge then similarly `mint`s the token. | ||
4. When transferring back to the home chain, the `XERC20` can be unwrapped back into the original `ERC20` token. | ||
|
||
Using this mechanism, the underlying `ERC20` token is consolidated to the Lockbox contract, and shared across all supported bridges. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using this mechanism, the underlying `ERC20` token is consolidated to the Lockbox contract, and shared across all supported bridges. | |
Using this mechanism, the underlying ERC-20 token is consolidated to the Lockbox contract, and shared across all supported bridges. |
ERCS/erc-7281.md
Outdated
|
||
## Backwards Compatibility | ||
|
||
This proposal is fully backwards compatible with `ERC20`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This proposal is fully backwards compatible with `ERC20`. | |
This proposal is fully backwards compatible with ERC-20. |
ERCS/erc-7281.md
Outdated
|
||
## Security Considerations | ||
|
||
Please see the associated discussion in the **Rationale** section. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A reader coming to this document to specifically find security considerations won't really benefit from this sentence. Security considerations should be in this section.
There has been no activity on this pull request for 2 weeks. It will be closed after 3 months of inactivity. If you would like to move this PR forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review. |
This pull request was closed due to inactivity. If you are still pursuing it, feel free to reopen it and respond to any feedback or request a review in a comment. |
Hi @SamWilsn, could you help me re-open this PR? I don't seem to have access (also cannot allow you to edit as maintainer it seems). We have some updates to push based on your last round of feedback. |
@just-a-node sorry for the delay! |
Is anyone actively championing this ERC? It would be great to get this onto the ERCs site if it is being actively developed. It is currently only here in this PR. |
There has been no activity on this pull request for 2 weeks. It will be closed after 3 months of inactivity. If you would like to move this PR forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review. |
Co-authored-by: pedrouid <pedrouid@users.noreply.github.com>
The commit 052a0c8 (as a parent of eef4832) contains errors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of older comments that still need to be addressed, but this is almost ready!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We prefer SVGs, but if you can't provide one, PNG is acceptable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SVG if possible please.
|
||
## Abstract | ||
|
||
This proposal defines a minimal extension to [ERC-20](../EIPS/eip-20.md) (affectionately called `XERC20`) that enables bridging tokens across domains without creating multiple infungible representations of the same underlying asset. It introduces the concept of a Lockbox to allow existing tokens to comply with the specification through a familiar wrapping mechanism and exposes new interfaces that allow token issuers to apply custom risk profiles at a per bridge per domain granularity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
XERC20
Technically you're only supposed to put code in backticks. If you changed your interface name to just XERC20
, then you could have your name and satisfy the rule.
This PR follows the EIP -> ERC migration guide to migrate the original PR for EIP-7281.