Jumpgates facilitate cross-chain token transfers under the Lido DAO incentive programs. Although autonomous, jumpgates are meant to be part of the Easy Track Rewards Program pipeline.
A jumpgate is a simple contract that transfers tokens via a cross-chain token bridge, such as Wormhole, Terra Shuttle, etc. The parameters of the transportation (the token, recipient, bridge) are predefined and immutable for each invididual jumpgate which makes its operation safe and permissionless. Jumpgates also provide permissioned ways to recover ether, ERC20, ERC721 and ERC1155 tokens.
As Ethereum-native Lido expands to other blockchains, jumpgates reduce operational overhead associated with routine cross-chain token transfers under the Lido DAO by providing a permissionless way to bridge tokens.
For further details read ADR.
This project uses Brownie development framework. Learn more about Brownie.
- Python 3.8+
- Poetry 1.1.13
Install project dependendencies from the lockfile,
$ poetry installActivate Poetry virtual environment,
$ poetry shellLearn more about Poetry.
Replace %YOUR-INFURA-PROJECT-ID% below with your actual project id. Learn more about Infura.
$ export WEB3_INFURA_PROJECT_ID=%YOUR-INFURA-PROJECT-ID%Replace %YOUR-ETHERSCAN-TOKEN% below with your actual API key. Learn more about Etherscan API.
$ export ETHERSCAN_TOKEN=%YOUR-ETHERSCAN-TOKEN%The project uses the mainnet-fork network by default. If you want to check your jumpgate deploys or run the test suite on Goerli, you can add goerli-fork by running the following command,
$ brownie networks add "Development" goerli-fork host=http://127.0.0.1 cmd=ganache-cli port=8545 gas_limit=12000000 fork=https://goerli.infura.io/v3/${WEB3_INFURA_PROJECT_ID} chain_id=5 mnemonic=brownie accounts=10 fork=goerliBefore you proceed, please follow Getting Started instructions.
To run the entire test suite, execute the following command,
$ brownie testAlternatively, you can run a specific test module by specifying the path,
$ brownie test tests/test_jumpgate_unit.pyNote! This project uses mainnet-fork by default.
Learn more about Brownie tests.
Before you proceed, please follow Getting Started instructions.
You can add a local account either from a private key or a keystore. If you do not have either of them, consider generating a new account. Learn more about Brownie local accounts.
You can do this by copying the contents of sample.env into .env and filling it out. The necessary variables are listed below,
DEPLOYER- your local account id;OWNER- admin of the jumpgate;TOKEN- address of the ERC20 token you want to transfer;BRIDGE- address of the Wormhole Token Bridge;RECIPIENT_CHAIN- Wormhole id of the target chain, e.g.1for Solana;RECIPIENT- address of the recipient;ARBITER_FEE- bridge arbiter fee, defaults to 0.
$ brownie run scripts/deploy.pyUpon running the script you will prompted to enter the password to your local account. After that, all the deploy parameters will be displayed in your terminal. Confirm them and enter 'y' to proceed. E.g.,
If all is correct, you should be able to see your transaction hash and the address of the jumpgate in the terminal. You will also find the deployment parameters in a newly created JSON file in the deployed directory that is named %NETWORK%-%RECIPIENT%.json.
Specify the newly deployed jumpgate address in JUMPGATE in .env and run the check script.
$ brownie run scripts/check_jumpgate.pyYou should be able to tell whether the deployment was successful by the outputs in the terminal.
Before you proceed, please follow Getting Started instructions.
The bridging of tokens is the core function of jumpgates. You can do it by running the bridging script.
Skip this step if you have already done it in the Deploying a jumpgate section.
You can add a local account either from a private key or a keystore. If you do not have either of them, consider generating a new account. Learn more about Brownie local accounts.
You can do this by copying the contents of sample.env into .env and filling it out. The necessary variables are listed below,
DEPLOYER- your local account id (in case of bridging the variable name is a bit misleading because bridging is permissionless and can be sent by any account with some ether);NETWORK- name of the network your jumpgate was deployed to, e.g.,mainnet,goerli,ropsten, etc.;JUMPGATE- address of the jumpgate you want to active (you can find the list of deployed jumpgates in thedeployeddirectory);
$ brownie run scripts/bridge_tokens.pyUpon running the script you will prompted to enter the password to your local account. After that, all the bridging parameters will be displayed in your terminal. Confirm them and enter 'y' to proceed. E.g.,

If all is correct, you should be able to see your transaction hash in the terminal.

