P06

Evergreen

An agent that keeps tokenized real-world assets legally compliant. It reads regulatory changes, proposes a contract upgrade, has it audited, installs it live, and can roll it back in one transaction.

Role
Design and implementation
When
2026
Stack
  • Rust
  • Odra
  • Casper
  • TypeScript
  • x402
The problem

A smart contract is written once. The rules around the asset it represents never stop changing: securities law, KYC requirements, tax treatment, all of it moves, and most chains freeze the contract at deployment.

That leaves tokenized real-world assets either quietly non-compliant or dependent on expensive human oversight forever. Evergreen puts an agent in that loop and keeps a human at the gate.

The sketch
Rule changebought via x402Reasonintervention specProposeon chainAuditsecond agentApprovehuman multisigUpgrademodule, liveRollbackone transaction

A regulatory change is bought over x402, reasoned into an intervention spec, proposed on chain, audited by a second agent, approved by a human multisig, installed live, and rolled back in one transaction if wrong.

How it works

Perceive and reason

The agent buys a regulatory change from a paid data feed using x402 micropayments, then reasons about it into a structured intervention specification rather than free text.

Propose, then have it audited

The proposal is recorded on chain, and a second, independent agent is paid to audit it. The verdict is recorded alongside the proposal, so the reasoning and its review are both part of the permanent record.

A human still approves

Upgrade is gated behind human or multisig approval. The agent drafts and argues; it does not get to change a live financial contract on its own say-so.

Reversibility is the point

The new compliance module is installed into the live vault in place, and a bad version is disabled and the previous one re-enabled in a single transaction with no data loss. Casper preserves old contract versions, and that additive versioning is what makes letting an agent near an upgrade defensible at all.

Three contracts run live on the Casper testnet: the vault, the warden registry and the payment token.

What was hard

Most of the difficulty was the chain, not the agent. Getting Odra contracts to deploy on Casper 2.0 meant stripping bulk-memory WASM operations with binaryen, pinning a gas price tolerance of 1, and marking packages upgradable at install time or losing the ability to evolve them later.

Public nodes reject the large session WASM bodies these deploys produce, so an authenticating proxy in front of a hosted RPC became a hard requirement rather than a convenience.

The intervention identifier is computed on chain specifically so the agent never has to read state back before writing. An agent that has to query, then decide, then write is three round trips and a race; one that computes deterministically is one transaction.

The agent was rewritten off the Rust toolchain onto the JavaScript SDK. Shelling out to a local binary works on the machine it was built on and nowhere else, and an agent that cannot be hosted is a demo.

What I'd do differently

Approval is auto-approved in the demo, which is the one step that most needs to be real. The interesting version of this system is the argument about what a multisig of actual compliance officers is willing to sign, and that has not been tested.