ScripDocs

Concepts

Yield routes

Buyback, Holders, Treasury, or a split of the three.

A route says where a Scrip's yield goes. Its issuer sets it at issue and can change it later. At each harvest the protocol fee comes off first, and what remains follows the route.

Buybackbuys and burns or sends your tokenHoldersevery balance grows in placeTreasuryUSDC to your treasury walletharvested yield, after the protocol fee
A split route sends a share down each channel; a single route sends all of it down one.

Buyback

The yield buys the community's own token. At harvest, the Scrip's share leaves the reserve into an escrow account that belongs to that Scrip alone. The keeper then swaps it for the community token through Jupiter, and the program checks the result before it lets the swap stand:

  • the escrow decreases by exactly the amount spent;
  • the tokens received meet the minimum set by the community token's price feed, less the route's maximum slippage;
  • the tokens are then burned, or sent to the wallet the issuer named.

The issuer chooses the community token, its price feed (published under the reserve's trusted price adapter), the maximum slippage up to 10%, and whether bought tokens are burned or sent. The community token is a classic SPL token.

The protocol fee never joins this buyback: it comes off before the route and buys $SCRIP. See The $SCRIP token.

Holders

Every holder's balance grows in place. Scrip uses Token-2022's Scaled UI Amount: the token carries a multiplier, and wallets show each balance multiplied by it. At harvest, the holders' share raises the multiplier by exactly what that yield is worth, so every balance a wallet shows grows with each harvest. Redeeming pays the grown figure.

The program does its own arithmetic with an integer multiplier; the floating-point figure wallets display is for showing balances only.

Treasury

The yield is paid in USDC to the issuer's treasury wallet at each harvest.

Split

Any mix of the three. Shares are set in basis points and add up to 10,000, so 50% buyback, 25% holders and 25% treasury is 5,000, 2,500 and 2,500.

Changing a route

An issuer schedules a new route, waits out the reserve's waiting period, then activates it. Yield earned before activation still goes the old way. See Change a route.