Loops HouseSencap

NEAR HACKATHON
Links
Team
1 member- WAOwner
Wave
Overview
Sencap: a Telegram agent that spends NEAR only inside hard on-chain limits Sencap is Sentry (the agent) plus Capkey (the vault). I wrote the vault contract, and my teammate Dave built the bot, the paid service, and the risk checks around it. The problem. An agent that can pay needs a key, and a leaked or misbehaving key usually means a drained wallet. I wanted the key to be almost useless on its own. How it works. The owner funds a vault contract on NEAR and gives the agent a function-call access key that can only call the vault's payment methods. The rules live in the contract, where nobody can talk their way around them. They are a per-payment cap, a daily limit, approved recipients (permanent or one-time), and an expiry. The owner can revoke or rotate the agent at any time, and can always withdraw their funds, even after a revoke. What I added for tokens. The vault also holds wNEAR (wrap.testnet). Deposits go in through ft_transfer_call, any other token is refused and handed back, and wNEAR has its own cap, daily limit, and balance, separate from NEAR. If a token transfer fails, the contract refunds it and reports that, instead of pretending it went out. The same contract also takes a 50 bps fee, paid in the same call as the payment, and it's tracked per token. What the bot does (Dave's part). The agent is a Telegram bot restricted to its owner. Say pay shop 0.05 wnear and it runs a risk check first: unapproved or lookalike recipients, first-time payees, and whether the amount plus fee fits the caps. Then it asks for Confirm or Cancel, and the request expires after 60 seconds. It pays through the vault, keeps a payee book and receipts with explorer links, and never reports a refunded transfer as "Paid." Agent economy. /buy check makes the agent pay for a service. It sends 0.01 NEAR from the vault to a service account, and the service verifies the payment on-chain (signer, receiver, amount, success) before it returns a site report. Each transaction hash work