Start
How Mortise works
Mortise is a vault on Robinhood Chain that an AI agent can run but cannot take. The owner plugs in what the agent may do, piece by piece, and pulls pieces out again with one signature. Plugging and unplugging never moves the funds.
The parts
| Part | What it is |
|---|---|
| Vault | A Safe 1.4.1 account with Safe7579, so it takes ERC-7579 modules. It holds the funds. Its address is fixed by the root and a number, so it can be known and funded before it exists. |
| Root | The owner's keys: one to ten ECDSA keys or passkeys with a threshold. Only the root changes settings, plugs pieces in and out, and can always move the funds directly. |
| Gate | The vault's policy engine and its only executor for agents. Every agent action passes through it. It is deployed once, has no admin and cannot be upgraded. |
| Adapters | One per protocol. An adapter turns an action into the exact calls it needs and lists every token those calls can move. It never holds funds. |
| Strategy modules | DCA, automation and rebalance. They propose actions on their own when the keeper the owner named triggers them, and pass the same checks as an agent. |
| Sub-vaults | Vaults with no keys of their own. The parent vault is their root. One per agent or strategy keeps a mistake inside its own funds. |
When an agent acts
- The agent sends one or more actions to the Gate from its own address and pays its own gas. It holds no vault key.
- For each action, the adapter returns a plan: the market, the calls and every token they can move.
- The Gate checks the agent, its expiry, the adapter, the market and every call against the adapter's declared rules and the owner's settings.
- It reads the balances, runs the calls as one batch through the vault, reads the balances again, charges each decrease to the agent's cap, checks the price floor on swaps and requires every approval to end at zero.
- If any check fails, the whole batch is undone and nothing moves.
What the owner controls
| Setting | What it decides |
|---|---|
| Agents | Which addresses may act, and until when. A revoked or expired agent stops at once. |
| Adapters | Which protocols each agent or module may use. |
| Markets | Which pools, curves, lending markets, ERC-4626 vaults, recipients and bridge routes each adapter may use. |
| Caps | How much of each token each agent or module may spend per period. A token without a cap cannot be spent. |
| Price floors | The least a swap must return per unit sold, per token pair. For Uniswap liquidity, the two floors of a pair also bound the pool price. |
| Open trading | Optional, per agent and adapter: any market the adapter accepts, and an open floor for pairs with no floor set. Caps and every floor the owner set still hold. |
| Pause | One switch that freezes every agent and module. The vault or a pauser it names presses it; only the root lifts it. |
| Guardians | Who can replace a lost root, how many must agree, and a wait of 7 to 90 days the root can cancel. |
| Timelock | An optional delay of 1 to 30 days on every change that widens what the vault allows. Tightening and withdrawals to registered addresses run at once. |
Guarantees
These hold for every vault, whatever its settings, and are checked by the tests and proofs described in the security model.
| Guarantee | |
|---|---|
| I1 | Calls reach only targets the adapter declared, in a plain batch, never through delegatecall and never back into the vault. |
| I2 | The included adapters pay every output and position to the vault or its family, or to a recipient or bridge route the owner listed, and grant no operator rights. |
| I3 | No approval outlives the batch: every ERC-20 and Permit2 approval in it must end at zero. |
| I4 | The vault signs no ERC-1271 message unless the owner installs the signer, and never while a hook such as the timelock is installed. |
| I5 | Caps count raw balance changes, so fee-on-transfer and stock tokens are charged exactly. |
| I6 | Agents and modules cannot change settings, install modules or rotate the root. A pauser can only pause. |
| I7 | The root can always move the vault's assets directly, without the Gate. |
| I8 | Open trading never lifts a cap or a price floor the owner set. |
| I9 | Only its parent runs a sub-vault, never the parent's agents, and the parent can never lose that control. |