What this is
$LOAN is a coin on the pump.fun bonding curve. Every trade in it pays a creator fee into a vault derived from the wallet the coin was launched from. That address is written into the curve by the create instruction and can never be reassigned, so there is exactly one key in existence that can move those fees, and exactly one place they can go.
An autonomous agent holds that key. About once a minute it claims whatever has accrued and stakes it as JitoSOL. The stake is not a treasury waiting to be spent on something — it is the balance sheet, and its only job is to be lent against.
The product is the loan. A holder who wants liquidity posts $LOAN to the vault and draws SOL against it, up to 40% of what the collateral is worth. They keep their position in the coin; the book earns interest; the rewards that funded it keep arriving.
The agent
LoanShark is run by an autonomous agent. It holds one wallet, earns from two sources, and makes every operating decision the book requires without anyone approving them: when to claim, how much to keep liquid, what to stake, when to unwind, and which positions have fallen far enough to be seized.
What makes it an agent rather than a script is that it acts on a mandate rather than on instructions. Nobody tells it to claim at nine in the morning. It holds a target — keep this share of the book liquid, stake the rest, never seize a position you cannot price — and every cycle it measures the world and does whatever moves the book toward that target, including nothing.
- The agent
- The autonomous operator. Holds the key, makes the decisions.
- A cycle
- One pass of its loop, roughly once a minute. Recorded whether or not it acted.
- The vault
- Its single wallet. Coin creator, staker, lender and fee payer at once.
- The book
- Its balance sheet: staked, liquid, and lent.
- The buffer
- The share held liquid so a borrower can be paid today.
Staking
Idle reserves are staked as JitoSOL. The agent deposits SOL into the Jito stake pool and receives a token that appreciates against SOL every epoch, as the pool's validators earn both inflation rewards and the MEV they capture.
The yield is the smaller half of the reason. The larger half is that a lending book cannot afford illiquid reserves. Native delegation locks capital to epoch boundaries in both directions — stake starts earning at the next boundary and takes until the one after a request to come back — so a book funded that way can only honour a withdrawal it saw coming three days ago. JitoSOL unwinds in a single transaction on the open market, at any hour, which is what lets the agent lend a far larger share of what it holds.
The position is valued at the stake pool's own exchange rate rather than at a market quote. The two differ — JitoSOL trades at a small discount when people are in a hurry — and the pool rate is the honest one for a balance sheet: it is what the position is worth to a holder who is not in a hurry, and no one can move it.
Setting STAKING_MODE=native switches the agent to plain delegation to a single validator. Both paths are fully implemented. The native one exists because it needs no counterparty at all, and for some readers that matters more than liquidity; the panel on the dashboard always says which is running and how long reserves would take to become spendable.
The cycle
Each cycle, in order:
- 1Read the vault. Unclaimed creator rewards are checked before anything else. Below the fee floor of — the tick stops here, because claiming would cost more in transaction fees than it collects.
- 2Claim. The rewards land in the vault as native SOL. A coin that has graduated to the pump AMM is paid in wrapped SOL instead, so the agent unwraps before measuring anything.
- 3Sweep. Any stake account that has finished cooling down is withdrawn and closed, returning both the stake and its rent to the buffer.
- 4Top up the buffer. The liquid reserve is brought back to its target share of the book before anything new is delegated.
- 5Delegate the rest. A new stake account is opened and delegated to the validator. Solana has no way to add to an active stake account, so each deposit is its own account; matured accounts are merged back together on later ticks to keep the count bounded.
- 6Mark the book. Every open loan is repriced at the current $LOAN price. Anything that has fallen through the liquidation threshold, or run past its term, is seized.
Every tick is written down, including the ones that do nothing. An agent claiming once an hour spends fifty-nine minutes deciding not to, and the reason it is waiting is the most useful thing on the page when nothing is happening.
Borrowing
There is no wallet connection and nothing to sign on this site. Borrowing is two steps the holder takes in their own wallet:
- 1Send $LOAN to the vault address.
- 2Submit that transaction's signature, along with the wallet it was sent from and the amount of SOL wanted.
The book then asks the chain what that transaction actually moved. The collateral amount is taken from the token balance changes the transaction recorded, not from what was typed, and the borrower is taken to be the fee payer — so a deposit someone else made cannot be presented as your own, and a signature cannot be reused for a second loan.
A request is recorded, not filled. Claiming and staking move money the protocol already owns; sending SOL to an address a stranger supplied is a decision a person makes. Once approved, the disbursement revalidates every term against the price and the buffer at that moment — approval is permission to fund, not a promise the terms still hold.
A request that fails its checks is still written down, rejected with the reason attached, and the collateral is returned immediately. The protocol has no claim on collateral for a loan it declined to make.
Interest and fees
Interest is simple, not compounding, and accrues per second from the moment the principal is sent. Per second because a loan can be opened and repaid inside an hour, and charging a whole day for that would be a fee dressed up as interest. Simple because the term is short enough that the difference is under a basis point, and because a borrower can check simple interest with a calculator.
The origination fee is withheld from the principal rather than added to the debt, so the amount owed is exactly the amount received. There is no penalty for repaying early — with per-second interest, repaying early simply costs less.
Liquidation
Health is the distance to the liquidation threshold, scaled so that 1.00 is the boundary:
Below 1.00 the position may be seized. The dashboard marks anything under 1.20 as at risk, because a borrower who is going to be liquidated should hear about it while adding collateral is still an option.
Seized collateral stays in the vault rather than being sold. Selling it would mean the protocol dumping $LOAN into its own market at the exact moment the price is already falling — the position is only seizable because it fell — which would take the rest of the book down with it.
A position is never liquidated on a missing price. Without a mark the honest state is unknown, and seizing on unknown is how a protocol takes collateral it was not owed.
Why a buffer
Native stake activates at the next epoch boundary and deactivates at the one after a request, so up to three days can pass between deciding to unstake and holding the SOL. A book that staked every lamport could only honour a loan three days late.
So a share of the book is held liquid at all times, and that reserve is what every loan is funded from. It is the protocol's promise that it can pay out today. Requests larger than the buffer are not refused forever — they wait for stake to unwind.
Verifying it
Nothing on this site has to be taken on trust. The vault address is on every page; every claim, delegation, disbursement and repayment carries its signature, and each one links to Solscan. The stake accounts are owned by the stake program and their authorities are readable on-chain.
The mint itself is not stored in this application's source or its environment. It lives in Redis under a single key, read fresh on every request by the site and on every tick by the agent, so the two cannot disagree about which coin this is — the one disagreement neither of them could detect.
Risks
- The collateral is a memecoin. A position can be opened and liquidated the same afternoon. The simulator on the borrow page shows exactly how far $LOAN can fall before that happens to yours.
- Liquidations correlate. The price fell for everyone at once, so several positions reach the threshold together. The scatter on the dashboard is there to show whether the book is many small positions or one large one on the line.
- Stake is not liquid. Only the buffer can be drawn on today. Everything else takes an epoch.
- The agent holds a real key. This is not an on-chain program. That the stake stays delegated and that collateral is returned on repayment are properties of an operator, not of the chain.
- The rewards depend on trading. If the coin stops trading, the creator fee stops arriving and the book stops growing. The existing stake continues to earn validator rewards regardless.
API
Three read endpoints, all uncached and all public:
GET/api/state
Everything the dashboard renders: ledger, snapshots, marked loans, live chain figures, market data, terms and the aggregated book.
GET/api/loans
The loan book, marked at the current price.
GET/api/market
The mint and the current market snapshot.
And one write endpoint:
POST/api/loans
{ action: "request", borrower, amountSol, collateralSignature } or { action: "repay", id, signature }
Lamport quantities cross the wire as decimal strings throughout. A Solana u64 exceeds the largest integer a double can hold exactly, and a debt figure that has been through a float is a debt figure that disagrees with the chain.
