|
1 | 1 | # LINK Token Bridge v0.7 |
2 | 2 |
|
3 | | -- `./token/LinkTokenChild.sol`: A mintable & burnable child LinkToken contract to be used on child networks. |
| 3 | +- `./token/LinkTokenChild.sol`: A generalized mintable & burnable child LinkToken contract to be used on child networks. |
| 4 | + |
| 5 | +NOTICE: Current implementation of LinkTokenChild contract requires some additional consideration: |
| 6 | + |
| 7 | +- Supporting more than one gateway (multiple bridges minting the same token) leaves room for accounting issues. |
| 8 | + If we have more than one gateway supported, an additional check needs to exist that limits withdrawals per |
| 9 | + gateway to an amount locked on L1, for the specific gateway. Otherwise one can accidentally "burn" tokens |
| 10 | + by withdrawing more than locked in L1 (tx will fail on L1). When there is a 1:1 relationship between the |
| 11 | + gateway and token, the token itself is an accounting mechanism. For a potential N:1 relationship, a more |
| 12 | + sophisticated type of accounting needs to exist. |
| 13 | +- Every bridge is unique in the amount of risk it bears, so tokens bridged by different bridges are not 1:1 |
| 14 | + the same token, and shouldn't be forced as such. |
| 15 | +- Bridges often require an unique interface to be supported by the child network tokens |
| 16 | + (e.g. `mint` vs. `deposit`, `burn` vs. `withdraw/unwrap`, etc.). |
| 17 | +- Bridges often assume that the child contract they are bridging to is the ERC20 token itself, not a gateway |
| 18 | + (intermediate contract) that could help us map from the specific bridge interface to our standard |
| 19 | + LinkTokenChild interface. |
| 20 | +- Chainlink often needs to launch on a new network before the native bridge interface is defined. |
| 21 | +- To support early (before the bridge is defined) Chainlink network launch, we could make an upgradeable |
| 22 | + LinkTokenChild contract which would enable us to slightly update the contract interface after the bridge |
| 23 | + gets defined, and once online transfer the ownership (bridge gateway role) to the new bridge. |
| 24 | + |
| 25 | +TODO: Potentially create an upgradeable `LinkTokenChild.sol` and limit gateway support to only one (owner)! |
0 commit comments