Why Privacy Is A Prerequisite For Prediction Markets

Prediction markets are a fascinating and valuable mainstream use case for blockchain, but transparency could be a dealbreaker. Soda Labs’ garbled circuits-based MPC is the ideal solution.

If stablecoins are DeFi’s first killer app, prediction markets may be the second. In 2024 Polymarket became a breakthrough use case for blockchain, as users flocked to stake money on the outcome of the US Presidential Election.

In total, $3.7 billion was wagered on the election alone. With $15 billion in all-time volume, Polymarket is now the world’s largest prediction market.

Interestingly, Polymarket called the outcome of the US Election correctly, when many conventional polling services didn’t. It is possible that this was partly due to users voting with their money, incentivizing more informed decision-making, as well as the way the platform adjusts odds transparently in line with shifting sentiment in real time.

Like other DeFi markets, though, prediction markets are vulnerable to attacks that derive from that same transparency. To make this intriguing application truly mainstream, these platforms must integrate privacy, and garbled circuits are the obvious choice of technology.

What Are Prediction Markets?

Prediction markets allow users to trade contracts based on the predicted outcome of future events, such as an election or a sports match. The price of a contract reflects the market’s view on the likelihood of that outcome. Prices are set by supply and demand, so as more people bet on a given outcome, its price rises, signaling higher confidence.

This allows a user to trade evolving probabilities. For example, during the Presidential Election, a user could have bought contracts for a Trump victory in April at $0.43, and sold them in July for $0.70 as the odds were increasing. A trader can alternatively hold the contract to maturity, at which point it will be worth either $1 or $0, depending on the outcome.

Polymarket and other platforms like it use the blockchain in several ways, but key to decentralized prediction markets’ appeal is their perceived fairness. Anyone can audit the blockchain and smart contracts to ensure the price genuinely reflects the perceived odds – unlike centralized prediction markets and betting sites, which rely on operators who may introduce inefficiencies and additional fees, if not outright manipulating the odds.

The Downsides Of Transparency

As with other dApps, transparency raises real risks for users. A prediction market is a kind of DEX for trading probabilities, and the same kind of MEV exploits are possible.

  • Front-running: If bots detect a large bet or transaction in the mempool, they can pay extra gas to insert their own transaction ahead of it to take advantage of the coming change in odds, or to manipulate odds. 
  • Back-running: A bot places a transaction immediately after a significant market-moving transaction, capitalizing on price changes or arbitrage opportunities it brings.
  • Sandwich attack: The bot places trades immediately before and after an incoming transaction, buying/selling on either side to profit from the “slippage” in odds (and therefore contract price) that occurs when a large trade is placed.
  • Transaction exclusion: Validators could potentially exclude or delay certain bets to influence the market’s outcome, at least temporarily.

Privacy is vital to maintaining prediction markets’ integrity, but market manipulation is just one area where prediction markets would benefit from greater privacy. 

  • Freedom and protection. Privacy underpins individual liberty. Just as elections can only be free and fair when they are private, so must betting on sensitive or controversial outcomes – including elections – come with guarantees of privacy. Without this, there may be real-world consequences for users.
  • Financial privacy. In addition to reputational risk (fair or unfair), there is the risk that users’ financial data and history could be exposed, increasing the risk of phishing or physical attacks.
  • Participation and Liquidity. Cautious users may avoid engaging with prediction markets for these reasons, reducing market liquidity and decreasing the diversity of opinion, making the pool of participants less representative of the population as a whole and the market less accurate as a result.

In short, decentralized prediction markets are emerging as a new kind of forecasting tool that often appears to be more reliable or nuanced than existing methods. Without privacy, their core value proposition is undermined and their fairness compromised.

Why Garbled Circuits Are Ideal For Prediction Markets

Soda Labs has developed an on-chain implementation of garbled circuits-based MPC, which offers a way of executing any algorithm or computational operation with encrypted (garbled) inputs and outputs. Observers see only the encrypted data, and at no point in the process is plaintext exposed.

This technology offers several benefits over other privacy solutions, some of which are particularly relevant in the context of prediction markets and wider DeFi applications.

Soda’s solution is lightweight compared to fully homomorphic encryption (FHE) or even ZK proofs. Ciphertexts are small (just 32 bytes), compared to several kilobytes for FHE and several hundred bytes for even the smallest ZKPs. (Zero-knowledge proofs are, in any case, unsuited for this use case because they do not support computation on shared state.)

GCs front-load encryption at the setup (circuit creation) stage, meaning it is a one-off cost. Actual execution is fast and efficient. Along with the compact ciphertexts, this ensures efficiencies in computation demands, bandwidth, and storage. These are all important for on-chain applications, where resources are limited and additional overheads must be paid for one way or another – either directly by users in gas, or indirectly in terms of block rewards (inflation).

Soda’s technology is highly streamlined, removing unnecessary costs and the need for specialist hardware – whether hardware acceleration for FHE or secure processing for TEEs. It’s therefore ideally suited to smaller transactions – DeFi users who might spend $1-10 instead of thousands of dollars, and on prediction markets, retail users who make up the “long tail” of opinion, helping to provide a more nuanced and representative expectation of outcomes.

Prediction markets are emerging as a new killer app for blockchain: simultaneously a form of entertainment, and a tool for real-time forecasting. Soda Labs’ privacy technology will allow them to reach their full potential.

Follow Us!

To find out more about Soda Labs’ work on garbled circuits, explore our documentation, join the gcEVM Vanguards Telegram group, or stay up to date with the latest developments by following the project on X.