prepare_compound_repay
Build an unsigned Compound V3 repay transaction, optionally including ERC-20 approval. Specify wallet, chain, market, amount (or 'max' for full repayment), and approval cap.
Instructions
Build an unsigned Compound V3 repay transaction — encoded as supply(baseToken) against an outstanding borrow. Includes an approve step if needed. Pass amount: "max" for a full repay.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet | Yes | 0x-prefixed EVM wallet address (40 hex chars) that will execute this action. | |
| chain | No | EVM chain the Comet market lives on. Defaults to ethereum. | ethereum |
| market | Yes | Comet market address (e.g. cUSDCv3). The base token is resolved on-chain. | |
| amount | Yes | Human-readable decimal amount of the market base token, NOT raw wei/base units. Example: "100" for 100 USDC. | |
| approvalCap | No | Cap on the ERC-20 approval preceding this action. Omit for "unlimited" (standard DeFi UX — fewer follow-up approvals). Pass "exact" to approve only what this action pulls. Pass a decimal string (e.g. "500") for a specific ceiling in the asset's human units; must be ≥ the action amount, otherwise the transaction would revert. |