Leveraged Yield Position Closer
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Leveraged Yield Position Closer lets you close a leveraged yield position in a single batched transaction. When you want to exit a leveraged position, you need to withdraw from the yield strategy, repay the borrowed funds (plus interest), and collect your remaining collateral (plus any profits). Instead of manually performing these steps separately, you specify the position ID, verify your position details, and execute a one-click close. The tool checks whether you own the position, confirms it is still open, and displays key metrics—collateral, debt, yield earned, and net value—before closing. This is essential for DeFi users who want to efficiently exit leveraged positions and lock in profits or cut losses.
HOW TO USE
Connect your EVM wallet and select the network. Enter the leveraged yield protocol contract address and the position ID (or token ID) of the position you want to close. Click "Check position" to view your position details—the tool verifies ownership, checks if the position is open, and displays collateral, debt, yield earned, and net value. Review the details, then click "Close position" to execute the transaction. The tool withdraws from the yield strategy, repays the debt, and returns the remaining collateral (plus profits) to your wallet in one batched operation.
TECHNICAL MECHANISM
The tool first reads the position details from the leveraged yield protocol using ownerOf() and positions() (or getPosition()) to retrieve the owner, collateral, debt, yield, and open status. It verifies that the connected wallet owns the position and that it is still open. The closing is performed by calling the closePosition() function on the protocol contract. This function typically handles: (1) withdrawing funds from the yield strategy, (2) repaying the borrowed amount plus interest to the lending pool, (3) returning the remaining collateral and any earned yield to the user, and (4) marking the position as closed. The tool uses receipt.effectiveGasPrice for accurate gas reporting and provides progress feedback during the closing process.
WHAT IT CANNOT SEE
This tool cannot close positions that are not owned by the connected wallet or that are already closed—these conditions are verified before proceeding. It relies on the leveraged yield protocol implementing a closePosition() interface; protocols with non-standard close mechanics (e.g., requiring additional approvals, multi-step processes) are not supported. The tool cannot guarantee that the position will be profitable at the time of closing—market conditions may have changed. It also does not handle positions that are in liquidation or require special handling.
PLEASE NOTE
Closing a leveraged position may incur fees or penalties as defined by the protocol. Ensure you understand the protocol's fee structure before closing. The leveraged protocol contract must be trusted; verify its security and audit status before use. This tool is for EVM chains only and does not support non-EVM networks.