Free Operations
Free Operations
Section titled “Free Operations”Your users never pay usage fees or operational costs. Varity covers everything automatically so your app works like any normal web app.
How It Works
Section titled “How It Works”Some platforms charge usage fees for every operation. With Varity, those costs are covered automatically:
- User performs an action (save data, make a payment, etc.)
- Varity covers the operational cost behind the scenes
- The operation completes instantly
- User sees success — no fee prompts, no extra steps
Your users never see usage fees or extra confirmation screens. It just works.
For Developers: Zero Setup Required
Section titled “For Developers: Zero Setup Required”Free operations are handled entirely by the Varity platform. No extra configuration needed. When your app is deployed on Varity, all operations are free for your users automatically.
-
Build your app using Varity SDK
Use the database and payment APIs normally:
app/page.tsx import { db } from '@varity-labs/sdk';async function saveUserData(data: any) {// This write operation is free for the userconst result = await db.collection('users').add(data);return result;} -
Deploy with the CLI
Terminal window varitykit deployFree operations are enabled automatically. No extra flags or configuration.
-
Users interact for free
When users trigger actions in your app, all operational costs are covered by Varity’s infrastructure.
What’s Free
Section titled “What’s Free”| Operation | Cost to User |
|---|---|
| Database reads | Free |
| Database writes | Free |
| Account creation | Free (auto-created on first login) |
| App interactions | Free |
Collecting Payments from Users
Section titled “Collecting Payments from Users”While operations are free, you can still charge users for your app or premium features using the payment components from @varity-labs/ui-kit.
PaymentWidget
Section titled “PaymentWidget”Wrap any element to make it a purchase trigger:
import { PaymentWidget } from '@varity-labs/ui-kit';
function BuyButton() { return ( <PaymentWidget appId={123} price={999} onSuccess={(txHash) => console.log('Purchased!', txHash)} onError={(err) => console.error('Payment failed:', err)} > <button>Buy for $9.99</button> </PaymentWidget> );}PaymentGate
Section titled “PaymentGate”Gate premium content behind a purchase:
import { PaymentGate } from '@varity-labs/ui-kit';
function PremiumSection() { return ( <PaymentGate appId={123} price={999} fallback={<p>Purchase to unlock premium content.</p>} > <div>This content is only visible after purchase.</div> </PaymentGate> );}useVarityPayment Hook
Section titled “useVarityPayment Hook”For custom payment flows:
import { useVarityPayment } from '@varity-labs/ui-kit';
function CustomPayment() { const { hasPurchased, purchase, isLoading, isPurchasing, pricing } = useVarityPayment({ appId: 123 });
if (isLoading) return <p>Loading...</p>; if (hasPurchased) return <p>Thank you for your purchase!</p>;
return ( <div> {pricing && <p>Price: ${Number(pricing.priceUsdc) / 1_000_000}</p>} <button onClick={purchase} disabled={isPurchasing}> {isPurchasing ? 'Processing...' : 'Buy Now'} </button> </div> );}Revenue Split
Section titled “Revenue Split”When users pay for your app, the revenue is split automatically:
- 90% goes to you (the developer)
- 10% goes to Varity (platform fee)
This is enforced automatically by the platform. No invoices, no payment processing — it happens automatically.
Billing for Developers
Section titled “Billing for Developers”- Beta: Free — all operational costs are covered using shared development credentials
- Production: Usage-based billing through your Varity account
How Gas Sponsorship Works Under the Hood
Varity uses ERC-4337 account abstraction to sponsor gas fees:
- User initiates action — clicks a button in your app
- Smart account encodes the operation — a UserOperation is created
- Bundler submission — the operation is sent to the bundler network (Conduit)
- Paymaster approval — Varity’s paymaster agrees to cover the gas cost
- Execution — the operation executes on Varity infrastructure
- Confirmation — user sees success
All of this happens in seconds, completely invisible to users. The smart wallet infrastructure (ZeroDev Kernel smart accounts, authentication, Conduit for bundler and paymaster) is managed by Varity. Developers do not need to configure any of these components.
Next Steps
Section titled “Next Steps”- Credit Card Payments — Monetize your app
- Data Storage Quick Start — Store and retrieve data
- Authentication — Set up user login