Recursive Lending Loop Executor
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
Recursive Lending Loop Executor lets you execute a recursive lending loop in a single batched transaction—depositing collateral, borrowing against it, depositing the borrowed amount, and repeating the cycle a specified number of times to maximize leverage. Instead of manually performing each deposit and borrow step separately (which would require multiple transactions and gas fees), you configure the collateral token, borrow token, initial deposit amount, and the number of loop iterations. The tool executes the entire sequence in one transaction, amplifying your exposure to the underlying asset. This is essential for DeFi users who want to maximize their capital efficiency through leverage, but comes with significant risk.
HOW TO USE
Connect your EVM wallet and select the network. Enter the lending protocol contract address, the collateral token address, the borrow token address, and the initial deposit amount in wei. Set the number of loop iterations (1 to 5). Click "Check protocol" to verify your balance, the protocol's max LTV, liquidation threshold, and the maximum borrow amount per loop. Review the details, then click "Execute recursive loop" to run the sequence. The tool approves the collateral token, then repeatedly deposits and borrows according to the specified iterations, all in one transaction.
TECHNICAL MECHANISM
The tool first checks the user's token balance, the protocol's max LTV (loan-to-value ratio), and liquidation threshold. For each iteration, it performs: (1) deposit() of the current amount into the lending protocol, (2) borrow() against the deposited collateral up to the max LTV, and (3) uses the borrowed amount as the deposit for the next iteration. This creates a recursive leverage effect where each cycle increases the total position size. The tool uses receipt.effectiveGasPrice for accurate gas reporting and provides progress feedback during each iteration. The number of iterations determines the final leverage (effective leverage = iterations + 1).
WHAT IT CANNOT SEE
This tool cannot execute recursive loops if the user's collateral is insufficient or if the protocol does not support the required operations—these conditions are verified before proceeding. It relies on the lending protocol implementing the specific deposit/borrow interface; protocols with non-standard lending mechanics (e.g., requiring approvals for each operation, different function signatures) are not supported. The tool cannot guarantee that the loop will be profitable—leverage amplifies both gains and losses. It also cannot guarantee that liquidation will be avoided—if the collateral value drops, the position may be liquidated. Gas costs scale with the number of iterations.
PLEASE NOTE
Recursive lending loops carry significant risk—you can lose your entire collateral. Ensure you understand the leverage mechanics, max LTV, and liquidation threshold before executing. The lending 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.