βΌοΈDeprecation Guide
Ion Protocol β Deprecation Guide
Ion Protocol is being deprecated. This document explains how to fully exit each type of position without using the frontend application. All transactions can be executed directly through a block explorer such as Basescan.
Contract Addresses
All deployed contract addresses can be found in Deployed Contracts
The examples in this guide use the weETH/WETH market on Base.
IonPool (weETH/WETH)
Ion LRT Vault
Liquidation
1. How to Exit a Borrow Position
A borrow position consists of:
Collateral deposited into IonPool (weETH in this market)
Debt denominated in the pool's base asset (WETH in this market)
Important: The dust minimum debt value is set to zero. This means you must repay the entire loan in one transaction β partial repayments are not supported. The recommended path is to use the
repayFullAndWithdrawfunction on the Handler contract, which handles the accruing interest rate calculation for you automatically.
Step 1 β Look up your current position
Go to Basescan and open the IonPool contract at 0x00000000000fA8e0FD26b4554d067CF1856De7F5. Navigate to the Read Contract tab and call:
collateral(ilkIndex, yourAddress)β returns your locked collateral amount in WAD (18 decimals).ilkIndexshould be0.
normalizedDebt(ilkIndex, yourAddress)β returns your normalized (principal-only) debt in WAD.ilkIndexshould be0.
Step 2 β Identify the base asset you need to repay
The base asset is the token you originally borrowed. To look it up on-chain:
Go to the IonPool contract on Basescan and navigate to the Read Contract tab.
Call
underlying()β this returns the ERC-20 address of the base asset (WETH on Base at0x4200000000000000000000000000000000000006).Open that token contract on Basescan to confirm the symbol (e.g. "WETH"). This is the token you must hold in your wallet in order to repay.
Step 3 β Approve the Handler to spend your base asset
The Handler will pull the repayment amount from your wallet. You must first grant it an allowance.
Open the WETH token contract at
0x4200000000000000000000000000000000000006on Basescan.Go to the token's Write Contract tab.
Call
approve(spender, amount):spender:0x2A010d84933c9fe7c1d336Fa991FE23743e38EC9(Handler address)amount: Use115792089237316195423570985008687907853269984665640564039457584007913129639935(max uint256) to avoid needing to calculate the exact amount with interest.
Step 4 β Call repayFullAndWithdraw on the Handler
repayFullAndWithdraw on the HandlerGo to Basescan and open the Handler contract at
0x2A010d84933c9fe7c1d336Fa991FE23743e38EC9.Navigate to the Write Contract tab.
Call
repayFullAndWithdraw(collateralToWithdraw):collateralToWithdraw: The collateral amount you noted in Step 1. This must be in WAD (18 decimal units). For example, 1 weETH =1000000000000000000.
What this function does atomically:
Fetches your current
normalizedDebtand the liveratefrom IonPool.Calculates the exact repayment amount (rounding up to avoid dust).
Pulls the WETH repayment from your wallet and repays all debt on IonPool.
Withdraws the specified collateral from IonPool's internal accounting.
Calls
GemJoin.exitto transfer the weETH collateral tokens back to your wallet.
After this transaction confirms, your vault in IonPool will have zero debt and zero collateral.
2. How to Exit a Lender Position
A lender position consists of interest-bearing tokens held in your wallet, minted when you called supply on IonPool. Your balance automatically grows every block as borrowers pay interest.
Step 1 β Identify the base asset you will receive
When you withdraw, you receive the pool's base asset back in your wallet. To confirm what that token is:
Go to the IonPool contract at
0x00000000000fA8e0FD26b4554d067CF1856De7F5on Basescan and navigate to the Read Contract tab.Call
underlying()β this returns the ERC-20 address of the base asset (WETH on Base at0x4200000000000000000000000000000000000006).
Step 2 β Check your current balance
On the same IonPool Read Contract tab, call:
balanceOf(yourAddress)β returns the current underlying asset value of your position in WAD. This is the amount of WETH you can withdraw right now, including all accrued interest.
Step 3 β Call withdraw on IonPool
withdraw on IonPoolStay on the IonPool contract page.
Navigate to the Write Contract tab.
Call
withdraw(receiverOfUnderlying, amount):receiverOfUnderlying: The address that should receive the WETH (typically your own address).amount: The amount of WETH to withdraw in WAD. Use the value frombalanceOfin Step 2 to fully exit. You may want to use a slightly smaller value to account for any rounding in the final block before your transaction lands.
After this transaction confirms, your interest-bearing token balance on IonPool will be zero and you will have received WETH in your wallet.
3. How to Exit a Vault Position
The Ion LRT Vault is an ERC-4626 vault that holds WETH and supplies it across multiple underlying Ion Protocol lending markets on Base. Your position is represented as vault shares in your wallet.
Step 1 β Check your shares and underlying value
Go to Basescan and open the Ion LRT Vault contract at 0x0000000000895f1D9e978788C6367d47127dd218. On the Read Contract tab, call:
balanceOf(yourAddress)β returns your vault share balance.convertToAssets(shares)β returns the WETH value of your shares at the current exchange rate.maxRedeem(yourAddress)β returns the maximum shares you can currently redeem given available liquidity.
Step 2 β Call redeem on the Vault
redeem on the VaultNavigate to the Write Contract tab on the Ion LRT Vault.
Call
redeem(shares, receiver, owner):shares: The number of vault shares you want to burn (use your fullbalanceOfto fully exit).receiver: The address that should receive the WETH (typically your own address).owner: Your own address (the address holding the shares).
Alternatively, if you want to specify an exact WETH amount rather than a share amount, use withdraw(assets, receiver, owner) instead.
Step 3 β If the transaction reverts with NotEnoughLiquidityToWithdraw
NotEnoughLiquidityToWithdrawThe vault iterates through a withdrawQueue of underlying Ion lending markets. If the underlying liquidity in those markets has been fully borrowed out, there may not be enough free liquidity to fulfill your withdrawal.
In this situation:
Wait: As borrowers repay their loans or are liquidated, liquidity returns to the markets and becomes available for withdrawal.
Check available liquidity: On the IonPool contract(s) supported by the vault, call
liquidity()on the Read Contract tab to see how much WETH is currently available. When liquidity is sufficient to cover your withdrawal amount, retry the transaction.You can also call
maxWithdraw(yourAddress)on the Vault to see the maximum amount currently withdrawable given available liquidity.
The protocol liquidation contract is at
0x00000000009229776762B5e6b865a06afeB4444c. Liquidations will free up collateral and return liquidity to the lending pools over time.
Last updated