StabL

Universal Stablecoin Payment Gateway with Intent-Based Settlement

HackMoney 2026Shipped January 30, 2026 Dormant#defi#payments#infra#security
Visit Repo
StabL banner

About

StabL Gateway is a universal stablecoin payment infrastructure that eliminates the forced tradeoff between settlement speed and transaction cost. Traditional payment processors require merchants to choose between paying high gas fees for instant settlement or waiting indefinitely for batch settlement savings. StabL Gateway solves this by decoupling payment receipt from on-chain settlement using Yellow Network's state channels for instant liquidity provision while intelligently batching compatible settlements to minimize gas costs. Merchants receive credit in under one second regardless of their settlement preferences, then the system optimizes on-chain finalization based on merchant-declared intents. The architecture consists of three smart contracts deployed on Arc testnet where gas is paid in USDC. PaymentPool receives and tracks per-merchant balances across multiple tokens. IntentVault stores merchant settlement preferences on-chain with three strategies: IMMEDIATE for instant settlement at higher gas cost, STANDARD to wait up to a specified time for batch partners, and DEFERRED to accumulate until reaching a minimum threshold for maximum savings. BatchSettler executes atomic multi-merchant settlements in single transactions, validating intents and ensuring all settlements succeed or fail together to prevent partial execution. The TypeScript backend uses an event-driven architecture built on Redis Streams for durable, exactly-once message processing. A WebSocket listener detects PaymentReceived events in real-time from Arc's blockchain. Upon receiving a payment, the system immediately credits the merchant via Yellow Network's state channel transfer method, writes the payment to PostgreSQL for compliance and audit trails, then evaluates the merchant's on-chain intent to determine settlement timing. When conditions are met, the batch optimizer groups compatible settlements and executes them as a single on-chain transaction through BatchSettler, achieving 60-80% gas savings compared to individual settlements. Yellow Network integration provides the instant liquidity layer through off-chain state channels. The backend maintains a WebSocket connection to Yellow's clearnode, authenticates using EIP-712 signatures, and executes transfer RPC calls to credit merchants in their unified balance. This happens in under one second and costs zero gas since it's entirely off-chain. The current implementation uses a hybrid approach with real WebSocket connections and authentication flow, falling back to demo mode for the unfunded sandbox while maintaining production-ready architecture that requires only depositing funds to Yellow's custody contracts for full functionality. Li.Fi integration enables cross-chain settlement routing using their production API without requiring funds for demonstration. When merchants specify a target token or chain different from the payment currency, the system calls Li.Fi's getQuote method to retrieve actual routing data including bridge selection, DEX aggregation, gas cost estimates in USD, and execution time predictions. This provides real quotes from Li.Fi's aggregation of over 20 bridges and 50 DEXs across 40+ chains. The system then simulates execution based on the real quote data, showing exactly how funds would be routed in production while the merchant receives their preferred token on their chosen destination chain. The complete system demonstrates production-ready payment infrastructure with comprehensive testing including 45+ unit tests and fuzz testing via Foundry, database persistence for regulatory compliance, graceful error handling with intelligent fallbacks, and horizontal scalability through event-driven architecture. The frontend dashboard provides real-time visualization of payment processing with live updates as events flow through the system, showing Yellow Network credits, intent evaluations, batch settlements, and Li.Fi routing quotes. This combination of instant liquidity, cost optimization, merchant control, and cross-chain flexibility creates a payment gateway that serves real merchant needs rather than forcing artificial tradeoffs.

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

DormantLast push 257 days ago

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.