prepare_compound_borrow
Build unsigned Compound V3 borrow transactions for DeFi lending. Specify wallet, market, and amount to generate a preview for Ledger signing without token approvals.
Instructions
Build an unsigned Compound V3 borrow transaction. Compound V3 encodes a borrow as withdraw(baseToken) drawn beyond the wallet's supplied balance — the base token is resolved on-chain from the Comet market so you only pass the market address and amount. Requires the wallet to have already supplied enough collateral in that market; get_compound_positions shows the current collateral mix. Returns a handle + human-readable preview for the user to sign on Ledger; no approval step is needed (borrowing doesn't pull tokens from the wallet).
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. |