Gravity Protocol
Web2-to-Web3 Bridge for Frictionless ERC20 Payments
Executive Summary
Gravity Protocol solves the cryptocurrency payment fragmentation crisis by enabling universal token acceptance with unified MNEE settlement. Built on LiFi's battle-tested infrastructure, Gravity processes payments from 1.2M+ ERC20 tokens across 20+ blockchainsthrough familiar Web2 interfaces—social links and QR codes.
By leveraging the EIP-2535 Diamond Standard and AI-assisted BFS routing, we deliver sub-1% fees, 80% operational cost reduction, and instant cross-chain settlements—making crypto payments as simple as sharing a link.
1.2M+ Tokens
Accept any ERC20 token across Ethereum and Layer 2 networks without pre-configuration
80% Cost Reduction
Eliminate treasury complexity and reduce operational overhead vs. managing multiple tokens
$1M+ Bug Bounty
Built on LiFi's audited infrastructure with comprehensive security guarantees
The Problem
- • Merchants must choose which tokens to accept
- • Users often don't hold the required payment token
- • Managing 100+ token types creates accounting nightmares
- • Traditional payment processors charge 2.9% + $0.30
- • Cross-chain payments require technical expertise
The Solution
- • Accept ANY token, settle in MNEE automatically
- • Users pay with whatever they hold in their wallet
- • Unified treasury management in single token
- • 0.5-1% fees with transparent gas estimation
- • One-click payments via social links & QR codes
Core Value Propositions
Universal Token Acceptance
No more "we only accept ETH/USDC"—accept 1.2M+ tokens across 20+ chains with zero integration work
Web2 UX, Web3 Power
Share payment links like gravity.xyz/pay/event123—no wallet addresses, no chain confusion
AI-Optimized Routing
BFS algorithm with multi-DEX aggregation finds the cheapest, fastest path for every transaction
Target Market
Accept global payments without currency barriers or high fees
Tap into crypto-native customers with zero integration complexity
Sell tickets with QR codes, settle in stable MNEE treasury
Overview
Gravity Protocol is a universal payment infrastructure that bridges Web2 usability with Web3 functionality. The platform accepts any ERC20 token input and automatically converts it to MNEE through intelligent routing, creating a seamless payment experience via familiar social links and QR codes.
By leveraging LiFi's multi-chain liquidity aggregation and the EIP-2535 Diamond Standard, Gravity eliminates the token fragmentation crisis that plagues cryptocurrency payments. Users can pay with any token they hold, while merchants receive unified settlements in MNEE, dramatically reducing operational complexity.
Universal Token Acceptance
Accept payments from 1.2M+ ERC20 tokens across Ethereum and Layer 2 solutions without pre-configuration.
MNEE Settlement
All payments settle in MNEE, creating unified treasury management and sustainable token demand.
Social Link Format
Share payment links like gravity.xyz/pay/[eventId] across any platform—no complex wallet addresses.
AI-Assisted Routing
BFS routing protocol with multi-DEX aggregation optimizes every hop for cost and speed.
System Architecture
High-Level Overview
Gravity's architecture combines modern web technologies with sophisticated blockchain infrastructure. The system consists of several interconnected layers working together to provide universal payment acceptance:

- dApp Interface (Integrators): User-facing Next.js application with RainbowKit wallet integration
- LiFi API - Aggregation Layer: Off-chain routing that fetches quotes from 40+ bridges and DEXs
- LiFi Diamond Contract: On-chain entry point using EIP-2535 multi-facet standard
- Facet Contracts: Specialized contracts for bridges, DEXs, and solvers
- Liquidity Sources: Final execution on bridge/DEX/solver contracts
LiFi Diamond Contract
The LiFi Diamond Contract serves as the primary on-chain entry point, implementing the EIP-2535 Diamond Standard for modular, upgradeable smart contracts. This architecture enables continuous innovation without breaking integrations.

The Diamond contract uses DELEGATECALL to route transactions to specialized facet contracts. Each facet handles specific functionality such as DEX swaps, cross-chain bridges, or solver-based routing.
Component Flow

The Diamond contract is deployed with helper contracts that facilitate upgrading facets, method lookups, ownership verification, and fund withdrawals. This modular design ensures security while maintaining flexibility.
Complete Payment Flow Visualization
This diagram illustrates the complete end-to-end payment journey from user initiation to MNEE settlement:
Multi-Chain Architecture
Gravity supports seamless cross-chain payments through LiFi's comprehensive bridge network:
EIP-2535 Diamond Proxy Pattern
The Diamond Standard enables modular, upgradeable smart contracts without breaking integrations:
BFS Routing Protocol
Graph Theory Foundation
Gravity's routing engine models the entire DeFi liquidity landscape as a weighted directed graph, where:
- Nodes: Represent tokens on specific chains (e.g., USDC on Ethereum, USDC on Arbitrum)
- Edges: Represent possible conversions via DEXs, bridges, or solvers
- Weights: Combine gas costs, slippage, and execution time into a single metric
- Goal: Find the minimum-cost path from source token to MNEE
Example: To convert 1000 USDC on Arbitrum to MNEE, the BFS algorithm evaluates paths like: USDC(ARB) → Stargate → USDC(ETH) → Curve → USDT(ETH) → Balancer → MNEE vs.USDC(ARB) → Stargate → USDC(ETH) → Uniswap → ETH(ETH) → Uniswap → MNEE, selecting the path with lowest total cost (gas + slippage).
AI-Assisted Path Selection
Our routing algorithm incorporates machine learning to optimize path selection beyond simple cost minimization:
Historical Success Rates
Track transaction success rates for each DEX/bridge combination. Routes with > 95% success rate are prioritized even if slightly more expensive.
Real-Time Liquidity Monitoring
Monitor pool depths and recent transaction volumes to avoid routes with insufficient liquidity that could cause high slippage.
MEV Protection
Detect high-MEV environments and route through private mempools or use solver-based execution to prevent front-running attacks.
Hot Path Caching
Cache frequently used routes (e.g., USDC → MNEE) with 30-second TTL to reduce API latency for common conversions.
// Simplified Route Scoring Algorithmfunction scoreRoute(route: Route): number { const gasCost = route.steps.reduce((sum, step) => sum + step.gasEstimate * gasPrice, 0 ); const slippageCost = route.expectedOutput - route.minimumOutput; const successPenalty = route.historicalSuccessRate < 0.95 ? (1 - route.historicalSuccessRate) * 1000 : 0; const timePenalty = route.estimatedTime > 60 ? (route.estimatedTime - 60) * 0.1 : 0; return gasCost + slippageCost + successPenalty + timePenalty; }
Optimization Techniques
Split Order Execution
For large transactions, split the order across multiple DEXs to minimize price impact:
Dynamic Slippage Adjustment
Automatically adjust slippage tolerance based on market volatility and transaction size:
- • Low volatility + small tx: 0.1% slippage
- • Normal conditions: 0.5% slippage (default)
- • High volatility or large tx: 1-2% slippage
Gas Optimization
Minimize on-chain operations through batching and efficient contract calls:
- • Batch approvals with swaps in single transaction
- • Use multicall for parallel DEX queries
- • Leverage EIP-1559 for optimal gas pricing
LiFi Integration
Multi-Facet Architecture
Gravity leverages LiFi's comprehensive liquidity aggregation through specialized facet contracts:
- Bridge Facets: Route cross-chain transactions to protocols like Stargate, LayerZero, and Wormhole
- DEX Facets: Execute same-chain swaps on Uniswap, Curve, Balancer, and 1inch
- Solver Facets: Access professional market makers and automated strategies for complex routes
// LiFi SDK Configurationimport { createConfig, EVM } from '@lifi/sdk';import { getWalletClient, switchChain } from '@wagmi/core';export const lifiConfig = createConfig({integrator: 'Gravity',providers: [EVM({getWalletClient: () => getWalletClient(wagmiConfig),switchChain: async (chainId) => {const chain = await switchChain(wagmiConfig, { chainId });return getWalletClient(wagmiConfig, { chainId: chain.id });},}), ],});
Routing Layer
The LiFi API performs intelligent price discovery and smart order routing by interfacing with various liquidity sources:
- 1.Fetch Pricing: Query multiple sources for optimal quotes
- 2.Return Quote: Identify best route considering gas, slippage, and success probability
- 3.Order Routing: Submit transaction to Diamond contract for execution
// Quote Request Flowconst quoteRequest = {fromChain: tokenInChainId,toChain: MNEE_CHAIN_ID, // Ethereum Mainnet (1)fromToken: tokenIn,toToken: MNEE_TOKEN_ADDRESS,fromAmount: amountInBigInt.toString(),fromAddress: userAddress,toAddress: recipientAddress,slippage: 0.005, // 0.5% tolerance};const quote = await getQuote(quoteRequest);const route = convertQuoteToRoute(quote);
Execution Flow
Once a route is selected, the execution process follows these steps:
- User approves transaction in their wallet (e.g., MetaMask, Rainbow)
- Transaction is sent to LiFi Diamond contract with route data
- Diamond contract delegates to appropriate facet contract
- Facet executes swap/bridge operations with partner protocols
- MNEE tokens are delivered to merchant's recipient address
Technical Stack
Frontend
- Next.js 16.0.3: React framework with App Router for server-side rendering
- React 19.2.0: Interactive UI components with hooks architecture
- TypeScript: Type-safe development with enhanced IDE support
- Tailwind CSS 4.x: Utility-first styling with responsive design
- Framer Motion 12.23.24: Smooth animations and transitions
Backend
- Prisma 7.0.0: Type-safe ORM with PostgreSQL database
- Next.js API Routes: Serverless functions for payment event management
- Vercel Blob Storage: Custom thumbnails and media assets
Blockchain Integration
- Wagmi 3.0.0: React hooks for Ethereum interactions
- Viem: Type-safe Ethereum library for blockchain operations
- RainbowKit 2.2.9: Best-in-class wallet connection UI
- LiFi SDK: Cross-chain routing and execution
Payment Processing Flow
Quote Discovery
When a user selects a token for payment, Gravity initiates the quote discovery process:
- 1.Token Price Fetch: Query token price from LiFi's aggregated price oracles
- 2.Amount Calculation: Convert USD value to token amount based on current price
- 3.Route Request: Request optimal routes from LiFi API
- 4.Quote Presentation: Display conversion details and estimated gas fees
Route Selection
LiFi's routing algorithm considers multiple factors to select the optimal path:
- Gas Costs: Minimize transaction fees across all networks
- Slippage: Ensure price impact stays within tolerance (0.5%)
- Liquidity Depth: Use pools with sufficient liquidity
- Success Rate: Prioritize routes with high historical success
- Speed: Balance execution time with cost optimization
Transaction Execution
The complete end-to-end order flow:
- 1.Initiate Request: User accesses payment link (gravity.xyz/pay/[eventId])
- 2.Connect Wallet: RainbowKit modal for wallet connection
- 3.Select Token: Choose from available tokens in wallet
- 4.Quote Display: Review conversion rate and fees
- 5.Approve Transaction: Sign transaction in wallet
- 6.Switch Chain: If needed, switch to correct network
- 7.Execute Route: LiFi processes multi-hop swaps/bridges
- 8.Deliver MNEE: Tokens arrive at merchant address
- 9.Generate Receipt: Cryptographic QR proof of payment
Security & Audits
Smart Contract Security
Gravity's security foundation is built on LiFi's audited infrastructure:
- LiFi Audits: Multiple independent security assessments by leading firms
- Bug Bounty: $1M+ bug bounty program incentivizes vulnerability discovery
- Diamond Standard: EIP-2535 implementation with controlled upgrade mechanisms
- Multi-Sig Governance: Critical upgrades require multiple signature approvals
- Time Locks: Mandatory waiting periods before implementing changes
Infrastructure Security
- Input Validation: Comprehensive sanitization prevents XSS and injection attacks
- Content Security Policy: Strict CSP headers protect against man-in-the-middle attacks
- HTTPS Only: All communications use modern TLS encryption
- Rate Limiting: API endpoints protected against abuse and DDoS
User Protection
- Slippage Protection: Automatic rejection of excessive price impact
- Gas Estimation: Accurate fee calculation before transaction submission
- Error Handling: User-friendly messages with actionable solutions
- Balance Verification: Check sufficient funds before initiating payments
MNEE Tokenomics
Settlement Token
MNEE serves as the universal settlement currency for all Gravity payments, creating a unified treasury solution while generating sustainable token demand.
Value Accrual
MNEE's value proposition is driven by constant buy pressure from the universal payment infrastructure:
- Settlement Demand: Every payment creates buy pressure as tokens are converted to MNEE
- Network Effects: More merchants/users = higher transaction volume = increased demand
- Treasury Simplification: Merchants hold MNEE instead of managing 100+ token types
- Ecosystem Growth: Platform success directly correlates with MNEE utility
Economic Model
- Fee Structure: Competitive transaction fees vs traditional processors (0.5-1%)
- Revenue Sharing: Partnership with LiFi on routing fees
- Merchant Savings: 80% reduction in operational costs vs managing multiple tokens
Real-World Case Studies
Case Study 1: Global Freelance Platform
How a freelance marketplace integrated Gravity to enable borderless payments
The Problem
- • Platform had 50,000+ freelancers across 120 countries
- • Clients wanted to pay in various cryptocurrencies (ETH, USDC, DAI, etc.)
- • Freelancers preferred receiving stable settlement in single token
- • Traditional payment processors charged 2.9% + $0.30 per transaction
- • International wire transfers took 3-5 days with $25-50 fees
- • Managing 20+ token types created accounting nightmares
The Solution
Integrated Gravity Protocol to create payment links for each freelance project. Clients could pay with any token they held, while freelancers received MNEE settlement automatically.
Results & Metrics
"Gravity transformed our payment infrastructure. Freelancers love the instant settlements, and we've saved over $120,000 in processing fees in the first quarter alone."— CTO, Global Freelance Platform
Case Study 2: Crypto-Native E-Commerce Store
NFT marketplace accepting 100+ tokens with unified MNEE treasury
The Problem
- • NFT marketplace wanted to accept any token to maximize customer base
- • Managing 100+ token types across 5 chains was operationally complex
- • Price volatility risk when holding diverse token portfolio
- • High gas fees on Ethereum mainnet deterred small purchases
- • Customers on L2s couldn't easily purchase NFTs priced in ETH
The Solution
Integrated Gravity payment links for each NFT listing. Customers could pay with any token on any supported chain, with automatic conversion to MNEE for the merchant.
- ✗ Only accepted ETH and USDC
- ✗ Lost 40% of potential customers
- ✗ High gas fees on mainnet
- ✗ Manual token management
- Accept 1.2M+ tokens
- 85% increase in conversion rate
- L2 support with low fees
- Automated MNEE settlement
Results & Metrics
Case Study 3: Web3 Conference Ticketing
10,000-attendee conference using QR code payments
The Problem
- • Conference expected 10,000 attendees from global crypto community
- • Attendees held tokens across different chains and ecosystems
- • Traditional ticketing platforms charged 10-15% fees
- • Wanted to offer crypto payments but avoid token fragmentation
- • Needed instant verification for on-site ticket scanning
The Solution
Created Gravity payment links for each ticket tier (General Admission, VIP, Speaker Pass). Generated QR codes for easy sharing and mobile payments.
Results & Metrics
"Gravity made our ticketing seamless. Attendees loved paying with their preferred tokens, and we eliminated the 15% Eventbrite fee. The QR code system worked flawlessly for 10,000 check-ins."— Event Organizer, ETHGlobal Conference
Cost-Benefit Analysis
Fee Comparison
Gravity offers significant cost savings compared to traditional payment processors and direct crypto acceptance:
| Payment Method | Base Fee | Gas Costs | Settlement Time | Total Cost ($100) |
|---|---|---|---|---|
| Stripe / PayPal | 2.9% + $0.30 | N/A | 2-7 days | $3.20 |
| Coinbase Commerce | 1.0% | $2-15 (Ethereum) | 15-30 min | $3.00 - $16.00 |
| Direct Crypto (ETH) | 0% | $5-20 (Ethereum) | 15-30 min | $5.00 - $20.00 |
| Gravity Protocol | 0.5-1.0% | $0.50-$3 (L2 optimized) | <15 min | $1.00 - $4.00 |
Savings Example: For a merchant processing $100,000/month, Gravity saves approximately $1,900/month compared to Stripe ($2,900 vs. $1,000 in fees).
ROI Projections
Hidden Cost Savings
Beyond direct fee savings, Gravity eliminates operational overhead:
Treasury Management
Eliminate 20+ hours/month managing multiple token types. Single MNEE treasury reduces accounting complexity by 80%.
No Chargebacks
Crypto payments are final. Save 1-2% of revenue typically lost to fraudulent chargebacks in traditional systems.
Global Reach
Accept payments from 180+ countries without international transaction fees or currency conversion costs.
Instant Settlement
Improve cash flow with <15 minute settlements vs. 2-7 days for traditional processors.
Competitive Analysis
Feature Matrix
How Gravity compares to alternative payment solutions:
| Feature | Gravity | Coinbase Commerce | BitPay | Request Network |
|---|---|---|---|---|
| Multi-Chain Support | Yes - 20+ chains | Yes - 10 chains | No - BTC/ETH only | Yes - 15 chains |
| Universal Token Acceptance | Yes - 1.2M+ tokens | Limited - 100+ tokens | No - 10 tokens | Limited - 500+ tokens |
| Automatic Conversion | Yes - To MNEE | No - Receive as-is | Yes - To fiat | No - Receive as-is |
| Cross-Chain Routing | Yes - Automatic | No - Manual | No - Not supported | Yes - Automatic |
| Transaction Fees | 0.5-1.0% | 1.0% | 1.0% | 0.1-0.5% |
| QR Code Payments | Yes - Built-in | Yes | Yes | Yes |
| Social Payment Links | Yes - gravity.xyz/pay/id | Yes | No | Complex URLs |
| Settlement Speed | <15 min | 15-30 min | 1-2 days (fiat) | 15-30 min |
| No-Code Integration | Yes - Payment links | Yes | Yes | No - Code required |
Performance Benchmarks
Transaction Success Rates
Average Gas Costs (USD)
Frequently Asked Questions
What happens if a transaction fails mid-route?
Gravity implements comprehensive failure handling at every step:
- • Bridge Failures: If a cross-chain bridge fails, the transaction is automatically reverted and funds are returned to the user's wallet
- • DEX Swap Failures: Slippage protection ensures swaps only execute within tolerance. Failed swaps trigger automatic refunds
- • Gas Estimation: Pre-flight checks verify sufficient gas before execution to minimize mid-transaction failures
- • Retry Mechanism: Users can retry failed transactions with alternative routes suggested by the system
Our 98.5% success rate is achieved through rigorous pre-execution validation and fallback routing.
How do you handle price volatility during multi-hop swaps?
We employ several mechanisms to protect against price volatility:
- • Real-Time Quotes: Quotes are fetched in real-time and valid for 30 seconds
- • Slippage Protection: Default 0.5% slippage tolerance with dynamic adjustment based on market conditions
- • Minimum Output Guarantee: Transactions specify minimum MNEE output; if not met, the transaction reverts
- • Fast Execution: Multi-hop swaps typically complete in <15 minutes, minimizing exposure to volatility
- • MEV Protection: Private mempool routing prevents front-running on volatile swaps
Can I get refunds if I change my mind?
Cryptocurrency transactions are irreversible by design, but Gravity provides options:
- • Before Execution: You can cancel anytime before approving the transaction in your wallet
- • After Execution: Refunds depend on the merchant's policy. Merchants can initiate refunds by sending MNEE back to your address
- • Merchant Tools: Our dashboard provides one-click refund functionality for merchants
- • Dispute Resolution: For high-value transactions, merchants can optionally use escrow smart contracts
What's the maximum transaction size?
Transaction limits depend on liquidity availability:
- • Typical Limit: $100,000 per transaction for most token pairs
- • Large Transactions: Up to $1M+ for highly liquid pairs (USDC, ETH, WBTC)
- • Split Orders: Larger amounts automatically split across multiple DEXs to minimize slippage
- • Custom Solutions: For institutional volumes (> $10M), contact us for OTC routing
The system automatically checks liquidity depth before presenting quotes to ensure successful execution.
Do I need to create an account to use Gravity?
For Payers: No account needed! Simply:
- 1. Click the payment link
- 2. Connect your Web3 wallet (MetaMask, Rainbow, etc.)
- 3. Complete the payment
For Merchants: Create a free account to:
- • Generate payment links
- • Track payment history
- • Access analytics dashboard
- • Download receipts and reports
How is Gravity different from using a DEX aggregator directly?
Gravity is purpose-built for payments, not just token swaps:
- • Payment Links: Share gravity.xyz/pay/id instead of wallet addresses
- • Unified Settlement: Automatic conversion to MNEE for treasury management
- • QR Codes: Mobile-friendly payment experience
- • Receipt Generation: Cryptographic proof of payment for accounting
- • Merchant Dashboard: Track all payments, analytics, and revenue in one place
- • No Technical Knowledge: Users don't need to understand bridges, DEXs, or routing
Think of Gravity as "Stripe for crypto" rather than just a swap aggregator.
What chains and tokens are supported?
Supported Chains (20+):
Supported Tokens: 1.2M+ ERC20 tokens including:
Roadmap
Current Status (Q4 2024 - Q1 2025)
Core Infrastructure Complete
- • LiFi SDK integration with Wagmi 3.0 and Viem
- • Payment link generation with customizable themes
- • QR code payment system with animated UI
- • Dashboard analytics for payment tracking
Multi-Chain Support
- • Ethereum Mainnet (Chain ID: 1)
- • Optimism, Arbitrum, Base, Polygon support
- • Automatic chain switching with Wagmi
Mainnet Launch
- • Security audits and testing
- • Production deployment pipeline
- • Merchant onboarding program
Future Development (2025+)
Q2 2025: Enhanced Features
- • Mobile native apps (iOS & Android)
- • Subscription payment support
- • Advanced analytics with AI insights
- • Multi-signature merchant wallets
Q3 2025: Ecosystem Expansion
- • Additional Layer 2 network support
- • DeFi protocol integrations
- • NFT payment capabilities
- • E-commerce platform plugins
Q4 2025: Decentralization
- • Community governance implementation
- • Protocol token launch
- • Global exchange partnerships
- • Regulatory compliance framework