hackquest logo

OmniVerse

Dynamic LP protection instead of guaranteed wipeouts!! A Partially Active AMM with zero-liquidation lending, powered by a high-performance Rust kernel on Arbitrum Stylus.

Videos

Tech Stack

React
Solidity
Rust
Viem
Ponder
Web3
Wagmi

Description

OMNIVERSE

Next-Generation Prediction Markets with Zero-Liquidation Lending on Arbitrum Stylus

Description

Omniverse is a prediction market protocol that solves three catastrophic problems plaguing existing platforms: LP capital wipeout at resolution, liquidation cascades in prediction-backed lending, and prohibitive gas costs for sophisticated on-chain math. Built on Arbitrum Stylus with a Rust/WASM math kernel, Omniverse introduces novel LP protection mechanisms and the first-ever liquidation-free lending for prediction markets.

🌐 Live Application: https://omniverse-99so.vercel.app/

📄 Whitepaper: https://omniverse-99so.vercel.app/gaussian_lambda_star.pdf

📊 Technical Documentation: README.md


Inspiration

Prediction markets today have a fatal flaw: they destroy liquidity providers at resolution. When a market resolves and one outcome token becomes worthless, informed traders drain all the valuable tokens in a single block, leaving LPs holding 100% worthless inventory. This isn't impermanent loss—it's permanent, complete capital destruction.

Here's the attack: A market trades at 95% probability for YES. The event resolves YES. In one atomic transaction, arbitrageurs swap all their worthless NO tokens for valuable YES tokens at the stale AMM price. LPs wake up with zero capital. This is guaranteed by the math of standard AMMs—they expose all reserves to trading at all times, giving informed traders with perfect information a free extraction opportunity.

The second problem is lending. Existing DeFi protocols liquidate positions when collateral value drops, but prediction market prices can swing violently on new information, causing cascading liquidations that wipe out borrowers who were ultimately correct. No protocol lets you borrow against prediction positions without liquidation risk.

The third bottleneck is computational. The obvious fix—dynamically shield reserves based on probability extremes—requires computing Gaussian CDFs, PDFs, inverse CDFs, and optimal activeness parameters on every trade. In pure Solidity this costs 8,000–50,000 gas per call, making it economically infeasible.


The Fix

  • Gaussian λ* (Lambda Star) collapses LP risk into a single shielding parameter. At every block, reserves split into an active fraction (tradeable) and a passive fraction (shielded from arbitrage): x_active = λ* · x, y_active = λ* · y.

  • λ* is computed from the Gaussian PDF's tail behavior: as probability P → 0 or 1, the PDF φ(z) → 0 exponentially, forcing λ* → 0.05. So at 99% probability, 95% of LP capital is automatically hidden from arbitrageurs and can be withdrawn safely before resolution. This produces a W-shaped activeness surface—maximum liquidity at P = 0.5, minimum at the extremes.

  • Multiverse Lending makes liquidation impossible by construction. Borrow YES-USDC against YES-ETH collateral—same outcome, same fate. If the market resolves NO, both collateral and debt go to $0 and the position nets to zero. No margin call, no liquidation, no bad debt. The only residual risk is cross-currency (ETH/USD), handled with standard TWAP oracles.

  • All of this leans on Arbitrum Stylus. λ*(P) requires a Gaussian PDF, an error-function CDF approximation, an inverse CDF (Acklam rational + Halley refinement), a pool value function, and a Newton-Raphson swap solver—all fixed-point WAD math. In Solidity that's 8,000–50,000 gas per call; compiled to WASM via Stylus, it's 300–2,500 gas, a 26× speedup on the CDF alone.

  • Time-decaying liquidity bounds LP risk over a market's lifetime. Effective liquidity shrinks as L_t = L_0 · √(T - t), capping total expected Loss-vs-Rebalancing at roughly L₀/2—turning LP risk from unpredictable into quantifiable.

Progress During Hackathon

Omniverse was built from scratch during this buildathon. We started from first principles: if LP wipeout is a tail-risk explosion problem, can we mathematically model that risk and partition reserves accordingly? First we derived the Gaussian λ* formula on paper and implemented the full Gaussian kernel in Rust with fixed-point WAD arithmetic—error function approximation, Taylor exponential, Newton square root, and inverse CDF. We unit-tested this to 11 significant digits against SciPy reference values. Then we built the hybrid architecture: a pure Rust Stylus contract exposing the math functions, and Solidity contracts (AMM, conditional tokens, lending vault, factory) that call into it. The critical insight was enforcing pre-update pricing through call ordering—traders are priced against the curve before their trade moves it. We realized that outcome-conditional lending eliminates liquidation risk by construction, implemented it, and deployed everything to Arbitrum Sepolia. We built a Ponder indexer watching on-chain events, a React frontend with live curve rendering, and went through edge cases methodically: divide-by-zero guards, negative variance handling, reentrancy protection, and I256→U256 conversion assertions. By the end we had a complete system with sophisticated math running cheaply on-chain, LP protection that's provably bounded, lending without liquidation risk, and a production frontend rendering it all in real-time.

Fundraising Status

Currently bootstrapped and actively seeking pre-seed funding or grant opportunities to scale our prototype, conduct further security audits, and expand our initial pilot.
Team Leader
Vvihaan jain
Project Link
Sector
DeFiInfra