Skip to main content
A tokenized vault pools deposits from anyone and issues each depositor one share token per sat. Holders can keep or transfer shares, or redeem them through a proposal that pays a fixed split to the scripts named in the contract. A guardian can veto a withdrawal, but can never take the funds or change the split. See Exit for how exit paths work. The vault is one contract that plays four roles, each its own output: a deposit address, the pool, a withdrawal address, and a staging output. The pool holds the vault’s control token on every spend. The operator lets an asset’s supply grow only when the transaction also spends its control asset, so only a spend of the pool can issue shares. Every path pins how many shares it issues or burns.

Deposit

The deposit address is this contract with kind 0, and it names the script that receives the shares. Anyone can send sats to it. One spend then consumes the whole deposit output, and 330 sats stay on the share output. The first deposit (open) creates the pool and also leaves 330 sats in it as the pool’s carrier. The rest is one share per sat. A later deposit (arrive) is another send to the same address. An asset sent to the deposit address cannot move.

Share

A share is a token on the script the deposit address named. One share is one sat in the pool above its 330-sat carrier. The share is the claim: the pool does not know the holder’s key, and no spend asks for the holder’s signature. The pool issues shares only on the deposit paths and burns them only on disburse. A share moves like any other asset, so a claim changes hands without a spend of the pool.

Withdrawal

The withdrawal address is this contract with kind 2, and the address is the proposal. The constructor names the payout scripts and the one split: for a redemption, the holder’s own script; for a pot, first, second, and third place. The holder sends the withdrawal address exactly as many shares as the split pays, on a 330-sat output. The send is the authorization, and the pool does not ask who sent it.

Staging

The next spend, propose, seals the proposal in a staging output (kind 3). The split’s sats leave the pool, and the shares sit beside them. The shares are not burned yet.

Veto

The guardian can only cancel. veto returns the sats to the pool and the shares to holderScript. The guardian cannot take the sats or change the split.

Disburse

If nobody vetoes, disburse pays the split to the payout scripts and burns the shares, one sat per share. Anyone can build this spend, because a covenant needs only the operator’s signature. The guardian’s veto is the only decision in the script.

Clocks

The contract enforces no deadlines. The application decides when deposits close and how long the guardian has to veto. disburse has no timelock, so anyone can disburse as soon as the staging output exists. A veto window holds only if every party that can build the disburse waits for it.

Contract

The constructor names one share script and one split, so a second split is a second vault. kind is 0 for the deposit, 1 for the pool, 2 for the withdrawal, and 3 for staging. shareScript, holderScript, and the payout scripts are ScriptPubKey values. Each binds as .program and .version. Set guardian and noExitKey before you fund. The comment above the contract gives the noExitKey value. An unused place is 0. A used place 2 or 3 pays more than 330 sats, and place 1 also receives the 330-sat carrier.
tokenized.ark