TECHNICAL SPECIFICATION · v1.0

SunSea Protocol

A parimutuel prediction market for real-world weather events, settled against authoritative observations, with a 5% ETH fee hook routed to $SS stakers. This document specifies the mechanism precisely.

CONTRACTS · published on deploy CHAIN · ETHEREUM UPDATED · 2026-05-31

00 Abstract

SunSea is a binary prediction market on measurable weather outcomes. Each market poses a single yes-or-no question, such as a temperature threshold, a precipitation total, a landfall, or a recorded wind gust, with a fixed close time and a pre-declared resolution source. Participants stake the protocol token $SS on YES or NO. At close, the market settles deterministically against the official observation. There is no house, no order book, and no discretionary settlement: the weather is the oracle.

A flat 5% fee is levied on trade flow and collected in ETH. This fee accrues to a reward pot that is distributed pro-rata to $SS stakers. The protocol never mints new tokens to pay rewards; all yield is denominated in real ETH derived from activity.

01 Overview

The protocol comprises four contracts: the $SS token, a parimutuel markets contract, a Uniswap V4 fee hook, and a staking contract. Each market is created by the owner and progresses through three states.

StateTriggerBehavior
LIVEcreated → closeStakes accepted on either side
CLOSING< 1h to closeStakes accepted; UI flags amber
SETTLEDobservation postedWinning pool claims the pot

All state transitions are on-chain and timestamped. No stake may enter a market after its close time.

02 Markets & Settlement

A market specification is immutable once deployed. It binds the question to a single, machine-readable resolution criterion.

struct Market {
  string  question;    // human-readable
  uint8   category;    // 0 rain · 1 temp · 2 storm · 3 snow · 4 wind · 5 sky
  uint64  closeTime;   // unix, UTC: betting closes after this
  Status  status;      // Open | Resolved | Cancelled
  Result  result;      // None | Yes | No | Invalid
  uint256 poolYes;     // $SS staked on YES (net of fee)
  uint256 poolNo;      // $SS staked on NO
  uint256 feeAccrued;  // $SS fees collected on this market
}

Each market binds a question to a category and a hard close time. After closeTime, the resolver reports the outcome and the market becomes Resolved (YES or NO) or Cancelled (Invalid). Questions are authored around a single, checkable real-world observation, so the call is unambiguous and reproducible by any observer.

Resolution sources

Outcomes are sourced from official meteorological networks (for example METAR station data, or national hurricane advisories for landfall) and reported on-chain by the resolver once the market closes. The resolver is a dedicated role, separate from ownership, and never takes a side in any market.

03 The Parimutuel Pool

Each market holds two pools, Y (YES) and N (NO). A bet of size s pays a 2% fee in $SS to the treasury; the net n = 0.98·s is added to the chosen pool and recorded as the staker's share of it. There is no counterparty matching and no price impact beyond the change in pool ratio.

Let the total pot be P = Y + N, where both pools are already net of fees. On settlement the entire pot is distributed to the winning side, with no settlement fee. A staker holding net stake nᵢ in the winning pool W ∈ {Y, N} collects:

collectᵢ = (nᵢ / W) · P

The losing pool is fully redistributed to winners; the winning side also recovers its own stake as part of its proportional share of P. Backing the minority side yields a larger multiple precisely because fewer stakers divide the pot. The market is solvent by construction: the sum of all winner payouts equals P exactly.

04 Pricing & Odds

There is no quoted price. The implied probability of YES is simply the pool ratio:

p(YES) = Y / (Y + N)

The displayed needle and probability bar render p(YES) directly. Because a stake changes the pool it joins, the act of trading moves the odds; the interface previews the post-trade state live as the amount is typed. For a winning bet of size s on side W (net n = 0.98·s, opposing pool L), the collect and implied return are:

collect  = (n / (W + n)) · (P + n)
multiple = collect / s

where P = W + L is the pre-trade pot. This is shown to the user before any call is placed.

05 Fee Hook & Rewards

A flat 5% fee is applied to every $SS trade and collected in ETH by a Uniswap V4 hook on the $SS/ETH pool. Fees are never taken in newly minted $SS. Collected ETH is forwarded to the staking contract's reward accumulator.

TRADE
5% ETH
ACCUMULATOR
STAKERS

The accumulator uses a standard reward-per-share index. A staker's claimable balance is the index delta since their last interaction, multiplied by their staked amount. Rewards accrue continuously and may be collected at any time without unstaking.

06 The $SS Token

$SS is the medium of trade and the unit of staking. It has a fixed supply; the protocol has no mint authority for rewards. Its utility is twofold:

  • Stake on market outcomes to win a share of pots.
  • Stake into the vault to collect a pro-rata share of all protocol ETH fees.
ParameterValue
SymbolSS
Supply100,000,000 (fixed)
Distribution100% into the LP at launch
Reward assetETH
Trade fee (hook)5.00% in ETH to stakers
Market bet fee2.00% in $SS to treasury

07 Staking

Staking is non-custodial and free of lockups. A staker's reward share is linear in stake:

shareᵢ = stakedᵢ / totalStaked
weeklyETHᵢ ≈ shareᵢ · feeFlowETH

Stake and unstake settle in the same transaction window with no cliffs or vesting. Pending ETH rewards are checkpointed on every stake change so no accrual is lost.

08 Architecture

ContractResponsibility
SunSeaThe $SS ERC-20. Fixed 100,000,000 supply, all paired into the LP.
WeatherMarketsHolds the YES/NO pools, accepts bets, resolves and pays out.
SunSeaHookUniswap V4 hook. Takes 5% in ETH on every $SS trade.
SunSeaStakingReward-per-share accounting; streams the ETH fees to stakers.

The contracts are self-contained, with no external dependencies, and the owner can renounce ownership. The resolver that reports outcomes is a dedicated role, separate from ownership, that can be delegated to an oracle service or a multisig.

09 Risk & Edge Cases

Observation unavailable

If an authoritative observation is not posted within the resolution window, the market enters a void state and all stakes are returned net of zero fee. No outcome is forced.

One-sided pools

If a market settles with an empty winning pool, the opposing stakes are refunded; there are no winners to pay and the fee is waived.

Ambiguity

Markets are authored around a single threshold and a single source to eliminate interpretive settlement. Specifications that cannot be resolved mechanically are not deployed.


This document is a technical specification, not financial advice. Prediction markets carry risk of total loss of staked $SS.