Lending Protocol Integration Test Scenario Builder
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
This tool builds comprehensive test scenarios for lending protocol integration testing by generating realistic function calls for all common lending operations. It analyzes the specified pool contract and token pairs to produce ready-to-use test scenarios covering supply, withdraw, borrow, repay, liquidation, and collateral management. Each scenario includes the function signature, parameter names, and realistic mock values derived from on-chain state—including asset addresses, amounts, interest rate modes, referral codes, and user addresses. Results are presented as structured test cases that can be directly integrated into test suites, CI/CD pipelines, or development environments. This is essential for developers building on Aave, Compound, or similar lending protocols, auditors testing integration correctness, and teams ensuring robust error handling across different lending operations.
HOW TO USE
Connect your wallet (read-only, no transaction required) and select the target network. Enter the protocol name, pool contract address, and the addresses of the two tokens you want to test with (collateral and borrow asset). Click "build lending scenarios" and the tool will verify the pool contract, fetch token metadata, and generate a suite of test scenarios. Results display a summary of the protocol and token configuration, a series of scenario cards showing each test case with its function signature and parameters, and a detailed table of all generated scenarios. Use the generated scenarios to populate your test harness, validate function signatures against your application's expectations, or simulate lending interactions in a local test environment.
TECHNICAL MECHANISM
The generator uses ethers.js v5.7.2 to perform a multi-stage scenario building process. First, it calls eth_getCode to verify the pool contract is deployed at the provided address. It then attempts to fetch token metadata—including decimals and symbols—via standard ERC20 view functions. Using a comprehensive mapping of common lending protocol interfaces (Aave V2/V3, Compound V2/V3), the tool generates scenarios for each supported operation: supply, withdraw, borrow, repay, liquidationCall, setUserUseReserveAsCollateral, getUserAccountData, and getReserveData. For each scenario, the tool constructs realistic parameter values based on the token decimals and typical test values—for example, amounts are set to 1e18 for 18-decimal tokens, interest rate modes default to variable (2), and referral codes are set to 0. The generated scenarios include full parameter lists with descriptions, making them immediately usable in integration test suites without additional configuration.
WHAT IT CANNOT SEE
This tool cannot execute actual lending transactions or simulate state changes that depend on external conditions such as oracle prices, interest rate updates, or liquidation penalties without forking the chain. It cannot test scenario paths that require specific transaction ordering or complex multi-step interactions (e.g., supply then borrow, or borrow then repay with interest). The tool is limited by the RPC provider's rate limits and block range availability for historical log queries, which may affect token metadata lookup. It cannot validate integration against lending protocols that are not verified or have custom implementations that deviate from standard Aave/Compound interfaces—the tool relies on common interface patterns. It cannot test scenarios that depend on cross-chain lending state or off-chain credit data. The generated scenarios are simplified representations and may not capture all possible edge cases, collateral types, or market conditions such as variable interest rates or liquidation penalties.
PLEASE NOTE
This is a read‑only analytics tool—it never submits transactions or signs anything. It is designed for EVM‑compatible chains and works best with standard lending protocol interfaces (Aave, Compound, etc.). The generated scenarios are for development and testing purposes only and should not be used in production environments. Always verify function signatures and parameter types against the actual pool ABI before using in your test suite. Interest rate modes (stable vs. variable) may vary between protocols—verify the correct values for your target protocol.