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

Add ERC: Sovereign Bridged Token #89

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

just-a-node
Copy link

This PR follows the EIP -> ERC migration guide to migrate the original PR for EIP-7281.

@eip-review-bot
Copy link
Collaborator

eip-review-bot commented Nov 3, 2023

File EIPS/eip-7281.md

Requires 1 more reviewers from @axic, @g11tech, @gcolvin, @lightclient, @SamWilsn, @xinbenlv

File ERCS/erc-7281.md

Requires 1 more reviewers from @axic, @g11tech, @SamWilsn, @xinbenlv

@github-actions github-actions bot added the w-ci label Nov 3, 2023
ERCS/eip-7281.md Outdated
Copy link
Contributor

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.

Copy link

github-actions bot commented Jan 3, 2024

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.

assets/eip-draft_bridged_tokens/fragmentation.png Outdated Show resolved Hide resolved
assets/eip-draft_bridged_tokens/xERC20.png Outdated Show resolved Hide resolved
ERCS/eip-7281.md Outdated Show resolved Hide resolved
ERCS/eip-7281.md Outdated Show resolved Hide resolved
ERCS/eip-7281.md Outdated Show resolved Hide resolved
ERCS/eip-7281.md Outdated Show resolved Hide resolved
ERCS/eip-7281.md Outdated Show resolved Hide resolved
ERCS/eip-7281.md Outdated Show resolved Hide resolved
ERCS/eip-7281.md Outdated Show resolved Hide resolved
ERCS/eip-7281.md Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the w-stale label Jan 19, 2024
Copy link

github-actions bot commented Feb 3, 2024

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.

@github-actions github-actions bot removed the w-stale label Feb 18, 2024
@eip-review-bot eip-review-bot changed the title Add ERC-7281: Sovereign Bridged Token Add ERC: Sovereign Bridged Token Feb 18, 2024
@github-actions github-actions bot removed the w-ci label Feb 18, 2024
@github-actions github-actions bot added the w-ci label Feb 18, 2024
@agileurbanite
Copy link

👍 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.
Copy link
Contributor

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.
Copy link
Contributor

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:

Suggested change
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```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`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `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`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Copy link
Contributor

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.

Copy link

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.

Copy link

github-actions bot commented May 4, 2024

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.

@github-actions github-actions bot closed this May 4, 2024
@just-a-node
Copy link
Author

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.

@SamWilsn SamWilsn reopened this Jul 22, 2024
@SamWilsn
Copy link
Contributor

@just-a-node sorry for the delay!

@github-actions github-actions bot removed the w-stale label Jul 23, 2024
@frangio
Copy link
Contributor

frangio commented Aug 5, 2024

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.

Copy link

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>
Copy link

github-actions bot commented Nov 9, 2024

The commit 052a0c8 (as a parent of eef4832) contains errors.
Please inspect the Run Summary for details.

Copy link
Contributor

@SamWilsn SamWilsn left a 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!

Copy link
Contributor

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.

Copy link
Contributor

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.
Copy link
Contributor

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.

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

Successfully merging this pull request may close these issues.

7 participants