Developers
Keepers
Arbitrage the bands and liquidate loans: the work the protocol leaves to anyone.
Taper has no operator that trades or liquidates on its behalf. Three jobs keep markets healthy, and anyone can do them. Each pays for itself when done well.
Arbitrage
When the oracle moves into a market's bands, the bands quote collateral away from the outside market. Buying from them and selling elsewhere, or the reverse, earns the difference.
- Read the market and its bands, and fetch the latest Pyth update.
- Quote with the SDK's
quoteSwap, using the fee fromoracleJumpFeeif the price just moved. Search for the size that maximizes profit after your outside execution cost. - Post the update and call
swapin one transaction, withmax_input,min_outputand a crossing limit as slippage protection. - Hedge or unwind on an outside venue.
Profit depends on outside liquidity and your execution. The bands only promise that the program's quote is what you get.
Recording the price
After a fast move the band fee jumps and then fades over two minutes, but the fading starts only once a transaction records the new price. If nobody trades because the fee is too high, nobody records the price, and the fee never fades. Calling health on any loan posts the price and starts the clock, without moving funds. A keeper that sees a fresh move and no trades should call it.
Liquidation
A loan with negative health can be liquidated by anyone.
- Find loans. Loan accounts are 499 bytes; filter program accounts by that size and by the market's address at offset 8.
- Compute health with
loanHealth, using the debt index fromaccruedDebtIndexand the cautious oracle price, the price minus its confidence. - For each loan below zero, post a fresh price and call
liquidate, withmax_paymentat the discounted collateral value andmin_collateralat what you expect to receive.
The liquidator pays the collateral's value less the liquidation discount and receives the collateral, so the discount, 5% on SOL and JitoSOL and 10% on NVDAx, is the margin before execution costs.
The SDK's keeper tool
The SDK includes a command-line keeper for arbitrage. By default it only quotes:
npm run keeper -- --market MARKET --collateral-mint MINT --admin ADMIN --amount 1000000 --buy --max-crossings 8 --slippage-bps 30It reads the market's custody and the latest Pyth preview and prints the exact quote. Add --execute, with TAPER_SIGNER_PATH and PYTH_API_KEY set, to post the price and trade. For NVDAx, --execute --sync-only records a changed token multiplier without fetching a price.
The token accounts the keeper trades from must already exist, and execution spends real funds and fees. Try it against a local validator or devnet first.