Inspiration

The rapid ascent of the "Agentic Economy" presents a paradox: we are empowering AI agents to make autonomous decisions and handle real-world payments, yet we lack the industrial-grade rails to govern them. How do we ensure an agent doesn't exceed its budget, interact with sanctioned entities, or misspend funds without human oversight for every $0.01 micro-transaction?

We were inspired to build MNEE Sentinel to bridge this gap. By leveraging the MNEE stablecoin and ERC-4337 (Account Abstraction), we wanted to create a "compliance firewall" that allows agents to operate at scale while ensuring every cent spent is policy-compliant and fully auditable.

What it does

MNEE Sentinel is a policy-enforcement layer for AI agents. It consists of three core pillars:

  1. Programmable Compliance: A gated Paymaster that intercepts transactions and validates them against an on-chain Policy Oracle. If an agent tries to send MNEE to a flagged address or exceeds its daily cap, the transaction is refused before it ever hits the chain.
  2. Zero-Gas Friction: Using Account Abstraction, we remove the need for agents to hold ETH. The Paymaster sponsors all compliant MNEE transfers, allowing agents to stay "lean" while the owner manages liquidity centrally.
  3. Forensic Auditing: Every sponsorship decision generates an EIP-712 "Receipt." This cryptographic proof links the Agent, the Recipient, the Policy Decision, and the UserOpHash, providing an unalterable audit trail for enterprise compliance.
  4. Micro-Settlement Efficiency: For high-frequency agents, we implemented a batch settler that nets small off-chain vouchers into single on-chain transactions, reducing gas costs by ~75%.

How we built it

The project was built with a full-stack focus on technical accuracy and enterprise aesthetics:

  • Smart Contracts: Developed in Solidity using the Foundry framework. We implemented custom ERC-4337 Paymaster logic, a flexible Policy Oracle, and an EIP-712 Micro-Settler.
  • Dashboard: Built with Next.js, Tailwind CSS, and Viem. The UI focuses on "Forensic Transparency," allowing users to drill down into the hexadecimal proof of every policy decision.
  • Agent Simulation: A Python-based agent suite simulates real-world usage, generating signed vouchers and test transactions to stress-test the policy limits.
  • Blockchain Infrastructure: We used an Ethereum Mainnet fork (via Anvil) to interact with the real MNEE token address, ensuring the project is production-ready for the MNEE ecosystem.

Challenges we ran into

The greatest technical hurdle was Calldata Parsing in the Paymaster. To enforce policies at the protocol level, the Paymaster must "look inside" the UserOperation. We had to write low-level Yul (Assembly) to safely extract transfer recipients and amounts from nested calldata:

$$ \text{Calldata} = \underbrace{\text{Selector}}{4\text{ bytes}} + \underbrace{\text{Address}}{32\text{ bytes}} + \underbrace{\text{Value}}{32\text{ bytes}} + \underbrace{\text{Data Offset}}{32\text{ bytes}} + \dots $$

Ensuring EIP-712 Compliance was another challenge. Mapping human-readable categories to bytes32 while maintaining a high-fidelity UI required careful state management and custom hashing logic to match on-chain signatures perfectly.

Accomplishments that we're proud of

  • The Verifiable Audit Loop: We successfully closed the loop between on-chain enforcement and off-chain proof. You can verify any transaction in our dashboard, and the EIP-712 JSON will match the on-chain receipt hash.
  • Batch Settlement Logic: Achieving a 75% gas reduction through our Micro-Settler was a huge win, proving that high-frequency agent payments can be both compliant and cost-effective.
  • Industrial Aesthetics: We avoided generic UI templates to create a high-fidelity "Sentinel Console" that feels like a real tool for compliance officers.

What we learned

We gained a deep understanding of the ERC-4337 Lifecycle, specifically the validatePaymasterUserOp and postOp hooks. We learned that the Paymaster is the most powerful point of enforcement in the AA stack—it’s not just for paying gas; it’s for defining the rules of the ecosystem. We also deepened our knowledge of EIP-712 domain separators and the nuances of cross-language (Python to Solidity) signature verification.

What's next for MNEE Sentinel: Policy-Enforced Rails for AI Agents

  • ZKP Policy Proofs: Moving policy headers to Zero-Knowledge Proofs to allow private compliance checks (e.g., "proof of non-sanction" without revealing the full recipient list).
  • Dynamic Sanctions Feed: Integrating live Chainlink data or specialized sanctions oracles to update the Policy Oracle in real-time.
  • Cross-Chain Sentinel: Expanding the sentinel logic to L2s where tokenized agents are increasingly active, maintaining a unified policy layer across the MNEE ecosystem.

Built With

Share this project:

Updates