Fees & Revenue
Protocol fee mechanics, revenue streams, and fee administration.
Protocol Fee
IntentGuard has an optional per-verify fee. When a user calls verify_intent, the protocol can charge a small fee in SOL that is transferred from the user to the config PDA.
Default: Free
Fee starts at 0 lamports. Protocol is free to use during adoption phase.
Max: 0.1 SOL
Hard cap enforced on-chain. Admin cannot set fee above 100,000,000 lamports.
Atomic Collection
Fee is collected via system_program::transfer CPI inside verify_intent.
Withdrawable
Admin can withdraw accumulated fees while preserving rent-exempt minimum.
How Fees Work
- Admin sets fee via
update_feeinstruction (0 to 0.1 SOL) - User verifies intent — if fee > 0, SOL transfers from user to config PDA
- total_fees_collected counter increments atomically
- Admin withdraws accumulated fees via
withdraw_fees
On-Chain State
Fee data is stored in the GuardConfig PDA (82 bytes total):
| Field | Offset | Size | Description |
|---|---|---|---|
verify_fee | 65 | 8 (u64) | Fee per verify in lamports |
total_fees_collected | 73 | 8 (u64) | Lifetime fees collected |
Fee Administration
Set Fee (Direct)
# Using fee-admin CLI
npx tsx scripts/fee-admin.ts set-fee 5000000 # 0.005 SOL
npx tsx scripts/fee-admin.ts status
Set Fee (Multisig)
# Using Squads multisig (requires threshold approvals)
npx tsx scripts/squads-admin.ts propose-update-fee 5000000
npx tsx scripts/squads-admin.ts approve 1
npx tsx scripts/squads-admin.ts execute 1
Withdraw Fees
# Direct withdrawal
npx tsx scripts/fee-admin.ts withdraw 500000000 # 0.5 SOL
npx tsx scripts/fee-admin.ts withdraw-all
# Via multisig
npx tsx scripts/squads-admin.ts propose-withdraw-fees 500000000
Revenue Simulation
npx tsx scripts/fee-admin.ts simulate 1000 # 1000 daily verifies
Revenue Streams
| Stream | Timeline | Description |
|---|---|---|
| Free Tier | Launch | Unlimited commits + verifies (adoption priority) |
| Protocol Fee | Month 3+ | Optional per-verify fee (governance controlled) |
| Premium API | Month 3+ | Pro ($49/mo) and Enterprise ($299/mo) tiers |
| Enterprise | Month 6+ | Custom deployment, SLA, dedicated support |
Safety Guarantees
- MAX_VERIFY_FEE = 0.1 SOL — hard cap prevents admin abuse
- Rent-exempt protection — withdrawal preserves config PDA's minimum balance
- Checked arithmetic — total_fees_collected uses
checked_add(no overflow) - Fee = 0 — no CPI transfer occurs (zero cost path)
- Multisig gated — fee changes go through Squads proposal flow on mainnet
Live revenue data: Revenue Dashboard