Get started
Borrowing quickstart
Lock collateral, name your terms, and get funded — end to end.
This walks through the exact steps the Create listing modal on /markets performs. There's no separate SDK to install — everything below happens through two on-chain calls once you've connected a wallet on Robinhood Chain.
1. Pick collateral and name your terms
Choose the token you're posting as collateral, how much of it to lock, how much USDG you want to borrow, an APR, and a term (7, 14, 30, 90, 180, or 365 days). The modal shows a live LTV preview and the exact interest that will be due at repayment — but that preview is a client-side convenience only; the contract itself never checks LTV.
2. Approve, then create
Submitting the form does two transactions if this is the first time you're using this collateral token with the market: an approve(market, maxUint256) on the collateral token (skipped if you already have sufficient allowance), then createListing. The collateral moves into the market contract immediately — no lender is needed for that part.
createListing(
collateralToken, // token you're locking
collateralAmount, // in the token's base units
loanToken, // always USDG
loanAmount, // USDG you want to borrow, base units
aprBps, // e.g. 800 for 8% APR
duration // seconds, e.g. 2_592_000 for 30 days
) → listing id, status = open3. Wait for a lender
Your listing shows up in the open book under the collateral's category (stocks or memecoins). Any wallet other than yours can fill it in full. You'll see it move to your "Open" positions until it's filled, at which point it moves to "Positions" as active and the term clock starts from that block's timestamp — not from when you created it.
4. Repay before maturity
From your active position, Repay approves the market to pull loanAmount + interestOwed(id) in USDG (another approve if needed), then calls repay. Your full collateral amount is returned to you in the same transaction the lender receives principal and interest.
Miss the deadline and the collateral is gone
If repay hasn't landed by startTime + duration, the lender can call claimCollateral at any point afterward and take your collateral. You keep the USDG you borrowed either way — there's no clawback — but the collateral does not come back once claimed.
Changed your mind before it's filled?
Call cancelListing (the Cancel action on an open listing) any time before a lender fills it. Your collateral returns immediately and the listing moves to cancelled. Once filled, there is no cancel — only repay or default.
