Technical Architecture
Last updated
Last updated
Learn about all the internal (core and periphery) and external (EigenLayer and LayerZero) components, which together constitute the Layerless protocol.
Layerless Liquid Restaked Token (LRT) is a base contract that is responsible for:
passing restaking and withdrawal requests to the appropriate LayerlessStaker contract.
representing liquid (transferable, composable) restaked in EigenLayer LST in a 1:1 correlation.
EigenLayer restaking rewards management via snapshotting every token transfer, total supply changes (minting on restake and burning on withdrawal).
claiming EigenLayer rewards (native and various ERC-20).
mapping EigenLayer Operators to LayerlessStaker contracts.
utilizing EigenLayer Operators' priority that will be further governed by Layerless Token Stakers (choosing Delegators, therefore having an impact on rewards generated by Layerless Restakers).
The LRT contract inherits from ERC-20 and V2 OFT (Omnichain Fungible Token) contracts.
This contract manages EigenLayer deposits, delegation, and withdrawals. It accepts calls only from the corresponding LRT contract. LayerlessStaker is always unique per an LRT and Operator pair.
Stakers might delegate to operators that offer maximum rewards on delegated stake. - EigenLayer Docs.
The primary entry and exit point for funds into and out of EigenLayer.
This contract is for managing deposits in different strategies. The main functionalities are:
adding and removing strategies that any delegator can deposit into,
enabling deposit of assets into specified strategy.
Layerless LRT contracts call the StrategyManager's depositIntoStrategy
function to enable restaking while keeping the users' funds liquid.
This is the contract for delegation and undelegation in EigenLayer. The appropriate LayerlessStaker contract calls the delegateTo
function to delegate its restaked balance to the corresponding Operator.
The LayerZero Endpoint is an immutable smart contract that implements a standardized interface for OApps to manage security configurations and seamlessly send and receive messages.
The LRT contract calls the Endpoint's send
function to transfer tokens to another chain and the quote
function to estimate the cross-chain transaction fee.
Any external contract integrating the Layerless Core contracts to enable or extend, for instance, the following use cases:
utilizing Layerless LRTs as lending collateral.
User calls selected LRT's restake
function. Each LST has its corresponding Layerless LRT.
The LRT transfers the user's LST to the appropriate LayerlessStaker contract (mapped by EigenLayer Operators with the priority set by Layerless Token Stakers).
LayerlessStaker deposits LST to EigenLayer (delegateIntoStrategy
) and afterward (on Layerless Governance/DAO call) delegates obtained EigenLayer Strategy's shares (delegateTo
) to the corresponding Operator to maximize restaking rewards.
The LRT contract mints tokens to the user in an amount equal to the restaked LST, therefore representing liquid restaked tokens.
User calls selected LRT's unstake
function.
The LRT contract burns the selected amount of tokens.
The LRT contract calls the corresponding LayerlessStaker contract's (mapped by the iterated Operator) unstake
function.
The LRT contract iterates through Operators (and corresponding LayerlessStakers) as long as the selected amount is fully withdrawn. Usually, it will the a single iteration (Operator/LayerlesStaker with the lowest priority). If iterated LayerlessStaker already has all its LSTs (restaked balance) withdrawn, the next one is checked.
The User can track the status and complete the withdrawal (after EigenLayer's delay period) via the EigenLayer application.
LayerZero is the Omnichain Interoperability Protocol (cross-chain messaging) that enables our contracts to be transferred between chains. Every Layerless LRT is LayerZero's .
trading LRTs (and providing liquidity), including on chains other than Ethereum, to simplify .
The LRT contract iterates through the EigenLayer Operators list starting from the ones with the that will be set in the future by Layerless Token Stakers.
The Staker contract calls the EigenLayer 's queueWithdrawal
function to initialize the user's withdrawal. On Mainnet, it currently takes EigenLayer ~7 days to make a withdrawal claimable by the user.