[{"data":1,"prerenderedAt":254},["ShallowReactive",2],{"project-biscotti":3},{"id":4,"title":5,"body":6,"date":239,"description":240,"extension":241,"featured":242,"github":243,"image":243,"live":37,"meta":244,"navigation":242,"path":245,"role":243,"seo":246,"status":247,"stem":248,"tags":249,"updated":243,"__hash__":253},"projects\u002Fprojects\u002Fbiscotti.md","Biscotti Finance",{"type":7,"value":8,"toc":232},"minimark",[9,14,23,34,42,77,80,85,163,165,169,175,185,208,214,216,220,223],[10,11,13],"h1",{"id":12},"biscotti-a-dex-built-from-the-math-up","Biscotti — a DEX built from the math up",[15,16,17,18,22],"p",{},"Biscotti is a decentralized exchange on ",[19,20,21],"strong",{},"Arc",", Circle's stablecoin-native L1. Not a fork with a new logo: the V3 math, the smart-order router, the subgraphs and the contracts were all built and deployed as one system.",[15,24,25,28,29,33],{},[19,26,27],{},"The interesting constraint:"," on Arc, gas ",[30,31,32],"em",{},"is"," USDC. The chain has no volatile native token, which quietly breaks assumptions baked into every AMM codebase — starting with WETH.",[35,36,41],"a",{"href":37,"rel":38,"target":40},"https:\u002F\u002Fbiscotti.finance",[39],"nofollow","_blank","Live App",[15,43,44,47,48,52,53,52,56,52,59,52,62,52,65,52,68,52,71,52,74],{},[19,45,46],{},"Tech Stack:"," ",[49,50,51],"code",{},"Solidity"," · ",[49,54,55],{},"Foundry",[49,57,58],{},"React Router 7",[49,60,61],{},"TypeScript",[49,63,64],{},"viem \u002F wagmi",[49,66,67],{},"Cloudflare Workers",[49,69,70],{},"The Graph",[49,72,73],{},"Turborepo",[49,75,76],{},"Tailwind CSS",[78,79],"hr",{},[81,82,84],"h2",{"id":83},"whats-in-it","What's In It",[86,87,88,99],"table",{},[89,90,91],"thead",{},[92,93,94,97],"tr",{},[95,96],"th",{},[95,98],{},[100,101,102,113,123,133,143,153],"tbody",{},[92,103,104,110],{},[105,106,107],"td",{},[19,108,109],{},"Swap",[105,111,112],{},"Smart-order routing that quotes V3 and StableSwap separately, then takes the best executable price",[92,114,115,120],{},[105,116,117],{},[19,118,119],{},"Liquidity",[105,121,122],{},"Uniswap V3-style concentrated positions, plus a StableSwap curve for correlated pairs",[92,124,125,130],{},[105,126,127],{},[19,128,129],{},"Earn",[105,131,132],{},"MasterChef farms, single-stake Coffee Pools",[92,134,135,140],{},[105,136,137],{},[19,138,139],{},"Launchpad",[105,141,142],{},"Fair token launches — liquidity live from the first block, LP locked by contract",[92,144,145,150],{},[105,146,147],{},[19,148,149],{},"Battles",[105,151,152],{},"On-chain trading competitions with a subgraph-backed leaderboard",[92,154,155,160],{},[105,156,157],{},[19,158,159],{},"Info",[105,161,162],{},"TVL, volume, fees and per-pool analytics from a self-hosted indexer",[78,164],{},[81,166,168],{"id":167},"design-choices-worth-defending","Design Choices Worth Defending",[15,170,171,174],{},[19,172,173],{},"Gas is USDC, so the wrapped-native model had to go."," Arc's USDC is dual-interface — native for gas at 18 decimals, ERC-20 for everything else at 6. Every AMM assumes one canonical wrapped native. I made the routing layer speak ERC-20 only and treat the 18-decimal form as a gas detail, because mixing them in pool math is a rounding bug you find in production.",[15,176,177,180,181,184],{},[19,178,179],{},"The router never quotes what it can't execute."," The deployed routers are single-protocol — one understands V3 pools, the other StableSwap. A blended route prices better and then reverts. So the quote layer asks each protocol independently and keeps the best ",[30,182,183],{},"executable"," trade. Approval targets are resolved from the same function that builds the calldata, so it's structurally impossible to approve one router and swap against another.",[15,186,187,190,191,194,195,194,198,194,201,194,204,207],{},[19,188,189],{},"Monorepo split by capability, not by app."," Fourteen packages — ",[49,192,193],{},"v3-sdk",", ",[49,196,197],{},"smart-router",[49,199,200],{},"swap-sdk-core",[49,202,203],{},"tokens",[49,205,206],{},"chains"," — consumed by one React Router 7 frontend and six Cloudflare Workers. The SDKs are unit-tested away from any UI, which is the only reason tick math and price impact are trustworthy.",[15,209,210,213],{},[19,211,212],{},"Indexing is mine."," Routing, analytics, farms and the launchpad each run as a Worker in front of The Graph, so the frontend never waits on a cold subgraph to render a price.",[78,215],{},[81,217,219],{"id":218},"status","Status",[15,221,222],{},"Live on Arc Testnet with real pools, real trades and real TVL. Mainnet follows Arc's.",[15,224,225],{},[30,226,227,228,231],{},"Currently building ",[19,229,230],{},"AgentPay"," — pay a merchant's invoice link in USDC, with an agent that reads your balances and routes whatever you hold into the exact amount owed.",{"title":233,"searchDepth":234,"depth":234,"links":235},"",2,[236,237,238],{"id":83,"depth":234,"text":84},{"id":167,"depth":234,"text":168},{"id":218,"depth":234,"text":219},"2026-05-31","A full DeFi exchange on Circle's Arc — concentrated liquidity, StableSwap, farms, a launchpad and trading battles, built from the SDK up.","md",true,null,{},"\u002Fprojects\u002Fbiscotti",{"title":5,"description":240},"Live on testnet","projects\u002Fbiscotti",[250,251,21,252,51,61],"DeFi","DEX","Concentrated Liquidity","xpbHiNTTL9EWnyBbPl1mok624UeVj7gHK_aTvXaVoAk",1787298664163]