let your AI agent pay. Keep the final say.
A NEAR vault that lets an AI agent pay its own invoices within limits you set, and holds anything unusual until you approve it from your wallet.
Built for NEAR HACKATHON
@NEARProtocol
It started from real events.
On Nov 2024; the Freysa agent was talked into paying out a prize pool of about $47,000.
Mar 2025: attackers got into AIXBT’s dashboard, and 55.5 ETH walked out the door.
in 2025: Princeton researchers showed that one planted memory could make an agent pay an attacker.
Every one of those agents could move the money itself, but here's the problem agents need to spend money to do real work, but a prompt can’t be your security.
If the agent holds the key, one injected instruction drains it. If you approve every payment yourself, you have no use for the agent.
Sovra puts a vault between the agent and the money.
How a payment runs:
. The agent reads an invoice and proposes a payment.
. A risk engine scores the request against the agent’s own history: amount against its usual payment, recipient, how often it pays, hidden instructions and recently stopped payments
. The engine signs its decision with an Ed25519 key
. The agent submits it with a key that can call exactly one method: request_payment
. The contract checks the signature, the limits, the approved recipients, the policy version and the expiry. Then it pays, holds the request or refuses it
Routine payments go through on their own. Each confirmed payment earns the agent trust, and every attack costs it.
Anything unusual waits in the vault with a one hour countdown. You approve or decline it from your own wallet.
One signature freezes everything.
The LLM is not the guardrail.
In our prompt-injection test the model refused the hidden “ignore previous instructions” invoice. Then we played a compromised agent that submits it anyway, and the vault rejected it on-chain.
Sovra doesn’t trust the model to say no.
It’s live on NEAR Testnet with real transactions:
hidden instructions in an invoice: refused by the vault
amount changed after signing: signature check failed
recipient swapped for the attacker: signature check failed
agent lowers its own risk score: signature check failed
decision signed by the wrong key: refused
a paid request sent again: refused as a duplicate
a decision used after it expired: refused
paid under limits that had already changed: refused
a payment while spending is frozen: refused
9 attacks. 0 NEAR moved.
Something we got wrong:
A held payment expired and the vault released it, but the NEAR stayed reserved. The contract lets anyone call expire_request, and our app never did. So 2.5 NEAR sat locked.
We added a Release button and an owner Withdraw. The expired request stays in the record.
What we used from NEAR:
Function-call access keys: the agent’s key can only call request_payment on the vault, so it can’t move funds, approve its own request or change limits
1 yoctoNEAR on every owner action, so only a full-access wallet key can approve, freeze or change limits, and a leaked session key can’t
On-chain Ed25519 verification of every risk decision
Promises for payouts and refunds
NEAR Wallet Selector with Meteor for owner signing
Contract events for a permanent audit trail
Don’t take the thread’s word for it.
Every attack and payment on the site links to its testnet transaction. The security report lists 20 scenarios with real hashes. #NEARHACkATHON
Site: https://sovra-near.vercel.app
Code: https://github.com/AGAkodi/Sovra
@ilblackdragonThe @NEARProtocol Hackathon is live through November 14 with $250K in prizes. Here are a few ideas for things I’d love to see built with @near_intents and @near_ai.
––AI encyclopedia with prediction markets: instead of community curation, every fact becomes a perpetual truth-seeking market (Augur-style). The official pages are generated by AI based on the current market understanding.
––Private trading where you sell your viewing keys for people to follow/copy trade. NEAR Intents confidential trading is all private, so you can have a social trading app where people sell "keys" for only select people to see. PnL can be publicly displayed so people can choose to buy in.
––Universal checkout widget: any merchant/app can add a “checkout” button that enables paying with Intents from whatever wallet and blockchain that user has.
––Swarm-for-Hire (with guardrails or governance AI review, please). Put a bid onchain with a description of the work and anyone can add a new agent to the swarm by giving it NEAR (to pay for inference) with a prompt/knowledge base/tools. All agents accept jobs and get NEAR AI LLM inference from their payment for the job.