Loops HouseSpendTree

NEAR HACKATHON
Links
Team
1 member- HAOwner
Ha
Overview
Problem: AI agents increasingly spawn sub-agents, and the usual safety tool, a spending cap per agent or per key, does not compose. A prompt-injected agent that spawns helpers gives each one a fresh cap, so total spending authority grows with every agent. SpendTree is a NEAR contract that holds a team's budget as a tree: delegate moves budget to a sub-agent (the parent loses authority over it), pay reserves funds and settles through an async callback that restores failed transfers exactly once, revoke takes back a branch's unspent budget and freezes it. Every agent holds only a function-call key to the contract, so it cannot move NEAR any other way. exposure() returns each key's worst-case loss in advance. Results: a scripted worst-case attacker run on testnet loses 6 NEAR with SpendTree (exactly what was delegated; 10 NEAR authorized from a 10 NEAR deposit). Replaying the same actions against a modeled per-agent-caps policy loses 9 NEAR and authorizes 31. In 11 live LLM runs on NEAR AI Cloud, loss always stayed within the blast radius.