Create a P2P offer
p2p_create_offerPost a loan offer or borrow request on-chain with immediate escrow. Choose to lend principal or borrow collateral; cancel if not taken.
Instructions
Post a loan offer (you lend) or borrow request (you borrow) on-chain. Escrows your side immediately: lenders escrow the principal, borrowers escrow the collateral. Reversible via p2p_cancel while untaken. Requires a signing key; mainnet additionally requires FLASHBANK_MCP_ALLOW_MAINNET=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | Yes | "lend" = you provide the principal; "borrow" = you provide the collateral | |
| chain | Yes | ||
| flatFee | Yes | Flat repayment fee in principal-token units (e.g. "30" = repay principal + 30). NOT a percentage. | |
| graceDays | No | Grace period after maturity (days, default 1) | |
| principal | Yes | Principal amount (human units, e.g. "1000") | |
| collateral | Yes | Collateral amount (human units) | |
| allowedTaker | No | Restrict who may take (address). Omit for open market. | |
| durationDays | Yes | Loan term in days | |
| principalToken | Yes | Token being lent — symbol or address | |
| collateralToken | Yes | Token pledged as collateral — symbol or address | |
| coolingOffHours | No | v2 chains (Sepolia) only: cooling-off window in hours over which the fee vests. Omit or 0 = the protocol minimum for the term; longer is allowed, shorter rejects. | |
| settlementValue | No | Agreed value of ALL the collateral in principal-token units; surplus above the debt returns to the borrower on default. Omit for full forfeit. | |
| offerExpiryHours | No | Hours until the un-taken offer expires (default: never) |