A protocol which enables users to stake LIDO's stETH into EigenLayer to earn extra rewards. The system takes stETH deposits and mints the right amount of Yield Token(yETH) based on the user's deposit, taking in consideration the total assets in the system and their appreciation over time based on staking rewards. Users can also withdraw their staked ETH but only after it has been withdrawn from EigenLayer by the admin.
The admin, A Safe MultiSig Wallet, controls features such as pausing Yield Token transfers, withdrawing stETH from EigenLayer, delegating and undelegating operators.
Before you begin, you need to install the following tools:
- Node (v18 LTS)
- Yarn (v1 or v2+)
- Git
Then download the challenge to your computer and install dependencies by running:
git clone https://github.com/ValentineCodes/yield.git
cd yield
yarn installRun tests -
Must have data connection due to Holesky testnet fork
yarn testIn the same terminal, deploy contracts to Holesky testnet
Must set the enviromnent variables in foundry as specified in .env.example and the signers in Deploy.s.sol
yarn deploy:verifyin a second terminal, start your frontend:
yarn startπ± Open http://localhost:3000 to see the app.
In a third terminal window, run your local backend server:
cd yield
yarn backend-localπ The first step is to configure the owners, who will be able to propose, sign and execute transactions.
You can set the signers in the frontend, using the "Owners" tab:
In this tab you can start your transaction proposal to either add or remove owners.
π Fill the form and click on "Create Tx".
This will take you to a populated transaction at "Create" page:
Create & sign the new transaction, clicking in the "Create" button:
You will see the new transaction in the pool (this is all offchain).
You won't be able to sign it because on creation it already has one signature (from the frontend account).
Click on the ellipsses button [...] to read the details of the transaction.
β½οΈ Give your account some gas at the faucet and execute the transaction.
β Click on "Exec" to execute it, will be marked as "Completed" on the "Pool" tab, and will appear in the "Multisig" tab with the rest of executed transactions.
You'll need to fund your Multisig Wallet
You can find the address of the Multisig in the "Multisig" and "Debug Contracts" tabs.
Create a transaction in the "Create" tab to send some funds to one of your signers, or to any other address of your choice:
π This time we will need a second signature (remember we've just updated the number of signatures required to execute a transaction to 2).
Switch account and sign the transaction with enough owners:
(You'll notice you don't need β½οΈgas to sign transactions).
Execute the transaction to transfer the funds:
π This will take you to the Pool to sign and execute the transaction
π Withdrawals on EigenLayer take a while to complete. Queued withdrawals will appear like this π after being executed.
π After the minWithdrawalDelayBlocks(currently 10) is passed from the time of queue execution, You can complete withdrawal
π You can deposit stETH into EigenLayer and get some yETH token
(This will fail if there's no delegated operator in the system)
π You can withdraw your staked stETH by burning your specified yETH tokens
(This will fail if admin has not completely withdrawn staked stETH from EigenLayer)








