SIP-311: snxUSD Teleporters (V3)
|Network||Ethereum & Optimism|
|Implementor||Daniel Beal (@dbeal-eth), Noah Litvin (@noahlitvin)|
This SIP proposes the addition of a cross-chain transfer function to the snxUSD token.
Leveraging cross-chain messaging, Synthetix is able to implement highly efficient digital asset transfer via teleportation. In its simplest form, this entails burning snxUSD on a source chain, sending a cross-chain message containing the amount burned, and minting that quantity of tokens on the destination chain. A teleportation fee can be collected and distributed to backers of snxUSD.
As liquidity in DeFi continues to move across various L2s, it is increasingly important for protocols to create chain-agnostic abstractions. Given that Synthetix is currently deployed on two chains, the ability to transfer assets bi-directionally (without a challenge verification period imposed by roll-ups, e.g.) would already be a very valuable feature for the protocol.
Teleporters were originally proposed in SIP-204, but implementation was postponed due to the lack of decentralized cross-chain messaging solutions available. This proposal entails the use of the Cross-Chain Interoperability Protocol (CCIP). Because Synthetix is already dependent on Chainlink's infrastructure for price feed oracles, this proposal doesn't create any trust assumptions with additional third parties.
Teleporters are an improvement over AMM-based cross-chain bridging solutions because there is no slippage incurred from liquidity available on destination chains. Instead, the protocol can apply a fee structure at the discretion of governance, further incentivizing stakers to back the stablecoin.
Teleporters involve adding
ccipReceive functions to the snxUSD token with appropriate validations and fee capture functionality.
We propose making the transfer function available on the snxUSD proxy, rather than the core system proxy. This is an extension of the ERC-20 interface (which already essentially includes a "same-chain transfer" function).
This proposal entails collecting fees in ETH, rather than snxUSD, for the following reasons:
- Users will always receive the same amount of snxUSD that they have transferred.
- This is the most efficient method to collect fees, as no additional token transfers are involved in the transaction.
- Users are already paying ETH for gas fees to execute the transaction.
Future SIPs could involve additional fee payment methods (such as snxUSD), alternative fee structures, and circuit-breaking functionality for added security.
Implementation entails two functions on the snxUSD token module:
transferCrossChain(uint chainId, address recipient, uint amount) payable returns (bool)
- Confirm that the sender has a sufficient balance of snxUSD to transfer.
- Determine the fee amount in ETH by taking an SCCP-specified percentage of the amount transferred (plus any SCCP-specified flat fee) and denominate that amount in ETH based on a price oracle.
- Transfer the fee into the contract and notify a rewards distributor of the collected fees.
- Encode the
- Burn the amount of snxUSD transferred.
ccipReceive(Any2EVMMessage calldata message)
- Verify that the
senderdata in the message correspond to a legitimate deployment of the snxUSD token.
- Mint the amount of snxUSD tokens to the destination address, as specified in the message's
Note that this function must conform to the existing CCIP interface.
Relevant tests will be developed during implementation.
Configurable Values (Via SCCP)
- Each deployment should specify fee amounts and the address of a rewards distributor (per SIP-305) to receive these fees.
- Every deployment of Synthetix must be configured with the address of snxUSD on each other chain, such that it can verify the sender of messages that request minting snxUSD.
Copyright and related rights waived via CC0.