Loops HouseMandate Lab

NEAR HACKATHON
Links
Team
1 member- BIOwner
Bima Maulana
Overview
AI agents that manage funds typically hold a key with unrestricted permissions, relying on prompts to define their operational limits. This creates a critical vulnerability: a single injected instruction hidden in an invoice or webpage could redirect funds.
Mandate addresses this by moving authorization boundaries from prompts to the NEAR blockchain.
Funds are held in a keyless vault contract, while users sign mandates directly with their own wallets. These mandates define exactly what an agent is authorized to do, whether it is a specific invoice or a capped spending budget with predefined payees, spending limits, and expiration dates.
The agent receives only a Function Call key with permission to invoke "request_task". NEAR enforces this restriction at the protocol level, rejecting any other operation from the agent's key. Meanwhile, the vault independently validates every request against the user's signed mandate, ensuring that no transaction can exceed its authorized scope.
In our attack lab, a live DeepSeek-powered agent successfully resisted all 42 tested attacks, resulting in zero funds lost. We also validated the system on NEAR testnet using a real Ref Finance swap, where the attacker received nothing.