Seer documentation
  • Overview
    • 📘 What is Seer?
    • 📚 Glossary
  • Getting Started
    • 💡 Wallet and network
    • 💰 Deposit tokens
      • On Ethereum
        • Deposit DAI
        • Deposit sDAI
      • On Gnosis
        • Deposit xDAI
        • Deposit wxDAI or sDAI
    • 🧭 Navigate Our Site
      • Create a market
      • Verify market
      • Mint, merge, redeem outcome tokens
      • Buy, sell outcome tokens
      • Report answer
      • Raise a dispute
      • Resolve market
      • Provide Liquidity
      • Conditional Markets
      • Futarchy Markets
  • Developers
    • 📝 Intro
    • 🔄 Diagrams
      • Seer overall interaction
      • Create Market
      • Split, Merge, Redeem
      • Question and Resolve
    • 🔗 Interact with Seer
      • Create a market
      • Resolve a market
      • Split, Merge and Redeem
      • Market example
      • Conditional market
      • Futarchy market
    • 📜 Contracts
      • Core
        • MarketFactory
        • Market
        • MarketView
        • Router
        • GnosisRouter
        • MainnetRouter
        • RealityProxy
        • Interfaces
      • Futarchy (test)
        • FutarchyFactory
        • FutarchyProposal
        • FutarchyRouter
        • FutarchyRealityProxy
      • Token
        • Seer
      • Interaction
        • 1155-to-20
          • Wrapped1155Factory
        • conditional-tokens
          • ERC1155
            • ERC1155
            • ERC1155TokenReceiver
            • IERC1155
            • IERC1155TokenReceiver
          • ConditionalTokens
          • CTHelpers
        • cross-chain-realitio-proxy
          • dependencies
            • IAMB
            • RealitioInterface
          • ArbitrationProxyInterfaces
          • RealitioForeignArbitrationProxyWithAppeals
          • RealitioHomeArbitrationProxy
        • reality
          • RealityETH-3.0
        • sDAI-on-Gnosis
          • interfaces
            • IBridgeInterestReceiver
            • IWXDAI
          • periphery
            • SavingsXDaiAdapter
          • SavingsXDai
      • Deployed contracts
    • 🌐 Subgraph
      • Query Examples
      • GraphQl Query
        • Market
        • Swapr
        • Curate
      • GraphQL Schema
      • Subgraph ID
  • OTHER
    • 🔍 Audit Reports
Powered by GitBook
On this page
  • Create a futarchy market
  • Split, merge and redeem a conditional market
  1. Developers
  2. 🔗 Interact with Seer

Futarchy market

PreviousConditional marketNext📜 Contracts

Last updated 3 months ago

In futarchy markets, participants trade based on their expectations of how specific decisions will impact the price of a token.

We could have a market asking Will proposal "GIP-120: Should GnosisDAO acquire Headquarters (HQ.xyz) to Accelerate Gnosis 3.0" be accepted by February 1 2025, 00:00 UTC? You can refer to for a usage example

Create a futarchy market

To create a futarchy market, call FutarchyFactory.createProposal with the correct parameters:

await futarchy.createProposal({
  marketName: `Will proposal "GIP-120: Should GnosisDAO acquire Headquarters (HQ.xyz) to Accelerate Gnosis 3.0" be accepted by February 1 2025, 00:00 UTC?`,
  category: "misc",
  lang: "en_US",
  collateralToken1: GNO_ADDRESS,
  collateralToken2: wstETH_ADDRESS,
  minBond: 1e18, // Reality.eth minimum bond that may be used for an answer
  openingTime: 1767139200, //2025-12-31T00:00:00.000Z
})

Split, merge and redeem a conditional market

To interact with futarchy markets, we use the FutarchyRouter , a specialized version of the Router designed specifically to work with futarchy proposals. All the concepts related to wrapping ERC1155 tokens into ERC20 tokens and other processes explained for standard markets also apply here.

Splitting

await collateralToken.approve(futarchyRouter, 1e18); // allow the router to spend your collateral tokens
await futarchyRouter.splitPosition(
    futarchyProposal, // proposal address
    collateralToken, // e.g.: GNO or wstETH
    1e18, // split amount
);

Merging

await yesOutcome.approve(futarchyRouter, 1e18); // allow the router to spend your yes tokens
await noOutcome.approve(futarchyRouter, 1e18); // allow the router to spend your no tokens
await futarchyRouter.mergePosition(
    futarchyProposal, // proposal address
    collateralToken, // e.g.: GNO or wstETH
    1e18, // merge amount
);

Redeeming

// redeemPositions can redeem only one collateral token
await yesOutcomeGNO.approve(futarchyRouter, 1e18); // allow the router to spend your yes tokens

await router.redeemPositions(
    futarchyProposal, // proposal address
    yesOutcomeGNO, // token to redeem
    1e18, // amount to redeem
);

// redeemProposal can redeem one or both collateral tokens, so you must approve the specific token(s) you intend to redeem
await yesOutcomeGNO.approve(futarchyRouter, 1e18);
await yesOutcomeWSTETH.approve(futarchyRouter, 0.1e18);

await router.redeemProposal(
    futarchyProposal, // proposal address
    1e18, // amount of token underlying to redeem
    0.1e18, // amount of currency underlying to redeem
);

this Hardhat test