default
Defined in: protocol-lending-mellow-evm/src/protocol.ts:296
Mellow Core Vaults for EVM wallet accounts — Lido’s Earn vaults (EarnETH, EarnUSD, stRATEGY) and any other vault on the same contracts.
A Core Vault holds LP money that a curator allocates across DeFi through verified sub-vault calls; LPs hold vault shares (earnETH, earnUSD, …) priced by the vault’s oracle once per report (~daily). Money moves through per-asset queues the vault itself lists on-chain:
- supply —
depositinto the asset’s queue. The synchronous queue mints shares in the same transaction at the last report’s price (used first wheninstantis on); the asynchronous queue records a request that the next report prices, after which the shares are counted in the account’s balance without any further action (claimSharesonly moves them physically). One open async request per account; cancellable until it is priced (cancelSupply). - withdraw —
redeem(shares)on the asset’s redeem queue: the shares burn at once, the request is not cancellable, the next report at leastredeemIntervallater prices it, the curator pulls liquidity, andclaimWithdrawalspays the asset out. That second phase is what makes this a two-step withdraw;getWithdrawalRequestsreports the queue.
Reads run through the account’s provider (viem). Every queue is found
on-chain (getQueueCount / queueAt, classified by the methods it
answers) and re-verified against the vault (hasQueue, direction, pause)
before money touches it; a suspicious oracle report or a whitelist gate
refuses instead of pricing blindly. Mellow’s registry only decorates.
borrow / repay reject: a vault does not lend.
Extends
Section titled “Extends”LendingProtocol<MellowProtocolConfig>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new default(
account,config?):MellowProtocolEvm
Defined in: protocol-lending-mellow-evm/src/protocol.ts:316
Creates a new interface to a Mellow Core Vault for evm blockchains.
Parameters
Section titled “Parameters”account
Section titled “account”The wallet account (a @anywalletkit/wallet-evm account, or a read-only { getAddress } one for views).
config?
Section titled “config?”MellowProtocolConfig = {}
The protocol’s configuration.
Returns
Section titled “Returns”MellowProtocolEvm
Overrides
Section titled “Overrides”LendingProtocol<MellowProtocolConfig>.constructor
Properties
Section titled “Properties”_account
Section titled “_account”
protectedreadonly_account:IWalletAccountReadOnly|IWalletAccount
Defined in: core/dist/index-QWdcwE6y.d.ts:309
Inherited from
Section titled “Inherited from”LendingProtocol._account
_config
Section titled “_config”
protectedreadonly_config:MellowProtocolConfig
Defined in: core/dist/index-QWdcwE6y.d.ts:310
Inherited from
Section titled “Inherited from”LendingProtocol._config
readonlyvault:string
Defined in: protocol-lending-mellow-evm/src/protocol.ts:298
The vault this protocol talks to.
Methods
Section titled “Methods”_getSupplyPlan()
Section titled “_getSupplyPlan()”
protected_getSupplyPlan(token,amount,__namedParameters?):Promise<SupplyPlan>
Defined in: protocol-lending-mellow-evm/src/protocol.ts:636
The transaction(s) a supply needs and the queue it goes to.
Parameters
Section titled “Parameters”string
The asset.
amount
Section titled “amount”bigint
The amount (base units).
__namedParameters?
Section titled “__namedParameters?”instant?
Section titled “instant?”boolean = ...
Returns
Section titled “Returns”Promise<SupplyPlan>
_getWithdrawPlan()
Section titled “_getWithdrawPlan()”
protected_getWithdrawPlan(token,shares):Promise<WithdrawPlan>
Defined in: protocol-lending-mellow-evm/src/protocol.ts:776
Parameters
Section titled “Parameters”string
The payout asset.
shares
Section titled “shares”bigint
Shares to redeem.
Returns
Section titled “Returns”Promise<WithdrawPlan>
borrow()
Section titled “borrow()”borrow(
_options):Promise<never>
Defined in: protocol-lending-mellow-evm/src/protocol.ts:875
Always rejects: a Mellow vault does not lend.
Parameters
Section titled “Parameters”_options
Section titled “_options”unknown
Returns
Section titled “Returns”Promise<never>
Overrides
Section titled “Overrides”LendingProtocol.borrow
cancelSupply()
Section titled “cancelSupply()”cancelSupply(
__namedParameters?):Promise<{fee:bigint;hash:string; }>
Defined in: protocol-lending-mellow-evm/src/protocol.ts:744
Cancels the account’s open asynchronous deposit request for an asset (only before a report prices it).
Parameters
Section titled “Parameters”__namedParameters?
Section titled “__namedParameters?”token?
Section titled “token?”string
Returns
Section titled “Returns”Promise<{ fee: bigint; hash: string; }>
claimShares()
Section titled “claimShares()”claimShares(
__namedParameters?):Promise<{fee:bigint;hash:string; }>
Defined in: protocol-lending-mellow-evm/src/protocol.ts:760
Moves shares a report already priced from the asset’s deposit queue to the account. Optional — balances count them either way; cheap and idempotent.
Parameters
Section titled “Parameters”__namedParameters?
Section titled “__namedParameters?”token?
Section titled “token?”string
Returns
Section titled “Returns”Promise<{ fee: bigint; hash: string; }>
claimWithdrawals()
Section titled “claimWithdrawals()”claimWithdrawals(
options?):Promise<{assets:object[];fee:bigint;hashes:string[]; }>
Defined in: protocol-lending-mellow-evm/src/protocol.ts:848
Claims processed redemptions — the asset lands on the account. One
transaction per payout asset; token picks one, otherwise every asset
with claimable requests is swept in sequence.
Parameters
Section titled “Parameters”options?
Section titled “options?”Restrict to a payout asset and/or specific request timestamps.
timestamps?
Section titled “timestamps?”number[]
token?
Section titled “token?”string
Returns
Section titled “Returns”Promise<{ assets: object[]; fee: bigint; hashes: string[]; }>
The transactions sent and what they claim.
describeActivity()
Section titled “describeActivity()”describeActivity(
tx,ctx):ActivityItem|null
Defined in: protocol-lending-mellow-evm/src/protocol.ts:934
Recognize Mellow queue transactions offline (deposit, cancelDepositRequest,
claim on deposit queues; redeem, claim on redeem queues) for the preset
vaults and the vault this instance targets. See activity.ts for the rule.
Parameters
Section titled “Parameters”ChainTx
DescribeActivityContext
Returns
Section titled “Returns”ActivityItem | null
Overrides
Section titled “Overrides”LendingProtocol.describeActivity
getApr()
Section titled “getApr()”getApr():
Promise<number>
Defined in: protocol-lending-mellow-evm/src/protocol.ts:923
The vault’s APY in percent, from Mellow’s registry.
Returns
Section titled “Returns”Promise<number>
getPosition()
Section titled “getPosition()”getPosition(
options?):Promise<Position>
Defined in: protocol-lending-mellow-evm/src/protocol.ts:556
The account’s position: shares, their value in token at the latest
report, and what sits in the queues.
Parameters
Section titled “Parameters”options?
Section titled “options?”Asset to value the shares in (default native, or the first vault asset when the vault has no native leg).
token?
Section titled “token?”string
Returns
Section titled “Returns”Promise<Position>
getReport()
Section titled “getReport()”getReport(
token?):Promise<OracleReport>
Defined in: protocol-lending-mellow-evm/src/protocol.ts:493
The oracle’s latest report for an asset: shares per one unit of the asset (1e18 fixed point).
Parameters
Section titled “Parameters”token?
Section titled “token?”string
The asset (default native).
Returns
Section titled “Returns”Promise<OracleReport>
getShares()
Section titled “getShares()”getShares():
Promise<bigint>
Defined in: protocol-lending-mellow-evm/src/protocol.ts:544
Vault shares the account holds (18 decimals), including shares priced by a report but not yet physically claimed.
Returns
Section titled “Returns”Promise<bigint>
getStats()
Section titled “getStats()”getStats():
Promise<Stats|null>
Defined in: protocol-lending-mellow-evm/src/protocol.ts:899
The vault’s entry in Mellow’s registry: APY, TVL, average withdrawal time. Null when the registry is disabled, unreachable, or does not list the vault.
Returns
Section titled “Returns”Promise<Stats | null>
getVaultData()
Section titled “getVaultData()”getVaultData(
__namedParameters?):Promise<VaultData>
Defined in: protocol-lending-mellow-evm/src/protocol.ts:413
The vault’s components, assets and queues as the chain reports them,
plus the fee and oracle parameters. Cached per instance (queues change
rarely); pass { refresh: true } to re-read.
Parameters
Section titled “Parameters”__namedParameters?
Section titled “__namedParameters?”refresh?
Section titled “refresh?”boolean = false
Returns
Section titled “Returns”Promise<VaultData>
getWithdrawalRequests()
Section titled “getWithdrawalRequests()”getWithdrawalRequests():
Promise<WithdrawalRequestsView>
Defined in: protocol-lending-mellow-evm/src/protocol.ts:822
The account’s redemption queue across every payout asset: requests newest first, shares still waiting, and what is claimable per asset.
Returns
Section titled “Returns”Promise<WithdrawalRequestsView>
quoteBorrow()
Section titled “quoteBorrow()”quoteBorrow(
_options):Promise<never>
Defined in: protocol-lending-mellow-evm/src/protocol.ts:880
Always rejects.
Parameters
Section titled “Parameters”_options
Section titled “_options”unknown
Returns
Section titled “Returns”Promise<never>
Overrides
Section titled “Overrides”LendingProtocol.quoteBorrow
quoteRepay()
Section titled “quoteRepay()”quoteRepay(
_options):Promise<never>
Defined in: protocol-lending-mellow-evm/src/protocol.ts:890
Always rejects.
Parameters
Section titled “Parameters”_options
Section titled “_options”unknown
Returns
Section titled “Returns”Promise<never>
Overrides
Section titled “Overrides”LendingProtocol.quoteRepay
quoteSupply()
Section titled “quoteSupply()”quoteSupply(
__namedParameters):Promise<{fee:bigint;instant:boolean;queue:string;sharesOut:bigint; }>
Defined in: protocol-lending-mellow-evm/src/protocol.ts:736
Quotes a supply: network fee (approvals included), shares at the latest report, and the queue it would take.
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”Returns
Section titled “Returns”Promise<{ fee: bigint; instant: boolean; queue: string; sharesOut: bigint; }>
Overrides
Section titled “Overrides”LendingProtocol.quoteSupply
quoteWithdraw()
Section titled “quoteWithdraw()”quoteWithdraw(
__namedParameters):Promise<{assetsOut:bigint;fee:bigint;queue:string; }>
Defined in: protocol-lending-mellow-evm/src/protocol.ts:813
Quotes a redemption request: network fee and the payout at the latest report (after the redeem fee).
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”Returns
Section titled “Returns”Promise<{ assetsOut: bigint; fee: bigint; queue: string; }>
Overrides
Section titled “Overrides”LendingProtocol.quoteWithdraw
repay()
Section titled “repay()”repay(
_options):Promise<never>
Defined in: protocol-lending-mellow-evm/src/protocol.ts:885
Always rejects.
Parameters
Section titled “Parameters”_options
Section titled “_options”unknown
Returns
Section titled “Returns”Promise<never>
Overrides
Section titled “Overrides”LendingProtocol.repay
requireSigningAccount()
Section titled “requireSigningAccount()”
protectedrequireSigningAccount(methodName):IWalletAccount
Defined in: core/dist/index-QWdcwE6y.d.ts:322
The account, narrowed to a signing one, or a ReadOnlyAccountError naming the caller.
Parameters
Section titled “Parameters”methodName
Section titled “methodName”string
Returns
Section titled “Returns”IWalletAccount
Inherited from
Section titled “Inherited from”LendingProtocol.requireSigningAccount
supply()
Section titled “supply()”supply(
options):Promise<SupplyResult>
Defined in: protocol-lending-mellow-evm/src/protocol.ts:701
Supplies an asset to the vault. ERC-20 legs approve first (awaited to a mined receipt); the synchronous queue is used when it can mint at once, otherwise the request enters the asynchronous queue and the next report prices it.
Parameters
Section titled “Parameters”options
Section titled “options”token (address or ‘native’) and amount in base units. onBehalfOf is not supported.
Returns
Section titled “Returns”Promise<SupplyResult>
The result, whether shares minted at once, and the queue used.
Overrides
Section titled “Overrides”LendingProtocol.supply
withdraw()
Section titled “withdraw()”withdraw(
options):Promise<WithdrawResult>
Defined in: protocol-lending-mellow-evm/src/protocol.ts:802
Requests a redemption: amount is in shares (the only unit known
before the report); they burn at once and the request is not cancellable.
The payout in token becomes claimable after the next report that is at
least redeemInterval later and the curator’s liquidity handling —
see getWithdrawalRequests and claimWithdrawals.
Parameters
Section titled “Parameters”options
Section titled “options”token = payout asset, amount = shares. to is not supported.
Returns
Section titled “Returns”Promise<WithdrawResult>
The result, the queue and the estimated payout.
Overrides
Section titled “Overrides”LendingProtocol.withdraw