IP-Fi Launchpad for Story Protocol β Tokenize IP assets with bonding curves and royalty injection.
Sovry enables creators to launch tradeable tokens backed by their Story Protocol IP assets. Creators lock Royalty Tokens (RT) into a bonding curve, which deploys a branded ERC-20 wrapper token. When the raise target is hit (10,000 IP market cap), the token graduates to a PiperX V3 DEX pool. All royalties from Story Protocol are automatically injected back into the token's liquidity.
π Live on Story Mainnet: sovry.xyz
- Network: Story Protocol Mainnet (chainId
1514) - Testnet: Story Aeneid (chainId
1315)
SovryFactory.solβ Token launch entrypoint (delegates to Exchange)SovryExchange.solβ Bonding curve vault (trading, graduation, royalty injection, LP custody)SovryRouter.solβ User-facing gateway for buy/sell/launch operationsSovryToken.solβ ERC-20 wrapper token (deployed per launch)
Deployed Addresses (Mainnet):
- Factory (Launchpad):
0x501047D4D5E323DB64855c14557aC1D3B7393298 - Exchange:
0xA2b90B0c02B422F66cacBe5B6515Fd5702B7074D - Router:
0xfCDBa29166Bc61f23F63977655141C7e99804302
- Framework: Next.js 16 (App Router) + TypeScript
- Styling: TailwindCSS + shadcn/ui components
- Wallet: Dynamic.xyz (multi-wallet support)
- Charts: Lightweight Charts (TradingView-style)
- Deployment: Vercel (production) or VPS (self-hosted)
Key Pages:
/β Token gallery (trending, new launches, search)/createβ Launch new IP-backed tokens/profileβ Portfolio + creator dashboard/pool/[address]β Trading terminal (chart + swap interface)
- Indexing: Goldsky subgraph (GraphQL API for trades, launches, holders)
- Database: Supabase (token metadata, profiles, royalty state)
- Storage: Pinata IPFS (token logos, metadata JSON)
- Worker: Node.js background jobs (royalty harvesting, price updates, graduation checks)
- IP Asset Registry (fetch IP metadata, ownership)
- Royalty Module (harvest royalties, inject into liquidity)
- Licensing Module (display license terms)
- Story SDK + HTTP API for on-chain interactions
All details below reflect the current Aeneid deployment used for the hackathon.
-
Factory β
SovryFactory- Nonpayable launch entrypoint (no launch fee)
- Calls
SovryExchange.launchTokenFromFactory(...) - Emits
TokenLaunched(rt, wrapper, creator, amount, launchTime)
-
Exchange β
SovryExchange- Holds locked Royalty Tokens (RT) and mints the wrapper supply
- Runs a linear bonding curve (buy/sell)
- Trade fee: 1% total (100 bps) β 0.5% treasury / 0.5% IP Asset
- Treasury share is queued to
pendingWithdrawals - IP Asset share is queued in
accumulatedRoyaltyNativeand only delivered once the keeper wraps to WIP viaprocessRevenue
- Treasury share is queued to
- Graduation (PiperX V3):
- Extracts 10% of native reserve pre-LP; split 50% treasury / 50% IP Asset (IPA portion is also queued as native royalty revenue)
- Mints V3 LP position; stores LP NFT tokenId; marks wrapper graduated; unlocks transfers; renounces wrapper ownership
- Royalties + DEX fees: all ERC20 tokens (WIP / wrapper) split 50% treasury / 50% IP Asset via keeper-only
depositRoyalties,collectDexFees, and the newprocessRevenue(native β WIP +payRoyaltyOnBehalf)
-
Router β
SovryRouter- Convenience gateway for UI:
launchToken(...)β FactorybuyETH(...)/sell(...)β Exchange
- Convenience gateway for UI:
-
Wrapper Token β
SovryToken- Deployed by Exchange via
new SovryToken(name, symbol, rtAddress, exchange) - 18 decimals; used purely as the tradeable wrapper around locked RT
- Minting/burning controlled by the Exchange; public wrapping is disabled
- Deployed by Exchange via
Key onβchain behaviours:
-
Launch / Wrapper Pattern
Factory.launchToken(rtAddress, amount, ipAsset, name, symbol)- Calls
Exchange.launchTokenFromFactory(...) - Exchange enforces a fixed launch lock amount (
amount == 100 RT) - Deploys a new
SovryTokenwrapper (wrapperAddress) and mints the fixed wrapper supply (18 decimals) - Stores mapping
rtToWrapper[rt] -> wrapperandwrapperToRt[wrapper] -> rt - Emits
TokenLaunched(rt, wrapper, creator, amount, launchTime)
- Calls
-
Launch Amount
- Launch amount is currently fixed at
100 RTand enforced by the Exchange.
- Launch amount is currently fixed at
-
Bonding Curve
- Buy path (UI):
Router.buyETH(wrapperToken, amount, maxEthCost, deadline)- Linear curve using
basePriceandpriceIncrement - Collects 1% fee from base cost, split 50/50 treasury/IP Asset
- Updates
BondingCurve.currentSupplyandreserveBalance - Emits
TokensPurchased(buyer, wrapperToken, amount, baseCost, feeAmount, feeRecipient)
- Linear curve using
- Sell path (UI):
Router.sell(wrapperToken, amount, minEthProceeds, deadline)- Sells along the same linear curve
- 1% fee split 50/50 treasury/IP Asset, emits
TokensSold(seller, wrapperToken, amount, baseProceeds, feeAmount, feeRecipient)
calculateBuyPrice/calculateSellPriceare exposed as view helpers
- Buy path (UI):
-
Harvest (Pull Model)
- Native trade fees accrue per token in
accumulatedRoyaltyNative(IPA share of fees) - Keeper jobs:
harvestFromVault(wrapperToken)β pull Story vault revenue + convert IPA share depending on graduation statepushFeesToVault(wrapperToken)β push accumulated native IPA fees to Story vault- (Optional)
collectDexFeesfor LP fees when graduated
- Emits:
RoyaltyRevenueQueued/RoyaltyRevenueProcessed(push path)RevenueHarvested(pull harvest, pre/post grad)BuybackExecuted(post-grad buyback of WIP)
- Native trade fees accrue per token in
-
Redeem (Burn wrapper β withdraw RT)
- Users can call
Exchange.redeem(wrapperToken, wrapperAmount, recipient) - RT returned is pro-rata:
rtAmount = wrapperAmount * totalLocked / totalSupply - Emits
TokensRedeemed(redeemer, wrapperToken, wrapperAmount, rtAmount, recipient)
- Users can call
-
Graduation to PiperX V3
- Exchange tracks reserves and market cap; when above
graduationThresholdfor a delay,_checkGraduationtriggers_graduate(see contract for details):- Adds liquidity on PiperX V3 via PositionManager; receives LP NFT (tokenId) and stores it
- Marks
launchedTokens[wrapper].graduated = true, unlocks wrapper transfers, renounces wrapper ownership - Emits
Graduated(wrapperToken, liquidity, poolAddress)and LP tokenId is queryable vialpTokenIds(wrapper)
- Fallback: if LP mint fails, wrapper + ETH liquidity go to treasury and graduation still emits with
poolAddress=0(no LP)
- Exchange tracks reserves and market cap; when above
-
Navigation
Homeβ/Createβ/createProfileβ/profile
-
Home (
/) β Launch Gallery- Reads WrapperToken entities from the Goldsky subgraph
- Enriches with metadata from Supabase (
launchestable) and Story IP data - Shows wrapper address, creator, launch time, market cap and curve stats
- Clicking a card routes to
/pool/[address]for trading
-
Create (
/create) β Launch Existing IP- Fetch IP assets owned by the connected wallet via Story API (
fetchWalletIPAssets) - For each IP, detect if a royalty vault exists and whether it has RTs
- Optional Get Royalty Tokens step:
- Transfers RTs from the IP Account to the creator wallet via Story SDK (
transferRoyaltyTokensFromIP)
- Transfers RTs from the IP Account to the creator wallet via Story SDK (
- Configure Launch:
- Wrapper name & symbol (autoβsuggested from IP metadata, editable)
- Launch on Bonding Curve:
- Under the hood: approves
SovryExchangefor100 RTand callsRouter.launchToken
- Under the hood: approves
- After launch, metadata for the wrapper is pinned to IPFS (Pinata) and mirrored into Supabase
- Fetch IP assets owned by the connected wallet via Story API (
-
Profile (
/profile) β Portfolio & Creator Console- Header: wallet address, username/bio/avatar from Supabase
profiles - Tokens launched (creator view):
- Pulled from subgraph (
WrapperToken.creator == wallet) - Shows symbol, name, onβchain balance, and Available to Harvest (WIP)
Available to Harvest (WIP)is computed from Story royalty vault WIP balance viagetClaimableRoyaltyForIp- Actions per token:
- Claim β claims Story revenue to the wallet/IP account and transfers WIP to the Exchange
- The keeper will later run
Exchange.harvest(wrapperToken)
- The keeper will later run
- Claim β claims Story revenue to the wallet/IP account and transfers WIP to the Exchange
- Pulled from subgraph (
- Your holdings (investor view):
- Queries all wrapper tokens from subgraph, then reads perβwrapper ERCβ20 balances
- Shows list of tokens the wallet holds and links to
/pool/[address]for trading
- Header: wallet address, username/bio/avatar from Supabase
-
Pool Detail (
/pool/[address]) β Trading Terminal- Left: bonding curve chart (from subgraph
Candleentities) + IP metadata + comments (if Supabase enabled) - Right:
- Bonding curve progress vs graduation threshold
- Trade widget (bondingβcurve buy/sell via
buy/sell) - Notes:
- Royalty harvest is performed by a keeper (not directly from the UI)
- Left: bonding curve chart (from subgraph
Directory: subgraph/
- Data Sources:
SovryFactory+SovryExchangeon Story Aeneid - Tracked Events (see
subgraph/subgraph.yaml):TokenLaunched(address rt, address wrapper, address creator, uint256 amount, uint256 launchTime)TokensPurchased(address buyer, address wrapperToken, uint256 amount, uint256 baseCost, uint256 feeAmount, address feeRecipient)TokensSold(address seller, address wrapperToken, uint256 amount, uint256 baseProceeds, uint256 feeAmount, address feeRecipient)TokensRedeemed(address redeemer, address wrapperToken, uint256 wrapperAmount, uint256 rtAmount, address recipient)- Pull/Push revenue events:
RoyaltyRevenueQueued,RoyaltyRevenueProcessed,RevenueHarvested,BuybackExecuted Graduated(address wrapperToken, uint256 liquidity, address poolAddress)GraduationThresholdUpdated(uint256 newThreshold)
Core entities in schema.graphql:
Launchpadβ aggregate stats (totalTokens, totalTrades, totalVolume, totalFees)WrapperTokenβ one per launched wrapper (creator, launchTime, totalLocked, dexReserve, initialCurveSupply, totalRoyaltiesHarvested, poolAddress, totalHarvestedAmount, totalFeesPushed)RevenueEventβ normalized push/pull revenue events (type: PUSH / HARVEST_RESERVE / HARVEST_BUYBACK)HarvestEvent/BuybackEventβ per-harvest and per-buyback detailsTokenStat/ProtocolMetricβ per-token and protocol aggregatesTrade,Holder,Candle, etc. for UI analytics
The Goldsky subgraph is used by the Home grid, Pool charts, and Profile page.
Used for scripts and subgraph tooling (nonβfrontend):
# Owner / deployer
OWNER_ADDRESS="0x8c317fb91a73e2c8d4883dded3981982f046f733"
# RPC / explorer access
NEXT_PUBLIC_AENEID_RPC_URL="https://aeneid.storyrpc.io"
TENDERLY_USERNAME="..." # optional
TENDERLY_PROJECT="..." # optional
# Goldsky subgraph endpoint (Aeneid)
GOLDSKY_ENDPOINT="https://api.goldsky.com/api/public/project_cmhxop6ixrx0301qpd4oi5bb4/subgraphs/sovry-aeneid/1.0.1/gn"Copy from frontend/.example.env and fill:
## RPC / explorer access
NEXT_PUBLIC_TENDERLY_RPC_URL="https://story-aeneid.gateway.tenderly.co"
NEXT_PUBLIC_STORY_RPC_URL="https://aeneid.storyrpc.io"
NEXT_PUBLIC_STORY_API_KEY=""
## Third-party services
NEXT_PUBLIC_API_URL="http://localhost:3001"
GRAPH_WEBHOOK_SECRET=<same secret as keeper bot>
NEXT_PUBLIC_SUBGRAPH_URL="https://api.goldsky.com/api/public/project_cmhxop6ixrx0301qpd4oi5bb4/subgraphs/sovry-aeneid/1.0.1/gn"
NEXT_PUBLIC_SUPABASE_URL="https://cupllnxfdbxfigzrmqjy.supabase.co"
NEXT_PUBLIC_SUPABASE_ANON_KEY=<supabase anon key>
NEXT_PUBLIC_DYNAMIC_ENVIRONMENT_ID="" # Dynamic env id
NEXT_PUBLIC_ENABLE_DEBRIDGE_WIDGET="true"
## Sovry Factory (Aeneid)
NEXT_PUBLIC_LAUNCHPAD_ADDRESS="0x2eC6513800426cA9B3530bd04cdB5A8f47c9C038"
NEXT_PUBLIC_BASE_PRICE_WEI="100000000000"
NEXT_PUBLIC_PRICE_INCREMENT_WEI="2000000"
NEXT_PUBLIC_DEMO_ROYALTY_AMOUNT_WEI="1000000000000000000"Tip: Never commit real API keys or private keys. Only
.example.envwith placeholders is versioned.
From project root:
# Install all workspace dependencies (contracts, frontend, subgraph, backend)
npm install
# Run frontend + backend together
npm run dev # frontend: http://localhost:3000, backend: http://localhost:3001
# Or only frontend
npm run dev:frontend
# Or only backend worker
npm run dev:backend# Test frontend build
cd frontend
npm run build
npm start
# Test backend
cd backend
npm startSubgraph (Goldsky / The Graph):
Node requirement: Graph CLI requires Node.js >= 20.18.1 for
subgraphcodegen/build.
# from project root
npm run subgraph:codegen
npm run subgraph:build
# deploy via Goldsky UI / CLI using the endpoint aboveContracts (Hardhat, in contracts/ workspace):
# compile & run full local test suite
npm run compile
npm test
# deploy Sovry Protocol (Factory/Exchange/Router) to Aeneid (uses contracts/scripts/deploy-launchpad.ts)
npm run deploy:launchpadcd contracts
npm run deploy:launchpad -- --network aeneid- If
STORYSCAN_API_KEYis set (andSKIP_AUTO_VERIFY!=true),scripts/deploy-launchpad.tswill automatically call Hardhat'sverify:verifyagainst Storyscan for BondingCurveLib, SovryExchange, SovryFactory, and SovryRouter. - To manually verify any contract:
npx hardhat verify --network <network> <address> <constructor_args>- Curve defaults (
CURVE_BASE_PRICE_WEI,CURVE_PRICE_INCREMENT_WEI) are read from the environment and finalized automatically during deployment (one-time). Adjust these env vars before runningnpm run deploy:launchpadif you need different bonding curve pricing.
Below is the development roadmap for Sovry, focused on pivoting from a standard AMM to a Bonding Curve Launchpad model.
Focus: Replacing the old DEX infrastructure with the new Bonding Curve Launchpad engine.
-
Architecture Design
- Pivot from AMM Model (Factory/Router) to Bonding Curve Model (Launchpad).
- Set Graduation Target to PiperX V2 (Major Story Protocol DEX).
-
Smart Contract Development
SovryToken.sol: Implement a standard, mintable/burnable ERC-20 Wrapper Contract.SovryFactory.sol/SovryExchange.sol/SovryRouter.sol:- Split responsibilities: launch (factory), trading + vault (exchange), UX gateway (router)
- Trade fee: 0.2% (20 bps) paid to creator (explicitly emitted)
- Graduation fee: 10% of reserve split creator/treasury
- Harvest: keeper-only
exchange.harvest(wrapper)
-
Deployment Scripts
- Create
scripts/deploy-launchpad.ts. - Verify contracts on StoryScan (Aeneid).
- Create
Focus: Transforming the UI from a "Swap Interface" to a "Social Trading Terminal".
-
Legacy Code Cleanup
- Remove obsolete pages: Liquidity, Pools, Swap (Old).
- Remove obsolete services calling the internal Factory/Router.
-
New "Home" Page (The Gallery)
- Grid layout displaying newly launched tokens.
- Cards showing: IP Image, Ticker, Market Cap, & Bonding Curve Progress.
- Search/Filter by Name or Category.
-
New "Create" Page (The Launcher)
- Native Story Integration: Fetch and preview IP assets directly from Story API, keyed by wallet owner.
- Transaction Flow: Get Royalty Tokens (optional) -> Approve Exchange -> Launch via Router/Factory.
-
New "Token Detail" Page (The Terminal)
- Left Column: Real-time TradingView Chart (Lightweight Charts) + IP Metadata/License Terms.
- Right Column: Buy/Sell Interface (Bonding Curve) + Slippage Settings.
- Bottom Section: Tabs for "Holder Distribution", "Transaction History", and "Comments".
Focus: Ensuring data speed and community engagement.
-
Indexer (Goldsky Subgraph)
subgraph.yamlindexesSovryFactory+SovryExchangeevents (TokenLaunched, TokensPurchased, TokensSold, TokensRedeemed, RoyaltiesHarvested, Graduated, GraduationThresholdUpdated).- Schema entities:
Launchpad,WrapperToken,Trade,Redemption,Harvest,Graduation,GraduationThresholdUpdate,Holder,Candle. - Subgraph deployed to Goldsky at
.../subgraphs/sovry-aeneid/1.0.1/gnand consumed by the frontend.
-
Social Features (Supabase)
- Setup Supabase Database tables (
profiles,comments). - Implement Real-time Comment Section on Token Detail pages.
- Implement User Profiles (Avatar, Bio, Social Links like Twitter/Telegram).
- Setup Supabase Database tables (
-
Real-time Data (Wagmi)
- Implement direct RPC Event Listeners in the frontend for instant price/chart updates (bypassing indexer delay).
Focus: Security, investor trust, and platform stability.
-
Security Hardening
- Implement SIWE (Sign-In with Ethereum) for Supabase authentication to prevent identity spoofing.
- Add Slippage Protection & Max Transaction Limits in the UI.
- Implement Rate Limiting for Social APIs.
-
IP Asset Integrity
- Ensure all displayed metadata is fetched strictly from On-Chain/IPFS (Single Source of Truth).
-
Gamification
- Whale Alerts: Toast notifications for large buy transactions.
Focus: Public release and user acquisition.
-
Testnet Beta
- Deployed to Story Aeneid Testnet.
- Community testing completed.
-
Mainnet Launch
- Deployed contracts to Story Mainnet (chainId
1514). - Live at sovry.xyz.
- Deployed contracts to Story Mainnet (chainId
-
Documentation
- Publish comprehensive docs explaining the "IP Backed Token" mechanism.
- Create video tutorials for creators.
-
Marketing Campaign
- Community outreach and partnerships.
- Creator onboarding program.
Frontend (Vercel):
# Automatic deployment on push to main
git push origin main
# Manual deployment
vercel --prodBackend (VPS/Railway/Fly.io):
# VPS deployment (see VPS_DEPLOY.md)
ssh root@your_vps_ip
cd /var/www/Sovry
bash deploy.sh
# Railway deployment (see RAILWAY_DEPLOY.md)
railway up
# Fly.io deployment (see FLY_IO_DEPLOY.md)
fly deployEnvironment Variables:
- Frontend: See
frontend/.env.example - Backend: See
backend/.env.example
Deployment Guides:
DEPLOYMENT.mdβ Full deployment guideQUICK_DEPLOY.mdβ 5-minute quick startVPS_DEPLOY.mdβ VPS deployment (recommended)RAILWAY_DEPLOY.mdβ Railway.app deploymentFLY_IO_DEPLOY.mdβ Fly.io deploymentPRE_DEPLOY_CHECKLIST.mdβ Pre-deployment checklist
- Linear bonding curve with configurable parameters
- Graduation threshold: 10,000 IP market cap
- Trade fee: 1% total (0.5% treasury / 0.5% IP asset)
- Graduation fee: 10% of reserves (50/50 split)
- Automatic harvesting of Story Protocol royalties
- Royalties injected back into token liquidity
- Background worker handles all automation
- Real-time royalty tracking in creator dashboard
- π΄ Live Trade Notifications β Real-time ticker showing all trades across the platform
- π Real-time Charts β TradingView-style charts with live price updates
- π¬ Social Layer β Comments, profiles, and community engagement
- π¨ IP Metadata β Rich IP asset display with images, licenses, and terms
- π± Mobile Responsive β Full mobile support with optimized UX
- One-click IP token launch
- Royalty dashboard with harvest tracking
- Portfolio analytics
- Token management interface
- Portfolio tracking
- Trade history
- Holder distribution analytics
- Real-time price alerts
MIT License - see LICENSE file for details.
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
Built with β€οΈ for Story Protocol