hackquest logo

OnStock

OnStock is a cross-chain trading infrastructure for tokenized stocks (RWA). Same stock, different chains, different issuers, different prices — OnStock finds the best price and executes cross-chain swaps automatically.

ビデオ

テックスタック

Next
Rust
Solidity
React

説明

OnStock — Cross-Chain RWA Stock Trading Protocol

Problem

Tokenized stocks (TSLA, NVDA, AAPL...) exist on multiple chains — Backed on Solana, Ondo on Ethereum, Dinari on Arbitrum. Same stock, different chains, different issuers, different prices. Users face three problems:

  1. No way to compare prices across chains — each DEX is isolated

  2. No way to move positions between chains — stuck on the chain you bought on

  3. No RWA-specific risk awareness — generic DEX aggregators don't know about NAV deviation, market hours, or issuer trust

Solution

OnStock is the cross-chain routing and swap layer for tokenized stocks. It connects every chain, every issuer, and every DEX into one interface. Users trade at the best available price across all chains, and move positions cross-chain with one signature.

How It Works

Buy / Sell Users buy tokenized stocks with USDC at the best real-time DEX price sourced from Raydium, KyberSwap, DexScreener, etc. Prices are compared across issuers (Backed, Ondo, Robinhood) and the system routes to the optimal one. 0.5% trading fee.

Cross-Chain Swap User wants to move TSLA from Arbitrum to Solana:

  1. User signs one transaction — token is sold on Arbitrum at the best price

  2. USDC value stays in the Arbitrum liquidity pool

  3. OnStock automatically buys the same stock on Solana at the best price and delivers to the user

  4. USDC reserves are rebalanced between pools in the background

One signature. Seconds to complete. 0.05% cross-chain fee.

RWA Intelligence Unlike generic DEX routers, OnStock understands RWA-specific risks:

  • NAV Freshness: Is the market open? How stale is the price? (exponential decay scoring)

  • Issuer Trust: Ondo (0.92) vs Backed (0.88) vs PreStocks (0.35)

  • Price Deviation: How far is the DEX price from the real stock price

  • Liquidity Depth: Can this trade execute without significant slippage

Architecture

Inspired by THORChain's cross-chain liquidity model:

Arbitrum Pool (USDC) ←→ Gateway ←→ Bridge Relay ←→ Gateway ←→ Solana Pool (USDC)
  • OSPool: Each chain holds USDC reserves. Every token is always backed

  • OSGateway: Handles buy/sell at oracle price, cross-chain burn/mint

  • Bridge Relay: Auto-detects burn events, mints on destination chain, rebalances pools

  • Price Oracle: Real-time stock prices pushed to on-chain contracts every 30 seconds

ハッカソンの進行状況

Phase 1 — RWA Scoring Engine Built 5-dimension RWA scoring system (liquidity, slippage, NAV deviation, freshness, issuer trust) — no other DEX aggregator scores tokenized stocks on these dimensions Net Value projection formula: entry premium + slippage + gas + yield over holding period — tells users actual ROI, not just APY Market freshness: exponential decay with 6-hour half-life based on real regularMarketTime from Yahoo Finance, not fake timestamps Connected real data sources: Yahoo Finance stock prices, Raydium pool TVL/volume, DexScreener DEX prices, Kamino yields — replaced all hardcoded values Phase 2 — Multi-Chain ERC4626 Vaults Deployed OnStockVault (ERC4626) on X Layer Testnet and Arbitrum Sepolia — 8 tokenized stocks each Built PortfolioVault for one-token diversified exposure (TSLA 25%, NVDA 25%, AAPL 20%, SPY 15%, GOOGL 15%) RWA scoring engine drives vault weight allocation, auto-rebalance via Keeper Phase 3 — Cross-Chain Gateway (THORChain Architecture) Designed and deployed OSGateway + OSPool — THORChain-style liquidity pool architecture Each chain has a USDC-backed pool. Every token is always backed by reserves OSToken (osTSLA, osNVDA...): unified share tokens, 8 stocks across 2 chains Gateway handles buy/sell at real-time DEX prices, cross-chain bridgeBurn/bridgeMint Phase 4 — Cross-Chain Swap (Fully Automated) Built BridgeWatcher: backend event listener that polls for BridgeBurn events every 15 seconds User signs once → token burned on source chain → BridgeWatcher auto-mints on destination chain → Keeper rebalances USDC between pools Real DEX price routing: swap uses best sell price on source chain (highest) and best buy price on dest chain (lowest) from live aggregator data Fee: 0.5% buy/sell, 0.05% cross-chain swap Phase 5 — Solana On-Chain Program Wrote and deployed os-gateway Anchor program on Solana Devnet Initialized gateway PDA, registered 8 stock assets, created osToken SPL mints Keeper pushes Yahoo Finance prices to Solana on-chain accounts Full mint/redeem flow working via Solana program

資金調達の状況

seed round - raising $3.8 million
チームリーダー
OOnstock
プロジェクトリンク
業界
RWADeFi