← all work ← back to all work
// case study
CasperSolvent
An autonomous self funding DeFi vault agent.
The problem
An autonomous agent that manages money needs data and judgment it does not have on its own. There was no clean way for one agent to buy those inputs from other agents and act on chain in one loop.
What I built
An on chain vault on Casper testnet that the agent manages with a real yield model and per account accounting.
To make each rebalance the agent buys a data feed and a risk score from other agents over x402, then executes the rebalance, and it earns a performance fee.
A multi wallet dApp lets a user connect, deposit, and withdraw against the real vault from the browser.
Engineering I solved
- Wrote the vault and a CEP-18 token in Odra Rust, with custody through transfer_from and a per account tiered yield accrual.
- Implemented a real HTTP 402 handshake with EIP-712 signed payment authorizations verified server side.
- Built an on chain state read API that decodes Odra dictionary storage by recomputing the blake2b state keys, since the browser cannot read Casper state directly.
- Shipped a CSPR.click dApp that builds and submits real Casper 2.0 transactions from the browser with no backend signer.
Stack
Contracts
- Rust
- Odra
- CEP-18
- Casper 2.0
Agents
- TypeScript
- x402
- EIP-712
dApp
- CSPR.click
- casper-js-sdk
- CSPR.cloud
Infra
- VPS
- systemd
- Caddy
Proof
- Live dApp caspersolvent.xyz ↗
- Repo github.com/Qwirlex/casper-solvent ↗
- Vault package hash-ce214af4...854bc8