The Solana Foundation in collaboration with Terra are looking to offer a grant/bounty to a team interested in building a cross-chain integration for Terra.
Individuals or teams interested in undertaking this grant/bounty please email:
Provided below is the specification for the design. The specification was developed by the Terra team.
Specifications - ‘Shuttle Bridge’
The purpose of shuttle is to create a lightweight token and message transfer protocol among an arbitrary set of blockchains.
Let R be the set of relayers in the system and B the set of supported blockchains.
- A user can transfer a token issued in any member of B to any other member of B.
- A user can transfer a message signed in any member of B to any other member of B, provided that the message is sufficiently short.
The system guarantees honest delivery insofar as a sufficiently large (e.g. majority) of the voting power in R “validates” the transfer.
There exists three broad categories for moving assets across chains: atomic swaps, synthetics, and tokenized representations. We review the prior work of “tokenized representations” specifically.
- https://github.com/cosmos/peggy/tree/althea-peggy, https://github.com/cosmos/peggy/blob/master/docs/architecture.md
Near Protocol Rainbow bridge
Ren protocol especially comes closest to what we want to build, but it has the following drawbacks:
- MPC is too complicated: Replicating consensus state across multiple chains is hard
- Token transfers only: Ren only supports token transfers (for now), but this can easily be extended to support generalized messaging
- Can charge holding fee: Ren nodes (run entirely by the core team) may elect to charge a “holding fee” for custodying assets. This is destructive, as hold fees could trigger margin calls etc.
We propose a bridging framework similar to Ren, but:
Supports generalized messaging
Only transaction fees, no holding fees 3) Vastly simplified consensus
The system comprises of:
Launchpad contracts: For each of the chains in B, there exists a “launchpad contract” used by the sender to invoke functions on receiving chains. The only supported function is:
- chain_id: id of the supported chain
- function_id: id of the gateway function to call on said chain
- toll: toll being posted to send the transaction; similar to gas
- parameter…:arbitrary set of parameters to be sent in
Gateway contracts: For each of the chains in B, there exists a “gateway contract” that defines functions that can only be called by the relayer set. Initially supported functions should be:
- Mint(amount)-mints tokenized representation
- Burn(amount)-burns tokenized representation
- Stake(validator)-stakes tokens to a validator
- Unstake(validator)-unstakes tokens from a validator
- Withdraw(address) - withdraws all staking rewards receivable by the gateway contract to a given address
The gateway contract only mints and burns when a multisig signature (controlled by relayers) clearing the preset threshold is correctly submitted.
Relayers: A proof-of-authority relayer set implemented on Terra smart contracts.
- Each relayer holds a key to the multisig on all the gateway contracts.
- Relayers post a“toll”, which is the minimum amount of fees they would need to earn before relaying an interchain transaction. If the sender pays less than the toll, then they simply ignore the transaction. The sender’s incentive is to post a high enough toll such that their transaction would be agreed to by the majority of relayers
- Could migrate to proof-of-stake later with stake denominated in anchor governance token. Althea peggy implementation for reference: https://github.com/cosmos/peggy/blob/althea-peggy/solidity/contracts/Peggy.sol
Oracle: A threshold voting schema. Launchpad contracts submit transactions to be considered, and validators submit votes validating the tx along with their signature. Once a majority of the relayers have submitted signatures, the sender (or a related service) can collect said signatures to execute the desired function on the destination chain. User scenarios Similar to https://github.com/renproject/ren/wiki#cross-chain-transactions
Similar to https://github.com/renproject/ren/wiki#cross-chain-transactions