Skip to main content
Engineering Case Study

AskAround Prediction Market

Prediction-market prototype using Gnosis Conditional Tokens

protocolsScope L3

1. At a glance

AskAround is a decentralized prediction-market prototype built independently on top of the Gnosis Conditional Tokens Framework (CTF) and deployed to Base Sepolia. It spans three public repositories: core Solidity market contracts, the Base Sepolia CTF deployment integration, and a Next.js/Wagmi frontend client.

2. Why it existed

Prediction markets combine market creation, outcome token splitting/merging, and settlement rules. AskAround explores how to compose a custom market contract layer cleanly with Gnosis CTF and surface readable settlement flows to web users.

3. Contribution

Sole creator and architect across the Solidity contracts, Base Sepolia Gnosis CTF deployment wiring, and Next.js Web3 client.

4. System Shape & Architecture

System Architecture SchematicASKAROUND // SVG
Web ClientMarket interfacePrediction MarketMarket lifecyclePrototype / testnetGnosis CTFBase Sepolia
The web client connects market interactions to Gnosis Conditional Tokens on Base Sepolia.

5. The project story

AskAround was built to explore how binary and multi-outcome EVM prediction markets behave when market creation, collateral locking, and oracle-driven settlement rely directly on Gnosis Conditional Tokens instead of custom monolithic vaults.

01

Anchoring ERC-1155 outcome primitives on Base Sepolia

The foundation started with deploying and configuring the Gnosis Conditional Tokens Framework on Base Sepolia so every market question could mint verifiable ERC-1155 outcome positions backed by testnet collateral.

02

Authoring market creation and dual settlement rules

Custom Solidity market contracts were layered on top to handle question lifecycles, liquidity flows, and flexible settlement mechanisms cleanly without re-inventing outcome-token accounting.

03

Building an intuitive trading web flow

To test the contracts under realistic user journeys, a Next.js and Wagmi web client brought wallet connection, position splitting, outcome purchases, and payout claims into one streamlined browser flow.

6. Technical Decisions & Tradeoffs

Building on Gnosis CTF inherits battle-tested ERC-1155 collateral splitting instead of inventing bespoke token accounting, at the cost of explicit condition/collection ID derivation across both contracts and frontend calls.

7. Challenges & how I solved them

CTF encoding

Aligning condition IDs and index sets across Solidity and TypeScript

Gnosis Conditional Tokens derive position IDs from keccak hashes of collateral addresses, condition IDs, and bitmask index sets; any mismatch between Solidity and frontend helpers silently fails redemptions.

How I Solved It
Standardized deterministic derivation helpers mirroring CTF contract math and exposed clean read views on the market wrapper contract so the Next.js client resolves active outcome slots reliably.

Settlement clarity

Surfacing multi-step approval and redemption flows cleanly

Users interacting with CTF markets need ERC-20 collateral approvals before splitting positions and clear status cues once a market resolves.

How I Solved It
Separated allowance checks, position splits, and payout claims into sequential guarded transaction steps in the Wagmi client so partial approvals never misrepresent filled trades.

8. Verification & Security

The linked repositories provide the source for contract and client behavior. This is a prototype; no security audit, adoption, or production-readiness claim is made here.

9. Outcome & Metrics

The outcome is a linked smart-contract and web-client prototype on Base Sepolia. It remains a testnet project.

10. Reflection & Lessons Learned

Prediction-market interfaces have to make outcome and settlement behavior understandable before a user commits to a position. Connecting the client flow to an existing token framework provides a useful base for testing that interaction.

11. Explore Source & Artifacts