An open-source, trustless, method for transferring a token from one chain to another.
The StakerBridge process modifies the TokenSwap open-source algorithm so that a single party is both the transmitter and receiver of their token, enabling a seamless transfer of tokens from one chain to another.
The StakerBridge algorithm is specifically structured so that this single party can move a token on one network to another network in a trustless model. If either side of the transaction fails to process, the user’s tokens are unlocked on the originating network.
The methodology ultimately only allows for one of two options:
Any party can be an operator of the StakerBridge protocol. That party can deploy the open-source StakerBridge software, configure the send and receive reservoirs, and optionally, designate a fee for a successful bridging of tokens. In order for a bridge to occur, a reservoir of tokens must reside on both the originating and receiving networks, and the operator is responsible for facilitating tokens in reservoirs on both sides of the bridge. Should insufficient tokens be available for the bridge, the protocol always gracefully fails and returns the funds to the originating address of the party.
The process occurs as follows:
In this scenario, StakerDAO is the Operator (The operator server is the software that listens for requests to bridge) of this StakerBridge implementation, and our user is “Alice”.
After the server has withdrawn Alice’s tokens on Blockchain A, Alice can then unlock her tokens at any time on Blockchain B. The server has no ability to prevent Alice from performing this action because the server has revealed "S".
If the server never begins the process of transferring Alice’s tokens to the reservoir, then both the server and Alice’s tokens are unlocked after a period of time, 48hrs and 24hrs, respectively.
Summary: StakerDAO will act as an Operator, which will listen to requests from users like Alice to bridge their asset (BLND, wALGO, wXTZ, STKR) from one blockchain network to another. When Alice signals an intent to ‘bridge’, the Operator confirms and generates a secret “S” while sharing hash “H” with Alice. Alice will lock her tokens on her respective network and the Operator will lock an equivalent amount on the network Alice would like to bridge to. The Operator now locks Alice’s tokens into a reservoir and allows Alice to withdraw the Operator’s locked tokens.
Where can I find the contracts for StakerBridge?
These contracts are prototypes and continue to be under development: