Respond to Borrow RFQs (coming soon)
:::caution Coming soon
Borrow is not live. The trading Borrow (/vaults) page shows a coming-soon notice. Do not treat the endpoints, topics, or on-chain borrow flow below as available in production. Names and payloads may change.
:::
When it ships, Borrow RFQs will let a borrower post collateral positions (typically ERC-6909 opshuns, especially ITM) and receive competing signed loan offers from lenders — without selling the option.
Planned lifecycle
Borrower: POST /api/margin/quote
→ margin:<chain_id>:requests (filler feed)
→ borrower joins margin_rfq_stream:<stream_token>
Lender: builds SignedLoan + lender_signature
→ POST /api/margin/quote/:id
Borrower: POST /api/margin/quote/:id/select { offer_id }
→ signs LoanRequest, calls MarginRFQCore.borrow on-chain
Planned create quote (borrower)
POST /api/margin/quote (planned: no login)
{
"chain_id": 31337,
"borrower_address": "0x...",
"expires_in": 60,
"positions": [
{
"standard": 0,
"token_address": "0x…",
"id": "12345",
"amount": "1000000000000000000"
}
]
}
standard: 0 ERC-6909, 1 ERC-20, 2 ERC-721, 3 ERC-1155.
Planned response includes borrower_hash, borrower_nonce_salt, stream_token, and topic margin_rfq_stream:<token>.
Planned lender listen
- Maker rights +
POST /api/pubsub/premium - Join
margin:<chain_id>:requestsformargin_rfq_request - Optionally join
margin_lender:<your_address>withapi_key
Filler payloads would include borrower_hash and positions, not the raw borrower address.
Planned lender offer
POST /api/margin/quote/:id (authenticated maker)
{
"signed_loan": {
"token_loaned": "0x…",
"amount": "500000000000000000",
"lender_nonce": "1",
"early_liquidation_time_stamp": "0",
"expiry": "1786000000",
"interest_rate_bps_per_annum": "500",
"trusted_oracle": "0x…",
"haircut_bps": "1000",
"vault": "0x…",
"borrower_hash": "0x…",
"positions": [ /* same positions */ ]
},
"lender_signature": "0x…"
}
vault is the lender (EOA or ERC-1271 vault). Signature verification would use the Borrow RFQ EIP-712 domain when enabled.
Planned borrower select
POST /api/margin/quote/:id/select
Auth as the borrower address.
{ "offer_id": "…" }
Response would include next_step describing on-chain borrow(request, borrowerSignature).
Planned on-chain
After selection, the borrower signs the full LoanRequest and calls MarginRFQCore.borrow. Collateral transfer / haircut / oracle rules are enforced on-chain — the API only auctions and relays signed offers.
Until this is announced as live, use options RFQ only.