Loops HouseTripwire

NEAR HACKATHON
Team
1 member- SEOwner
Sebastian StrzaĆkowski
Overview
AI agents can read invoices and pay them. A DAO on NEAR that lets one do so has two poor options today: give the agent a proposal role, so every 20 USDC invoice waits for a vote, or let a reviewer agent approve small payments, so the limit is a model reading attacker-controlled text.
Tripwire is a budget guard contract for Sputnik DAO. The DAO moves a small budget to the guard and sets its policy by proposal: the agents that may ask, the recipients that may be paid directly, caps per payment and per period for each token, an expiry and a guardian who can freeze it. The agent holds a NEAR function call key that can call only request_payment on the guard. Each request is rejected, paid at once from the budget, or turned into a Sputnik Transfer proposal with a reason and a description the guard writes itself. The council votes only on what falls outside the policy. A poisoned invoice cannot get an account outside the allowlist paid, or more than the caps, and voters never see raw invoice text.
NEAR makes this work without a custodian. The function call key limits the agent at the protocol level. The guard account has no keys after deployment, so only DAO proposals can change or drain it. Sputnik DAO stays the treasury and the approval flow. With a stolen agent key the worst case is the period cap paid to allowlisted recipients, never the treasury.
The demo agent reads each invoice with a deterministic parser or any OpenAI compatible model, derives the invoice id itself and refuses to start with a key that can do more than ask the guard.
Built in Rust with near-sdk. 114 unit tests on the guard, 13 on the agent and 31 end-to-end tests on a local NEAR node against the unmodified Sputnik DAO v2 3.2 code, and a live deployment on testnet.