Docs
How the rule sees money.
Net, not gross. The only thing verifiable on chain without trusting anyone is the balance of your USDC account, so that is what the rule reads.
The watermark
When you turn the rule on, your current USDC balance becomes the watermark: everything already there has been seen. A sweep reads the balance now, subtracts the watermark, and calls the difference the inflow. After the slice leaves, the watermark becomes the new balance — the remainder is yours, untaxed, forever.
bal = your USDC balance now inbound = bal − watermark (0 if bal fell below it) taxable = min(inbound, cap) (cap = 0 means no cap) slice = taxable × rate slice = min(slice, bal − floor) (floor = 0 means no floor) require inbound ≥ $1 and slice ≥ $0.50 watermark = bal − slice
The first payment
A rule that only counted what lands after it is on would show a new saver nothing: their first automatic save might be days away. So starting counts the wallet’s last payment as arriving. In the same transaction that turns the rule on, that payment is set aside in a USDC account the saver owns (made from their own address and a seed, so they are the only signer), for exactly the one instruction that records the watermark, then handed straight back, and the account is closed with its rent returned. The wallet’s balance is the same before and after; the watermark sits that much lower, so seconds later the program saves the rate of that payment through the delegate, against a Pyth price, onto a receipt like every other.
[memo "scrip:start:v1", open a holding account, move the payment into it, open_book, approve the $200 limit, prepay, enable_rule ← watermark = balance − payment move the payment back, close the holding account]
No program instruction does anything different for it: the start is ordinary token-program instructions around enable_rule, and the memo says what the transaction was to anyone reading it. A first save takes at most $50, so the $200 limit keeps room for the payments after it, and the receipt says the money was already in the wallet when saving was turned on.
Spending is not income
If your balance falls below the watermark, the watermark follows it down. Anyone may call sync_watermark for that; it can only ever set the watermark to your true balance, and only downward. Without it, an owner who spent $700 would see nothing convert until the balance had climbed back past the old mark.
If $500 arrives and $500 leaves before it is saved, nothing converts. Scrip saves within seconds of a balance change, so this is rare, and the interface says so rather than pretending otherwise.
Swap proceeds count
Sell a token for USDC and the slice converts: every time you take profits, part of it leaves the casino. The cap keeps a large treasury move from being taxed in full; the floor keeps cash from dropping below what you need.
Escalation
Optionally, one percentage point every ninety days, capped at half. The clock starts when the rule is turned on, and restarts when the rate or the escalation is changed.
What Scrip never decides
The amount is computed by the program from on-chain state in begin_sweep. Scrip’s servers pass a release id and the accounts. They cannot choose more, less, or a different account.