Loading video player...
In Part 1, we built the bonding curve engine (mint + redeem). In Part 2, we'll turn it into a micro-ecosystem: a secondary market (Uniswap v2), trader behaviors, and arbitrageurs who eliminate price spreads. What you’ll learn: ✅ Add Uniswap v2 as a secondary market (reuse Blocks, don’t rebuild) ✅ Initialize liquidity so secondary price matches the bonding curve ✅ Model arbitrage as an Agent: detect spread → buy low → sell high ✅ Track convergence: primaryPrice vs secondaryPrice + arb profit ✅ Conductor workflow: keep complex multi-agent actions in sync each tick ✅ Scenario toggles: enable/disable traders and arbs to isolate causality Bonding Curve background (quick reference) 1) What is a bonding curve? (Coinbase): https://www.coinbase.com/learn/advanced-trading/what-is-a-bonding-curve 2) Bonding curves (Avalanche Academy): https://build.avax.network/academy/l1-native-tokenomics/07-token-distribution/03-bonding-curves Uniswap V2 / AMM background (quick reference) 1) Uniswap V2 overview: https://docs.uniswap.org/contracts/v2/concepts/protocol-overview/how-uniswap-works 2) Pools & LP tokens: https://docs.uniswap.org/contracts/v2/concepts/core-concepts/pools What you’ll build - Secondary market: - Import Uniswap v2 Block, adapt it to X/USDC - Track secondaryPrice - User behaviors: - Investors add initial liquidity (addInitialLiq) - Traders goSwap with marketTrend (bull/bear/mixed) - Arbitrage: - Arbitrageurs with threshold + size controls - goArb forward/reverse paths - Dashboards: - Two-price chart + arb profit + token distribution Chapters 0:00 Intro — 3 upgrades: Uniswap market, user behaviors, arbitrage 0:48 Global controls — marketTrend, toggles, primary/secondary prices 1:40 Add Uniswap v2 — import Block + adapt to X/USDC 3:18 Price observability — keep primaryPrice & secondaryPrice updated 4:23 Charts — visualize two-market prices live 4:28 Initial liquidity — investors seed Uniswap for a fair start 6:07 Traders goSwap — population scaling + bull/bear logic 8:54 Test run — spreads appear as traders diverge 9:28 Add Arbitrageurs — define wallet, thresholds, logging 10:55 goArb logic — detect spread, execute forward/reverse loop 14:27 Observe convergence — price chart + avg arb profit 16:49 Conductor — sync actions each tick (clean execution order) 17:31 Stats & dashboards — distribution + tracking metrics 19:57 Explore scenarios — flip trends, tune thresholds, compare outcomes 20:36 Wrap-up — next: turn this into a public experiment lab (Part 3) Watch the full HoloBit Tutorials Playlist: https://www.youtube.com/playlist?list=PLE8KkqZeu9DidKW-hqpEFsECotABdnIrN ➡️ Tutorial 4 (Part 1): https://youtu.be/9mvrTDSmsXE ➡️ Tutorial 4 (Part 3): https://youtu.be/sZgdRPyvnIU ➡️ Watch Tutorial 3 (AMM / Uniswap v2): https://youtu.be/kL96qKeFc60 Visit HoloBit and start building: https://holobit.xyz/ Disclaimer: This video is for educational purposes only and does not constitute financial or investment advice. #BondingCurve #UniswapV2 #AMM #Arbitrage #DeFi #Simulation #ABM #NoCode #HoloBit