Technical Architecture
Learn about all the internal (core and periphery) and external (EigenLayer and LayerZero) components, which together constitute the Layerless protocol.
Core
LRT
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 OpenZeppelin ERC-20 and LayerZero V2 OFT (Omnichain Fungible Token) contracts.
Each LST supported by EigenLayer and Layerless has its corresponding Layerless LRT contract. The advantage of this approach, as opposed to the basket approach, is the lack of shared risk of individual LRT contracts, as well as a much easier valuation of LRT (1:1 to LST) by third-party DeFi protocols. Separating LRTs also allows us to quickly add and enable every LST supported by EigenLayer.
Staker
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.
DelegationGovernor
TBA: Layerless Token Stakers will periodically vote on EigenLayer Operators' priority. Withdrawals (undelegations) will be handled starting from the Operators with the lowest priority. Operators will be able to conditionally incentivize the stakers for a selected outcome.
EigenLayer
StrategyManager
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.
DelegationManager
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.
LayerZero
LayerZero is the Omnichain Interoperability Protocol (cross-chain messaging) that enables our Omnichain LRT contracts to be transferred between chains. Every Layerless LRT is LayerZero's Omnichain Application (OApp).
Endpoint
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.
Periphery
Any external contract integrating the Layerless Core contracts to enable or extend, for instance, the following use cases:
utilizing Layerless LRTs as lending collateral.
trading LRTs (and providing liquidity), including on chains other than Ethereum, to simplify gaining exposure to EigenLayer restaking.
Layerless Restaking technical flow:
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.
Layerless Unstaking technical flow:
User calls selected LRT's
unstake
function.The LRT contract burns the selected amount of tokens.
The LRT contract iterates through the EigenLayer Operators list starting from the ones with the lowest priority that will be set in the future by Layerless Token Stakers.
The LRT contract calls the corresponding LayerlessStaker contract's (mapped by the iterated Operator)
unstake
function.The Staker contract calls the EigenLayer DelegationManager'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.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.
Last updated