Developer updates for @somnia_network - a blockchain built for AI agents & real-time applications.

Somnia
Joined September 2025
Indexing contract data on Somnia just got easier. @envio_indexer now has first-class support for Somnia. Build an indexer with HyperIndex, or pull raw data straight from HyperSync. Historical and real-time, ready to query.
Envio has first-class support for devs building on @Somnia_Network, a hyper-performant L1 built for agents. Index your contracts with HyperIndex, powered by HyperSync, our high-performance data API with up to 2000x faster data access than traditional RPC. Power your projects with real-time data. envio.dev
6
1
22
853
Building on Event Contracts: the full recap The Event Contracts Hackathon ends September 8. Over the past few weeks, we’ve broken down the core infrastructure behind @dreamDEXSomnia Event Contracts, from understanding the contracts to building a bot that survives markets rolling every 15 minutes. Here’s everything we covered, and the mistakes to avoid 🧵
8
1
1
18
774
Markets end. Positions don’t necessarily end with them. A settled market can disappear from loadMarkets() while you still have funds tied to it. → Winnings need to be claimed → Voided markets refund both sides at 0.5 Don’t treat a market disappearing as the end of your position lifecycle.
1
1
52
Then the market rolls and your bot has to do it all again. A new market can even reuse the same pool address. → Identify markets by marketId, not pool → Use the nonce to distinguish them → Reset market-specific state the moment the ID changes That’s the difference between a script that works once and a bot that keeps running. The Event Contracts Hackathon closes 8 September. Time to put it all together and ship. Docs: docs.dreamdex.io/developers/…: github.com/somnia-chain/drea…: dorahacks.io/hackathon/event…
1
50
How do you keep a bot alive on @dreamDEXSomnia when the market it’s trading disappears every 15 minutes? Last time, we followed the collateral. This time, we’re looking at the loop that survives the roll. Here’s how 🧵
9
2
17
424
Skip that reset and the failure isn’t always obvious. One of our quoting bots tried to cancel an order ID it was still tracking and got: cancelOrder reverted: IncorrectSender Order IDs are scoped to the pool, not globally unique. A stale order ID isn’t just useless. It can now refer to somebody else’s order. That’s why orders, books and other market-specific state all need to disappear when the market ID changes. 4/5
2
2
18
That’s the loop: Discover → Gate → Trade → Detect the roll → Reset Track one market ID at a time and drop its state the moment that ID changes. The pool, order IDs and book all follow from that rule. Building for the Event Contracts Hackathon? Docs: docs.dreamdex.io/developers/… Submit your build before 8 September: dorahacks.io/hackathon/event… 5/5
1
2
28
Where does your collateral actually go when you trade Event Contracts on @dreamDEXSomnia? Last time, we placed an order. This time, we’re following the collateral: what leaves your wallet, what comes back, and how you get something to sell. Here’s how 🧵
3
1
15
515
And it reverses exactly. burnSet(symbol, 5) wallet 7611.470 → 7616.470 Up 5 → 0 Down 5 → 0 Up + Down is always one whole contract. That’s why the two prices sum to 1, and why you can unwind a pair you haven’t sold. 4/5
2
4
37
The best part: you don’t need inventory to quote both sides. Two opposite buyers can match with no seller at all. The pool mints the pair from their combined collateral. Buy Up at p + Buy Down at 1 − p = a complete two-sided quote. Learn more:  docs.dreamdex.io/developers/… 5/5
1
4
31