Source Code Docs
Last updated
Last updated
Delegator contract for stETH on Eigenlayer
Modifier to allow function calls only from the vault or harvester
Modifier to allow function calls only from the vault
Modifier to allow function calls only from the harvester
Delegate & restake stETH to operator
Delegate stETH to operator
Request withdrawal from eigenlayer
Request withdrawal from eigenlayer
Parameters
assets
uint256
Amount to withdraw
Request withdrawal from eigenlayer
Withdraw stETH from delegator to vault
Get total locked value
Return Values
[0]
uint256
Total locked value
Get withdrawable assets
Return Values
[0]
uint256
Amount of withdrawable assets
Get queued assets
Return Values
[0]
uint256
Amount of queued assets
_Function that should revert when msg.sender
is not authorized to upgrade the contract. Called by {upgradeTo} and {upgradeToAndCall}.
Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
Pause the contract
Unpause the contract
Delegator Beacon contract
Constructor
Parameters
_initBlueprint
address
Initial blueprint address
governance
address
Governance address
Update the blueprint
Parameters
_newBlueprint
address
New blueprint address
Get the implementation address
Return Values
[0]
address
Implementation address
Delegator Factory contract
Modifier to allow function calls only from the vault
Constructor
Parameters
_vault
address
Vault address
Create a new delegator
Parameters
_operator
address
Operator address
Return Values
[0]
address
Delegator address
Delegator contract for stETH on Eigenlayer
StrategyManager for Eigenlayer
DelegationManager for Eigenlayer
stETH strategy on Eigenlayer
Initialize the contract
Parameters
_vault
address
Vault address
_operator
address
Operator address
Modifier to allow function calls only from the vault or harvester
Delegate & restake stETH to operator on Eigenlayer
Parameters
amount
uint256
Amount to delegate
Request withdrawal from eigenlayer
Parameters
assets
uint256
Amount to withdraw
Complete withdrawal request
Parameters
withdrawalInfo
struct WithdrawalInfo[]
Withdrawal info
Record withdrawal request from External requests
Parameters
withdrawal
struct WithdrawalInfo
Withdrawal info
Withdraw stETH from delegator to vault
Get withdrawable assets
Return Values
[0]
uint256
withdrawable assets
Get queued assets
Return Values
[0]
uint256
queued assets
Delegate to operator
SymDelegator Factory contract
Modifier to allow function calls only from the vault
Constructor
Parameters
_vault
address
Vault address
Create a new delegator
Parameters
_collateral
address
Collateral address
Return Values
proxy
address
Delegator address
Delegator contract for wStETH on Symbiotic
Initialize the contract
Parameters
_vault
address
Vault address
_collateral
address
Collateral address
Delegate & restake wStETH to operator on Symbiotic
Parameters
amount
uint256
Amount to delegate
Request withdrawal from Symbiotic
Parameters
assets
uint256
Amount to withdraw
Get the withdrawable assets
Return Values
[0]
uint256
withdrawable assets
Get the queued assets
Return Values
[0]
uint256
queued assets
UltraLRT is a liquid staking vault that allows users to deposit staked assets and receive shares in return. The shares can be redeemed for the underlying assets at any time. Vault will delegate the assets to the delegators and harvest the profit. The vault will also distribute the profits to the holders.
Initialize the UltraLRT contract
Parameters
_governance
address
The address of the governance contract
_asset
address
The address of the asset token
_delegatorBeacon
address
The address of the delegator beacon
_name
string
The name of the token
_symbol
string
The symbol of the token
Upgrade the UltraLRT contract
Parameters
newImplementation
address
The address of the new implementation contract
The maximum amount of assets that can be deposited into the vault
See {IERC4262-maxDeposit}.
Return Values
[0]
uint256
The maximum amount of assets that can be deposited
The maximum amount of shares that can be minted
See {IERC4262-maxMint}.
Return Values
[0]
uint256
The maximum amount of shares that can be minted
set the delegator factory
factory must have the vault set to this vault
Parameters
_factory
address
The address of the delegator factory
set max unresolved epoch
delegation of assets will be stopped if the unresolved epoch is greater than the max unresolved epoch
Parameters
_maxUnresolvedEpochs
uint256
The maximum unresolved epoch
Pause the contract
Unpause the contract
The amount of shares to mint per wei of asset
at genesis.
Each wei of asset
at genesis is worth 10 ** (initialShareDecimals) shares.
Pause the deposit
Unpause the deposit
Deposit assets into the vault
Parameters
assets
uint256
receiver
address
The address of the receiver
Return Values
[0]
uint256
The amount of shares minted
mint specific amount of shares
Parameters
shares
uint256
The amount of shares to mint
receiver
address
The address of the receiver
Return Values
[0]
uint256
The amount of assets minted
Withdraw assets from the vault
See {IERC4262-withdraw}.
Parameters
assets
uint256
The amount of assets to withdraw
receiver
address
The address of the receiver
owner
address
The address of the owner
Return Values
[0]
uint256
The amount of shares burned
Redeem shares from the vault
See {IERC4262-redeem}.
Parameters
shares
uint256
The amount of shares to redeem
receiver
address
The address of the receiver
owner
address
The address of the owner
Return Values
[0]
uint256
The amount of assets redeemed
withdraw from the vault
Parameters
caller
address
The address of the caller
receiver
address
The address of the receiver
owner
address
The address of the owner
assets
uint256
The amount of assets to withdraw
shares
uint256
The amount of shares to burn
Check if the withdrawal can be done
Parameters
assets
uint256
The amount of assets to withdraw
Return Values
[0]
bool
True if the withdrawal can be done
Set the withdrawal escrow
The escrow must have the vault set to this vault @dev existing escrow debt must be zero
Parameters
_escrow
contract WithdrawalEscrowV2
The address of the withdrawal escrow
End the current epoch
Only the harvester can end the epoch anytime for other The epoch can only be ended if the last epoch was ended at least LOCK_INTERVAL
seconds ago
Do liquidation request to delegators
Only the harvester can do the liquidation request
Parameters
assets
uint256
The amount of assets to liquidate
Do liquidation request to delegators
Parameters
assets
uint256
The amount of assets to liquidate
Withdraw from speicific delegator
Parameters
delegator
contract IDelegator
The address of the delegator
assets
uint256
The amount of assets to withdraw
Resolve the debt
Create a new delegator
Parameters
_operator
address
The address of the operator
Drop a delegator
Parameters
_delegator
address
The address of the delegator
Harvest the profit
Collect the delegator debt
will withdraw the liquid assets from the delegators
TODO check for price change on profit and loss
Get the delegator liquid assets
Each time this will check the vault assets, if it meets required assets then it will stop
Parameters
requiredVaultAssets
uint256
The amount of liquid assets required in vault
Delegate the assets to the delegator
Parameters
_delegator
address
The address of the delegator
amount
uint256
The amount of assets to delegate
Current locked profit amount.
Profit unlocks uniformly over LOCK_INTERVAL
seconds after the last harvest
Get the total assets
Get the vault liquid assets
Set the management fee
Set the withdrawal fee
returns the per share assets
handle deposits from native, weth, stEth, wStEth to vaults
Initialize the contract
Parameters
_governance
address
Governance address
_weth
address
WETH address
_stEth
address
stETH address
_wStEth
address
wstETH address
_permit2
address
Permit2 address
Upgrade the contract
Parameters
newImplementation
address
New implementation address
Pause the contract
Unpause the contract
Fallback function to receive native tokens
Deposit native tokens to vault
Parameters
vault
address
Vault address
to
address
Receiver address
Deposit native tokens to vault
Parameters
amount
uint256
Amount to deposit
vault
address
Vault address
to
address
Receiver address
Receive asset from user through permit2
Parameters
token
address
Token address
amount
uint256
Amount to receive
nonce
uint256
Nonce
deadline
uint256
Deadline of the permit2 approval
signature
bytes
Signature of the permit2 approval
Deposit WETH to vault
Parameters
amount
uint256
Amount to deposit
vault
address
Vault address
to
address
Receiver address
nonce
uint256
Nonce
deadline
uint256
Deadline of the permit2 approval
signature
bytes
Signature of the permit2 approval
Deposit stETH to vault
Parameters
amount
uint256
Amount to deposit
vault
address
Vault address
to
address
Receiver address
nonce
uint256
Nonce
deadline
uint256
Deadline of the permit2 approval
signature
bytes
Signature of the permit2 approval
Deposit wStETH to vault
Parameters
amount
uint256
Amount to deposit
vault
address
Vault address
to
address
Receiver address
nonce
uint256
Nonce
deadline
uint256
Deadline of the permit2 approval
signature
bytes
Signature of the permit2 approval
Process deposit from stEth
Parameters
amount
uint256
Amount to deposit
vault
address
Vault address
to
address
Receiver address
Deposit stEth to vault
Parameters
amount
uint256
Amount to deposit
vault
address
Vault address
to
address
Receiver address
Deposit wStEth to vault
Parameters
amount
uint256
Amount to deposit
vault
address
Vault address
to
address
Receiver address
Fee charged to vault over a year, number is in bps
Fee charged on redemption of shares, number is in bps
A timestamp representing when the most recent harvest occurred.
Since the time since the last harvest is used to calculate management fees, this is set to block.timestamp
(instead of 0) during initialization.
The amount of profit originally locked after harvesting from a strategy
Amount of time in seconds that profit takes to fully unlock. See lockedProfit().
Escrow contract for withdrawal requests
The vault asset.
The vault this escrow attached to.
Parameters
_vault
contract UltraLRT
UltraLRT vault address
Modifier to allow function calls only from the vault
Modifier to allow function calls only from the governance
Withdrawal Request event
will makes things easy to search for each user withdrawal requests
Parameters
user
address
user address
epoch
uint256
epoch of the request
shares
uint256
withdrawal vault shares
Register withdrawal request as debt
Parameters
user
address
user address
shares
uint256
amount of vault shares user requested to withdraw
End the epoch
will be called by the vault after closing a position
Get the debt to resolve
Return Values
[0]
uint256
amount of debt to resolve
resolve the locked shares for current epoch
This function will be triggered after closing a position will check for available shares to burn after resolving vault will send the assets to escrow and burn the share
Redeem multiple epochs
Parameters
user
address
user address
epochs
uint256[]
withdrawal request epochs
Return Values
totalAssets
uint256
received
Redeem withdrawal request
Parameters
user
address
address
epoch
uint256
withdrawal request epoch
Return Values
[0]
uint256
received assets
Convert epoch shares to assets
Parameters
user
address
User address
epoch
uint256
withdrawal request epoch
Return Values
[0]
uint256
converted assets
Check if an epoch is completed or not
Parameters
epoch
uint256
Epoch number
Return Values
[0]
bool
True if epoch is completed
Get withdrawable assets of a user
Parameters
user
address
User address
epoch
uint256
The vault epoch
Return Values
[0]
uint256
Amount of assets user will receive
Get withdrawable shares of a user
Parameters
user
address
user address
epoch
uint256
requests epoch
Return Values
[0]
uint256
amount of shares to withdraw
Get total withdrawable assets of a user for multiple epochs
Parameters
user
address
User address
epochs
uint256[]
withdrawal request epochs
Return Values
assets
uint256
total withdrawable assets
sweep the assets to governance
only use case in case of emergency
Parameters
_asset
address
Asset address