rever.ai
April 13, 2026 ยท View on GitHub
Credit scores for AI agents - earned on-chain, spent as better API rates, powered by x402 + MPP on Stellar.
Trust is earned. Speed is unlocked. Autonomy is paid for.
1. What It Does
rever.ai is an on-chain credit infrastructure layer for the machine economy. It gives AI agents a verifiable reputation score derived from their Stellar payment history, and uses that score to automatically unlock lower API rates, reduced MPP Session escrow, and sub-5ms per-call latency when transacting with x402/MPP-compatible API providers.
2. The Problem
x402 and MPP make API payments programmable, but default trust is flat. A brand-new wallet and a historically reliable wallet pay the same price and get the same settlement posture, which blocks risk-aware pricing for providers.
High-frequency workloads need Session mode for low latency, but providers cannot safely open sessions for unknown agents. Without a portable payment reputation, systems fall back to per-call settlement and absorb repeated confirmation cost.
On some chains, proving payment history for dynamic pricing usually introduces ZK infrastructure and attestation complexity. On Stellar, public ledger history is directly queryable and final, so on-chain payment history can be used as the verification primitive itself.
3. Architecture
flowchart LR A[Discovery Layer x402] --> B[Credit Layer Soroban Score] B --> C[Settlement Layer MPP] D[Provider Registry Soroban] --> B E[Sponsored Accounts Fee-Bump] --> A A --> F[Bronze and Silver exact per-call] C --> G[Gold and Platinum session vouchers] B --> H[Provider score cache\nTTL 5m or 100 calls] H --> A A --> I[Batch writer\n50 calls or 5m] I --> B
4. Score Tiers
| Tier | Score Range | Per-Call Rate | Session Eligible | Required Escrow |
|---|---|---|---|---|
| Bronze | 0-299 | Full price (1.00x) | No | 5x session cap |
| Silver | 300-599 | 20% discount (0.80x) | No | 3x session cap |
| Gold | 600-849 | 40% discount (0.60x) | Yes | 1.5x session cap |
| Platinum | 850-1000 | 60% discount (0.40x) | Yes | 0.75x session cap |
5. Components
- Rever Score contract (Soroban): the on-chain reputation ledger keyed by agent wallet.
- Provider Registry contract (Soroban): the Sybil-resistance anchor for score-eligible providers.
- Provider middleware (rever-aware paywall): x402 plus score cache plus batched score writes.
- MPP Session manager: earned high-frequency settlement path for Gold and Platinum.
- Agent Arcade: two-agent live demo runner with event logs and dashboard views.
6. Local Setup
Prerequisites:
Node.js >= 20
Rust + wasm32v1-none target (rustup target add wasm32v1-none)
Stellar CLI >= 25.2.0 (curl -fsSL https://github.com/stellar/stellar-cli/raw/main/install.sh | sh)
Docker
pnpm >= 8
Steps:
1. Clone and install
git clone <repo_url>
cd rever-ai
pnpm install
2. Environment setup
cp .env.example .env
# Edit .env: add GROQ_API_KEY
# Optionally add BRAVE_API_KEY for Brave Search (DuckDuckGo fallback exists)
3. Full setup (wallets + contracts + USDC)
pnpm setup
# runs setup:wallets -> deploy:usdc -> deploy:registry -> deploy:score
4. Verify setup
pnpm health-check
5. Start facilitator
docker compose -f docker/facilitator/docker-compose.yml up -d
# curl http://localhost:4022/health
6. Start API server
pnpm server:log
7. Run demo agents (new terminal)
pnpm demo
8. Start frontend (new terminal)
pnpm dev
9. View UI
http://localhost:3000/dashboard
http://localhost:3000/arcade
Shortcut when contracts are already deployed:
pnpm server:log &
pnpm demo
pnpm dev
Verify on-chain state only:
pnpm health-check
Make alias support:
make setup
make server
make demo
make dev
7. Testnet Addresses
| Contract | Address | Explorer |
|---|---|---|
| Rever Score | CAP6BCQR6E5MMBYDBDYEUTLYYRRMMJCE2DPAJ7BVU3P4ZTFBPLSYUUG7 | Open |
| Provider Registry | CDHA3KOLGH6RZU66TLGCXUV7ZKSZSO6CCXRMWD75CBJSMTAOYTAX5KBD | Open |
| USDC Token | CCP5KQHJGLOQRXKBELC65A7VKFFJSG3MSB7SEGENOIPIW3XNRWMQAWQL | Open |
See TESTNET.md for full wallet and transaction proof.
8. Design Decisions
Why Stellar transparency removes ZK requirement
The score proof is the public payment history itself. Providers can inspect on-chain state from Soroban RPC simulation calls and validate score-related activity without introducing external ZK circuits, trusted attestors, or separate proof verification code.
Why fee-bump matters for agent economics
Stellar fee-bump lets providers sponsor gas so agents can operate with USDC-only wallets. This avoids XLM treasury management for agent operators and keeps API settlement predictable for high-frequency machine workflows.
Why the anti-Sybil model is defensible
Score eligibility is gated by staked provider registration, a minimum payment floor, and provider diversity weighting. Combined with wallet-age constraints anchored to ledger time, this makes rapid score fabrication materially expensive and time-constrained.
9. Stretch Goals
- Stellar mainnet deployment (one real tx).
- Publish @reverai/x402-stellar to npm.
- Negative scoring on failed MPP vouchers.
- Provider Registry search/filter UI.
- Score export as signed off-chain attestation.
10. Known Limitations
- MPP Session flow requires a long-running Node.js process; the Arcade session runner is not intended for serverless deployment.
- Score formula uses integer arithmetic approximations for logarithmic components; tier threshold behavior is monotonic and stable for v1.
- Dashboard historical charts depend on local JSONL logs, so history resets if logs are rotated or removed.
- Demo wallets receive friendbot XLM for account reserve; zero-XLM claims refer to sponsored fee spend during API flow, not absolute wallet reserve balance.
Built with: Soroban - x402-stellar - @stellar/mpp - Next.js - recharts