MozaikPay Docs
How it worksUnder the hood

The two-key model

Why your wallet is controlled by two keys instead of one, and what each key can and cannot do.

Most self-custodial wallets rest on a single secret, and everything hard about them follows from that. MozaikPay splits the job between two keys instead. This page explains what each key does, why the split exists, and what enforces it.

The problem with one key

A classic wallet gives you one secret, usually dressed up as twelve words on paper. That one secret spends the money, backs the wallet up, and restores it on a new device. It has to be within reach every day and guarded forever, and those two jobs pull in opposite directions. Keep the secret close and it's exposed. Lock it away and you can't pay for coffee. Lose it, and everything is gone at once.

The fix is an old idea, separation of duties. Give the everyday job and the emergency job to different keys, and make sure neither key can do the other's work.

The spending key

Your spending key is created on your phone when your wallet is set up, and it lives in the phone's secure storage, tied to that one device. It's never backed up, never synced, and never sent to anyone, us included.

Its one power is moving funds. When you confirm a payment with your PIN or biometrics, the app unlocks the key just long enough to sign that single payment, then locks it again. Every fund movement in MozaikPay is authorized this way, on your phone, by this key.

If a thief somehow extracted your spending key and tried to lock you out by replacing it, the wallet would refuse. Key changes belong to the other key.

The recovery key

Your recovery key is also created on your phone, and it's encrypted on the spot with a password only you know. What actually gets stored, in your cloud, your inbox, or wherever you chose to keep it, is a locked file. The password never leaves your phone, so no copy of your recovery key exists anywhere in a form anyone else can use. All we ever learn is its public address.

Its powers are exactly two. It can replace the spending key, which is how your wallet moves to a new phone, and it can replace itself, which is how you retire a backup you no longer trust. The recovery key cannot move funds. Even someone holding your backup file and its password couldn't spend a cent with it.

The contract enforces the split

Your wallet is a smart account, a small contract on Base, and the contract checks two things about every instruction it receives: which key signed it, and what it's asking to do. A spending-key signature on a key change is rejected. A recovery-key signature on a payment is rejected. The rejection happens on the network, in public code anyone can read, with our servers nowhere in the decision.

What the split buys you

The key you use every day is not the key whose loss is fatal.

If your phone is lost, stolen, or broken, the spending key dies with it and your money doesn't. On a new phone, your recovery key authorizes the network to accept a freshly created spending key, and from that moment the old one signs for nothing, no matter who ends up holding the phone. What happens if I lose my phone? tells that story in full.

If you suspect your backup file has leaked, the recovery key replaces itself. You create a new backup under a new password, and the old file becomes worthless wherever it ended up.

If your backup is gone, or its password forgotten, while your phone still works, your money is still spendable, and you can move it somewhere safe while the device lasts. The only total loss is losing both keys at once, which is the same shape as losing your phone and your password manager on the same day.

On this page