1The idea in one paragraph
A vault is a way to let someone else stake your DIVI without ever being able to spend it. You keep the owner key. The staking node (a friend, a service, or your own always-on machine) holds the manager key. The coins sit in a special script on the chain that says: the owner may spend these any time; the manager may only use them inside a staking (coinstake) transaction, which pays the reward back into the same vault.
Staking needs an unlocked wallet on a machine that is online all day. With a vault, that machine never holds a key that can move your coins. If the staking machine is hacked, the attacker gets a key that can only make blocks for you.
2Two keys, two jobs
| Owner | Manager | |
|---|---|---|
| Who holds it | You, in your own wallet, ideally offline most of the time | The staking node |
| Funds the vault | Yes: fundvault spends your coins into the vault script | No. On Divi Core a manager's fundvault just makes a new vault from its own coins; it cannot touch the owner's |
| Stakes | Not with the vault coins (the owner wallet does not count them as stakable) | Yes, after it runs addvault to learn about the vault |
| Takes coins out | Yes: reclaimvaultfunds or debitvaultbyname | Never. The script rejects any manager spend that is not a coinstake |
| Receives the staking reward | The reward is paid into the same vault script, so it belongs to the owner and keeps staking under the manager | |
Both roles are ordinary Divi addresses. A vault is named by writing the two addresses with a colon between them: owner_address:manager_address. That string is called the vault encoding and every vault command takes it. The decompose tutorial shows how to read it back into its two addresses and how to check which one your wallet holds.
You can even be your own manager (owner:owner). That is handy for testing, and it is the only vault an IronDivi wallet can both fund and reclaim on its own today (see the reclaim tutorial).
3What the chain enforces
The vault is not a wallet feature that a bad manager could switch off. It is a script that every node on the network checks. Decoded, a vault output looks like this (a real one from testnet):
OP_IF 7d1a719db27730a9d2a65a6035ced8090db15cd9 OP_ELSE OP_REQUIRE_COINSTAKE c68c948af03b0e2a1443a22da33e35293ee87da1 OP_ENDIF OP_OVER OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG
Read it as: if the spender proves they are the first key (the owner), fine. Else the transaction must be a coinstake and the spender must prove they are the second key (the manager). The opcode OP_REQUIRE_COINSTAKE is Divi-specific and is what stops a manager from sending the coins anywhere.
Explorer 2.0 shows a vault output with type vault and both addresses. The IronDivi and Divi Core RPC call decodescript prints the same thing. The decompose tutorial walks through it.
4The six vault commands
| Command | Who runs it | What it does | Tutorial |
|---|---|---|---|
| fundvault | Owner | Sends coins from your wallet into a vault script | Fund a vault |
| addvault | Manager | Tells the staking wallet about a vault so it can stake it | Add a vault to the manager |
| getcoinavailability | Either | Shows Vaulted, Stakable and Spendable balances | Check it is staking |
| reclaimvaultfunds | Owner | Pulls an amount out of your vaults to any address | Take your coins back |
| debitvaultbyname | Owner | Spends from one named vault, change stays in that vault | Spend from a named vault |
| removevault | Manager | Forgets a vault in this wallet. Touches nothing on the chain | Remove a vault |
The command named addvault confuses people: it does not create a vault. fundvault creates it on the chain; addvault is how the manager's wallet accepts it. The create a vault tutorial explains the order.
5The tools: IronDivi, divi-cli, Divi Desktop, BoxWallet
Every vault tutorial on this site shows the same command three ways. Pick the one you run and skip the others.
IronDivi (recommended)
IronDivi is the Rust Divi node. With a testnet node running, every command is irondivi-cli --testnet <command>. If your data directory is not the default, add --conf /path/to/irondivi.conf. The testnet faucet tutorial shows how to start one and get coins.
irondivi-cli --testnet getcoinavailability
Divi Core command line (divi-cli)
The original C++ node. Every command is divi-cli -testnet <command>. A manager wallet on Divi Core needs one extra line in divi.conf: vault=1. Without it addvault fails (shown in the errors tutorial).
divi-cli -testnet getcoinavailability
Divi Desktop
Divi Desktop has no vault buttons, but its debug console speaks to the same Divi Core node, so every command in these tutorials works there. Open , turn on , open the tab, choose and click (the wallet pauses for about 30 seconds). Then click the icon in the status bar, unlock, and you will see Welcome to the Divi Core RPC console. Type the command without the divi-cli -testnet prefix:
getcoinavailability
BoxWallet
BoxWallet installs the Divi Core node and its divi-cli into ~/.boxwallet. BoxWallet's own menus have no vault functions, so use its divi-cli exactly like the Divi Core section above.
Every command here was run on testnet. Practise there until each step is boring, then do it once on mainnet with a small amount. Never paste a mainnet private key or recovery phrase into anything to follow a tutorial.
6See a real vault on testnet
This vault was funded while writing these tutorials. Open it in Explorer 2.0 (new tab) and look at the output of type vault:
Funding transaction 4fdd0def…1645 on the testnet explorer ↗
Owner y8PL1RQSCWYPnJAvhvs6ZwkxfwuB5Ut5Aj, manager yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc, 100 tDIVI. The same vault appears in every later tutorial, so you can follow the whole story of one vault from funding to reclaim.
Where to go next
- Create a vault: choose the two addresses and build the encoding.
- Fund a vault with every tool.
- The vault security model: exactly what a manager can and cannot do, proved on testnet.
Still stuck? Ask the Divi chatbot, or see all tutorials.