Legacy architecture. Mellow-LRT is an earlier generation of Mellow vault infrastructure, documented for existing deployments. Core Vaults are Mellow’s current vault architecture.
- Determine smart contract address of the asset user is eligible to withdraw.
-
Call
emergencyWithdrawmethod using abi. Connect wallet to either of https://etherscan.io/,https://eth95.dev/, https://abi.ninja/ and sendemergencyWithdrawtx. Usage of any of the services is not an endorsment, be careful what you sign and do tx simulation beforehand.
User needs to setminAmountsanddeadlineas input parameters.
Here is detailed instruction forminAmounts. minAmountsequalsbaseTvl().amounts * withdrawalReqest.lpAmount / vault.totalSupply() - 1 Gwei.baseTvl()can be found in read method of the same vault contract.baseTvl()function returns two values in an array (for weth and for wsteth), you’ll need to save that for step 3.- Then find
totalSupply()in the vault contract and do the same. - Along with your requested lp amount (can be obtained from withdrawalRequest) copy an array from baseTvl() and for each value from it make the followinh calculation:
baseTvl.amounts[i] * withdrawalReqest.lpAmount / vault.totalSupply() - 1 Gwei - Pass the resulting array to emergencyWithdraw
minAmountsfield.
deadlineis unix timestamp + N minutes while withdrawal is valid.
InputminAmountsarray anddeadlineinto emergencyWithdraw method and send tx. - When your correct tx is confirmed on chain, you’ll see ERC20 token from vault sent to your wallet.