write_account_repay
Repays debt to an Arcadia lending pool using wallet tokens and an existing ERC20 allowance. Check allowance and outstanding debt first, then approve the pool if needed.
Instructions
Repay debt to an Arcadia lending pool using tokens from the wallet (requires ERC20 allowance). To repay using account collateral instead (no wallet tokens needed), use write_account_deleverage. Check allowance first (read_wallet_allowances), then approve the pool if needed (write_wallet_approve). Check outstanding debt with read_account_info.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount in raw units, or 'max_uint256' to repay all debt in full | |
| chain_id | No | Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood) | |
| pool_address | Yes | Lending pool address. Base: LP_WETH=0x803ea69c7e87D1d6C86adeB40CB636cC0E6B98E2, LP_USDC=0x3ec4a293Fb906DD2Cd440c20dECB250DeF141dF1, LP_CBBTC=0xa37E9b4369dc20940009030BfbC2088F09645e3B | |
| account_address | Yes | Arcadia account address with debt |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | ||
| transaction | Yes | ||
| predicted_account_address | No |