Loops HouseLEASH

NEAR HACKATHON
Links
Team
1 member- CROwner
Cryptoverse67
Overview
Leash is an on-chain spending guard for autonomous payment agents on NEAR.
The problem: if you give an AI agent a wallet key, a compromised or misbehaving agent can drain the wallet. There is no enforceable limit.
Leash fixes that in a Rust smart contract. The owner sets a per-transaction cap and a rolling 24-hour cap. The contract checks every spend before any transfer is created.
The agent gets a single NEAR function-call access key scoped to spend only. It cannot change caps, cannot escalate itself, cannot bypass the contract. Owner actions require the owner's full-access key + exactly 1 yoctoNEAR.
Live on Testnet at leash-0445ff.testnet. Verified config: 4 NEAR per-transaction cap, 8 NEAR rolling 24h cap, 7 NEAR spent in window, nonce 4.
11 unit tests pass: allowed spend, per-tx rejection, 24h rejection, 24h reset, non-agent rejection, owner-only cap changes, 1 yoctoNEAR enforcement, invalid caps, zero cap.
Leash makes autonomous agents safe to fund: humans set the budget, the chain enforces it.