Technical Walkthrough
This walkthrough describes how a Montelvay account works. The parts of the application that build, sign or can trigger a movement of client funds are public at github.com/montelvay, so that anyone can check what Montelvay can and cannot do.
1. Background reading
To keep the walkthrough short, we assume a basic understanding of:
- accounts and transactions on public EVM blockchains;
- smart-contract accounts and account abstraction (ERC-4337);
- passkeys (WebAuthn);
- stealth addresses (ERC-5564).
2. The account
Each client account is a Safe smart-contract account on Base, operated through ERC-4337. The client is its only owner. Montelvay is not an owner or a signer, and holds no key to it.
The owner is one of:
- a passkey: a WebAuthn credential on the client's device, verified on-chain;
- the client's own wallet;
- an embedded wallet created at sign-in with an e-mail address, provided by Privy.
The address of the account is determined by its owner before the account exists on the network. The account is created on the network by the first operation the client signs.
3. Operations
Every operation is built in the client's browser (web/core.js) and signed there by the client. The server never prepares a transaction.
- The browser builds the operation and shows the client what it does, in plain words.
- The browser asks a paymaster to sponsor the network fee. The request goes through Montelvay's server, which forwards it to a bundler and paymaster operated by Pimlico. The server sponsors only operations of Montelvay accounts.
- Before the client signs, the browser compares what the operation does and from where (sender, nonce, call data and deployment data) with what it built before the paymaster step. If anything differs, it refuses to sign.
- The client signs with their key. The operation is sent to the bundler and included on the network.
4. The server
The server keeps the registry of accounts: client number, account address, the public part of the passkey, the client's details and settings. It cannot sign for an account.
A session token alone is never enough for a sensitive action. See Owner Proof.
Sessions end after five minutes without activity, on the server and in the browser.
5. Recovery
- Recovery phrase. 24 words (BIP-39) are generated in the browser. The address derived from them is added as a second owner of the account. To recover, the client signs with that key an operation that swaps the lost passkey owner for a new one. The server reads ownership from the network; it does not take the client's word for it.
- Guardians. The account can enable Candide's Social Recovery Module with a grace period of three days. A guardian can start the transfer of the account to a new owner; the client can cancel it during the grace period.
6. Private receiving addresses
See Private Address Keys.
7. What you can verify
- Montelvay holds no key to a client account and is not an owner or signer of it.
- Every operation is built in the browser and signed by the client.
- The server can see payments to private receiving addresses but cannot move them.
- The client can operate the account without Montelvay, with any software that supports Safe accounts.