StakerBridge Protocol
Bridging the Cross-Chain DeFi Economy
What is StakerBridge?
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:
The TokenSwap protocol is a modification of a two-party swap as presented by a professor in the computer science department at Brown University in July of 2018. The paper is titled "Atomic Cross-Chain Swaps" and the link to the paper is here: https://dl.acm.org/doi/pdf/10.1145/3212734.3212736. The paper outlines a methodology for which two parties can exchange their tokens without the need to trust each other.
Decentralizing the management of StakerBridge
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 StakerBridge process
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.
How to Bridge from Ethereum to Tezos
In the following example, we’ll walk through how to bridge the BLND token from Ethereum to Tezos using StakerBridge.
NOTE: If you’d like to move more than 10,000 BLND, please reach out to us through Discord.
Step 1: First, go to bridge-blnd.stakerdao.com.
Step 2: Connect your MetaMask wallet and your Temple (ex. Thanos) wallet. Your screen should look like the below now:
Step 3: Enter an amount on the left hand side that you have on Ethereum, but that you want to move to the Tezos network. Click on “Submit Bridge”
Step 4: The page will then display the maximum time it should take to bridge over as well as the fee it will charge to bridge over. This is a small fee to cover costs for the operator, but you will incur additional fees on Ethereum and Tezos for the transactions.
Step 5: If that all sounds ok to you, click on “Bridge”. MetaMask will pop up and ask you to confirm a transaction. This is one of two transactions on the Ethereum side and the more expensive one. Once confirmed, please wait for several minutes for it to proceed to the 2nd step. Depending on the cost of gas (gwei), this transaction may cost $20-$80.
Note: There is no need to worry or remember the secret Hash at the bottom of the page.
Step 6: After some minutes pass by, the “Confirm” button will turn blue. Please click on it and confirm the second transaction on the Ethereum side. In tests, it could take 10-20 minutes for this to occur.
Step 7: The 2nd phase will also take a few minutes to complete, but after it does, a “Withdraw” button will appear in blue. This is a transaction on the Tezos side within the Temple wallet. The cost of the transaction on this side will be negligible as it stands today. Click on “Withdraw” to proceed.
Step 8: Your tokens should appear in your wallet now! You can click on “Remove Bridge” to clear the page. You can now use your tokens on the Tezos network and a later date, use this process to move your tokens back to Ethereum. Congrats!
Step 9: If your bridge gets stuck at any point after phase 1 or 2 and does not progress, you must wait for the timer to run out. At that point, a red button named “Refund” will appear and allow you to retrieve your tokens back. Please complete the “Refund” process before the new timer expires or it will be very difficult to retrieve your tokens.
For community-supported help in this process, please visit the StakerBridge channel on the StakerDAO Discord.
You can also view this video on “How to bridge BLND from Ethereum to Tezos”
How to Bridge from Tezos to Ethereum
In the following example, we’ll walk through how to bridge the wXTZ token from Tezos to Ethereum using StakerBridge.
NOTE: If you’d like to move more than 10,000 wXTZ, please reach out to us through Discord.
Step 1: First, go to bridge-wxtz.stakerdao.com.
Step 2: Connect your MetaMask wallet and your Temple (ex. Thanos) wallet. Your screen should look like the below now:
Step 3: Enter an amount on the right hand side that you have on Tezos, but that you want to move to the Ethereum network. Click on “Submit Bridge”
Step 4: The page will then display the maximum time it should take to bridge over as well as the fee it will charge to bridge over. This is a small fee to cover costs for the operator, but you will incur additional fees on Ethereum and Tezos for the transactions.
Step 5: If that all sounds ok to you, click on “Bridge”. Temple will pop up and ask you to confirm a transaction. This is one of two transactions on the Tezos side, however, both are largely negligible. Once confirmed, please wait for several minutes for it to proceed to the 2nd phase.
Note: There is no need to worry or remember the secret Hash at the bottom of the page.
Step 6: After some minutes pass by, the “Confirm” button will turn blue. Please click on it and confirm the second transaction on the Tezos side. In tests, it could take 10-20 minutes for this to occur.
Step 7: The 2nd phase will also take a few minutes to complete, but after it does, a “Withdraw” button will appear in blue. This is a transaction on the Ethereum side within the MetaMask wallet. Click on “Withdraw” to proceed.
Step 8: Your tokens should appear in your wallet now! You can click on “Remove Bridge” to clear the page. You can now use your tokens on the Ethereum network and at a later date, use this process to move your tokens back to Tezos. Congrats!
Step 9: If your bridge gets stuck at any point after phase 1 or 2 and does not progress, you must wait for the timer to run out. At that point, a red button named “Refund” will appear and allow you to retrieve your tokens back. Please complete the “Refund” process before the new timer expires or it will be very difficult to retrieve your tokens.
For community-supported help in this process, please visit the StakerBridge channel on the StakerDAO Discord.
You can also view this video on “How to bridge wXTZ from Tezos to Ethereum”
StakerBridge Audit by Trail of Bits
Where can I find the contracts for StakerBridge?
These contracts are prototypes and continue to be under development:
Last updated