Prepare a Loan Repayment
prepare_repay_loan_calldataBuilds an unsigned transaction blueprint for repaying a Gavel loan, including the prerequisite approval for the repayment amount.
Validates that the loan is live and that you are its borrower. Repay before maturity or the lender may claim your collateral.
The repayment is transferred directly to the current holder of the lender position. On a USDC loan it reverts if USDC refuses that holder or is paused (known issue KI-3); the blueprint then carries a warning saying so.
Returns an unsigned transaction blueprint for the requested intent. The user is responsible for reviewing, signing, and broadcasting via their own wallet. Aletheia does not hold keys or dispatch transactions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| loan_id | Yes | The loan to repay. See get_user_positions. | |
| network | No | Network. Default 'arbitrum-one' (mainnet, real funds). | arbitrum-one |
| borrower_address | Yes | Your address — must match the loan's borrower. |