Protocol Economics
Fee Calculation
VelumX uses a real-time pricing oracle to calculate infrastructure fees in the user’s chosen SIP-010 token.The Formula
| Variable | Description |
|---|---|
| Gas Cost | Estimated STX fee for the transaction (typically 0.001–0.005 STX) |
| STX/USD | Real-time rate from Bitflow, ALEX, CoinGecko oracles |
| Markup | Developer-configurable percentage on top of base cost |
| Token/USD | Exchange rate of the fee token (e.g. aeUSDC, sBTC) |
estimateFee() SDK call returns maxFee — the maximum the user will pay. The relayer guarantees this cap.
Sponsorship Policies
DEVELOPER_SPONSORS
The developer’s relayer pays STX gas. Users pay nothing.- Cost to developer: STX consumed from their relayer balance
- Revenue: None — this is a subsidized UX
- Best for: Zero-friction onboarding, day-0 users with empty wallets
USER_PAYS
The user pays a SIP-010 token fee. The developer’s paymaster contract collects it atomically.- Cost to developer: STX consumed from their relayer balance (for gas sponsorship)
- Revenue: The SIP-010 fee goes to the developer’s relayer address. Developers can configure a markup percentage to earn above the base gas cost.
- Best for: Sustainable fee models, existing DeFi users who hold stablecoins
Revenue Model for Developers
With USER_PAYS, developers can turn gas into a revenue stream:- User pays
fee_amountin aeUSDC (or any SIP-010 token) - Fee goes directly to the developer’s relayer address
- Developer configures markup in the Dashboard (e.g. 10% above base gas cost)
- Developer exports their relayer private key to withdraw accumulated fees
Settlement Assets
Any SIP-010 token can be used as a fee token — the relayer validates supported tokens per API key policy. Common choices:- aeUSDC / USDCx: Stablecoin settlement — predictable fee amounts
- sBTC: Bitcoin-native fee payment
- STX: Native token (for projects where users hold STX but want gasless UX)
- Custom tokens: Any SIP-010 token your users hold