Skip to content
Open app

Ragequit

Any note can leave publicly to the address that deposited it, at full value and with no fee, whether or not any set approves it.

Ragequit pays a note out to the wallet that made its deposit, in public. No set has to approve it, so a deposit every set turned down still comes back out in full.

What it is

FactSpendRagequit
Paid toAny addressThe original depositor only
SetOne the label is approved inNone
Proven againstA root in the set's windowThe deposit tree's current root, or one its last 32 deposits replaced
Link to the depositHiddenPublic
AmountAny part of the noteThe whole note, no change
Protocol feeOn withdrawalsNone

The ragequit instruction takes the same membership proof on its exit path: exitLabel is the note's label, and root is the deposit tree's root, which every label is under. With the proof come the deposit's amount, slot and nonce. The program rebuilds the label from those, the mint and the destination, and the rebuilt label has to equal exitLabel, so the money can only go to the address that deposited it. Whoever holds the note sends the exit, through the relayer like any spend.

A deposit landing while the exit is being proven changes the deposit tree's root. The DepositTree account keeps the roots its last 32 deposits replaced, and ragequit accepts any of them as well as the current root, so the exit still lands. Once more than 32 deposits have landed since the proof was made, the program refuses with RootOutsideWindow, and the exit is proven again against the current root.

When it is used

The app offers ragequit on notes no set approves. It works on any note, approved or not, as ragequit does in Privacy Pools: an ASP can leave a deposit out of its set, and the depositor still gets the funds back.

On a receipt

A ragequit's receipt shows kind ragequit, no set or root, the nullifier, the mint, the full amount, the depositor as destination, and a fee of 0. The program emits RagequitExecuted with the label, the root, the nullifier, the destination, the mint and the amount. See Read a spend receipt, and Exit with ragequit for the steps.