Every number here is the one the code runs
The rules Kedge lends by
These are the constants in lib/credit/params.ts, printed from the code, not copied by hand. Every refusal below is generated by the same function the API calls.
How much you can borrow
- While NYSE is closedNights, weekends and holidays. Prices move with no stock market to check them.
- 35% of your shares
- While NYSE is open
- 50% of your shares
- The sale lineIf your debt reaches this share of your shares' value, Kedge sells some of them.
- 70%
- After a saleKedge sells only enough to bring the loan back to this level.
- 50%
- Smallest loan
- $0.10
- Largest live loan during judging
- $1.00
What it costs
- InterestSimple interest by the second, rounded up to the next millionth of a dollar.
- 9% a year
- Sale feeCharged by the venue on a sale, measured on SPYX.
- 0.5%
Rounding up can overcharge you by at most $0.000001 a loan. The book keeps it, and says so here.
How Kedge prices your shares
While NYSE is closed, SPYX is priced from the S&P 500 perpetual future, scaled by a factor measured at Friday's close. Pool prices are not used: their last trade can be a day old. On 28 November the SPYX pool point was 26.1 hours old while the perp was 2 seconds old.
While NYSE is open, the price is the median of the perp-implied price and fresh issuer prices.
Kedge stops lending and stops selling if the perp is more than 120 s old, or if the two perp feeds (True Markets and Hyperliquid) are more than 25 bp apart. Repaying always works.
The prices in use right now
| Input | Price | Age | Used |
|---|---|---|---|
| S&P 500 perp, True Markets | 7,267.60 | 2 s | Used |
| S&P 500 perp, Hyperliquid (cross-check) | 7,267.60 | 0 s | Cross-check only |
| Ondo SPY token, last pool price | $722.31 | 6 s | Market closed |
| Robinhood SPY token | $726.23 | 1 min 10 s | Market closed |
Your shares stay yours
While your loan is open, your pledged shares stay in your own wallet, held for the loan. Kedge refuses to move or sell them, with one exception: a sale at an anchored price when the loan reaches the sale line. The sale repays what you owe, interest first, and everything left over is yours.
A sale is refused if the best price is more than 1.5% under the anchor, so a thin weekend pool cannot turn your loan into a fire sale. Kedge checks again a minute later.
Every refusal, word for word
The numbers inside each sentence are examples. The sentences are the ones you would see.
- R1The S&P perp has not updated for 120 s
Can't price SPYX right now: the S&P perp hasn't updated for 300s. New loans and liquidations are paused. Repaying still works.
- R2The two perp feeds disagree by more than 25 bp
The two S&P perp feeds are 41 bp apart. Kedge is paused until they agree. Repaying still works.
- R3Asking for more than 35% while NYSE is closed
NYSE is closed, so you can borrow up to 35% of your shares' value: $665.00. You asked for $855.00.
- R4Asking for more than 50% while NYSE is open
You can borrow up to 50% of your shares' value: $950.00. You asked for $1100.00.
- R5The best sale price is more than 1.5% under the anchor
Won't sell: the best price for 68.5 SPYX is 3.12% under the anchor. The limit is 1.5%. Kedge checks again in a minute.
- R6Borrowed dollars sent to buy stock
Borrowed dollars can't buy stocks in Kedge. You have $12.50 of your own to invest.
- R7Pledged shares asked to move or sell
These shares are pledged to an open loan, so only a liquidation of that loan can sell them.
- R8The lending book can't cover the loan
The book has $4.60 to lend right now.
- R9A live loan from a wallet not on the test list
Live loans are limited to the builder's test wallets during judging. Everything up to the signature runs live.
- R9A live loan over the cap
Live loans are capped at $1.00 each.
- R10A loan under the minimum
The smallest loan is $0.10.
What is live in this build
- LiveThe anchor price, the limits, interest, health and every refusal, on mainnet data.
- LiveThe sale at the sale line: a real True Markets order, signed and settled on Solana.
- NextMoving the cash and the shares on-chain. Gateway transfers need $5 and this build was funded with $2, so pledge, borrow, repay and release are ledger entries.
- NextLending to anyone. Live loans are limited to the builder's own wallet during judging. Everyone else gets a preview with live prices.
- Not liveA licence to lend. A launch needs digital-lender registration where it lends (in Nigeria, the FCCPC).
What breaks first
Capital. The book lends its own dollars. Growth stops at the size of the book until a lender funds it.
Regulation. Lending to the public needs a licence where Kedge lends. Nigeria has 492 registered digital lenders, so the path exists.
Weekend gaps. The S&P can open Monday far from Friday's close. A loan at the 35% weekend limit reaches the sale line only if the shares fall 50%, and is underwater only past a 65% fall.
Why not borrow on Kamino?
Kamino accepts tokenized stocks as collateral, but a True Markets Gateway wallet cannot reach it. The Gateway docs say:
We approve only the transactions we built for an order or transfer you placed.True Markets docs, Gateway wallet control
So a Gateway user holding $10,000 of shares has no way to borrow a dollar against them. Kedge works inside those rules: it never asks the wallet to sign anything True Markets did not build.
Who holds what
The live borrower in this build is the builder's own Gateway wallet, signed by the server. Everyone else gets the preview. Kedge holds no customer cash: a loan is a ledger entry and no money is sent to the borrower in this build. True Markets co-signs only the orders and transfers it built, so a Kedge key alone cannot move money to an arbitrary address.