Hi, Lamaz here, an independent builder working on covenant applications on Kaspa.
A bit of context
AI agents increasingly pay for APIs on their own (HTTP 402 / x402). Today their spending limits live in software: a compromised or prompt-injected agent can ignore them. I have been building kaspa-agent-vault to move that limit into a SilverScript covenant, so the network itself rejects an overspend.
Repo (ISC, v0.1.0 testnet preview): GitHub - lamaz-dev/Kaspa-agent-vault: Archived. The project continues as Plafond: github.com/lamaz-dev/plafond · GitHub
What it is
- AgentBudget v0.4 (479 bytes): a token-bucket budget refilled over DAA score, a per-payment cap, fees counted inside the budget, optional payee allowlist, one KIP-20 lineage per vault, single-input spends with an empty payload. The owner key keeps full control.
- DeliveryEscrow v0.2 (242 bytes): pay on delivery. The vendor claims only with a verifier’s Schnorr signature over blake2b(requestHash || resultHash); otherwise anyone can refund the owner after a relative timeout.
- A draft x402 profile (kaspa-covenant-budget-v0): the vendor recompiles the vault from its announced parameters, checks the UTXO and its lineage on chain, its solvency, and that the agent authorized this exact request.
Current progress
- 9 runs on testnet-10, logged by CI: over-cap and over-budget payments rejected by script verification, a forged delivery proof rejected, an early refund rejected by the sequence lock, then accepted after the timeout.
- KIP-9 measured on chain: a 0.01 TKAS payment was rejected with a storage mass of 1,000,055 g, exactly the value my calculator gives. The smallest payment from a vault is about 0.02 KAS.
- Stateful property-based testing against kaspa-txscript: 2,000 random sequences (~16,000 vault spends, 9 cheat families), no divergence from a reference model.
- Contract tests on the pinned SilverScript compiler, the KIP-20 covenant id test vector from kips#49 passes, bytecode fingerprints reproduced by CI on every push.
- One real issue found and fixed: in escrow v0.1, two expired escrows could be merged into one refund worth a single escrow, the rest going to the miner as fee. v0.2 enforces a single input.
Open threads
- After the escrow timeout, claim and refund are both valid. Is “vendor claims as soon as the proof exists, minimum timeout of 600 DAA” enough?
- Payments below ~0.02 KAS cannot be settled one by one because of KIP-9. A channel along the lines of Kurrent (Kurrent: an eltoo-inspired latest-state channel on Kaspa ) looks like the natural next step. Feedback welcome.
- The owner path is deliberately unconstrained so funds stay recoverable below the KIP-9 floor. Any objection?
Unaudited prototype, testnet-10 only. Attacks on testnet are welcome; please report vulnerabilities privately through the repo’s Security tab.