project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5

StakeLend

Lending protocol using native validator staked eth as collateral

StakeLend

Created At

ETHGlobal London

Project Description

This projects makes use of ERC-4626 vaults, EIP-4788 and the upcoming EIP-7002 to enable native staked ether to be used as collateral in a decentralized lending protocol. It does so by using a merkle proof to verify the beacon chain balance of the validator using the beacon state root (to decide wheter they should get liquidated/exited in order to compensate lenders). Triggerable exits are implemented to avoid "hostage scenarios" after EIP-7002 is added to ethereum. The protocol is structured as a router that deploys configurable vaults, which lenders can then deposit in as they prefer.

How it's Made

Tech stack: -Foundry -Solidity -ScaffoldEth -> Frontend for DeFi protocol -Streamlit -> Frontend for proof generation -TheGraph -> Indexer for vaults and deposits -Lodestar -> Consensus client for beacon chain API

Partner technologies: -USD Coin -> Used as loaning currency -Chainlink Data Feeds -> Used to price beacon chain ether

Hacky: We used the beacon state root exposed in the EVM in Dencun in order to prove that the validator effective balance and the public key match the ones input in the function. This allows us to trustlesly access this information from the beacon chain without the need of an oracle, and determine if a validator should be liquidated.

background image mobile

Join the mailing list

Get the latest news and updates