Mandate v0.2 Rules for onchain AI agents Base In development

Your agent trades
up to the line you drew.

Mandate is a module for your smart wallet. It checks every trade your AI agent makes, before and after execution, and reverts anything outside your rules. The agent’s key can be stolen. Your funds can’t be moved out.

In development · testnet only · not audited

sneg.agent · log Example
How it works

Two checks on every trade.

1 · Agent

Proposes an operation

A swap, a loan or a withdrawal. The agent can only call the Mandate module. It has no direct access to the wallet.

2 · Before execution

What it calls

  • F1Contract and function are on the allowlist
  • §4.3The recipient is your wallet
  • F5Token transfers are always blocked
  • §4.4Approvals only for the exact amount
3 · After execution

What happened to the portfolio

  • P1Loss per trade, priced by Chainlink
  • P4Daily loss and turnover
  • P5Single-asset share and leverage
Everything within limitscommitted
Any single violationfull revert
Rules

Six lines. Not one of them is negotiable.

EQ_SELF

Recipient

Every operation pays out to your address only.

0x7a3f…c21eany other address
You onlybefore execution
P1

Loss per trade

Portfolio value before and after, at the same prices.

1.0%
01.5%
0.3 / 1.0%last trade
P2

Trade size

Notional of a single operation in USD.

$3,000
0$4,000
$2,000 / 3,000last trade
P4

Daily loss

Execution losses since 00:00 UTC. Crossing it freezes the agent.

3.0%
04%
0.3 / 3.0%today
P5

Single-asset share

The agent can’t pile the portfolio into one coin. Reducing a position is always allowed.

30%
050%
20 / 30%WETH now
DD

Drawdown from peak

From −8% the agent can only close positions. At −15% it is frozen.

−8%
−15%
0−20%
−2.1%from peak
Demo

Message the agent like a scammer.

Agent inbox5
Agent active Violations
Click a message on the left. The agent will do what it asks, and the module will check the result. Three violations within an hour freeze the agent.
Simulation. No transactions are sent.
Cost of a hack

What you lose if the agent is compromised.

The agent is talked into sending funds

transfer() is blocked for the agent. The attempt counts as a violation.

$0F5 · before execution

It buys a scam token

An untracked token is worth $0. The trade shows up as a loss and is reverted.

$0P1 · after execution

Sandwich attack

Slippage above the limit reverts the whole trade.

≤ 1%of trade size

The agent’s key is stolen

It can only trade what’s allowed, and only to your address.

≤ 3%daily loss limit

The Mandate team is hacked

The module has no admin key and no upgrades. There is nothing to change.

$0no admin

Draw
the line.

Mandate is in development. We’re looking for teams already running trading agents on Base who want to give them more capital. Write to [email protected]