Technical Documentation

Protocol Architecture

System Overview

Split Finance is composed of four layers: an ingestion layer that accepts position tokens from external venues, a matching layer that pairs opposing stakers, a yield layer that routes collateral into DeFi strategies, and a resolution layer that unwinds positions when markets settle.

┌──────────────────────────────────────────────────────────────┐ │ USER-FACING INTERFACES │ │ Web App · SDK · REST API · WebSocket │ └────────────────────────────┬─────────────────────────────────┘ │ ┌────────────────────────────▼─────────────────────────────────┐ │ INGESTION LAYER │ │ Polymarket CTF Adapter Kalshi Wrapped-Token Bridge │ └────────────────────────────┬─────────────────────────────────┘ │ ┌────────────────────────────▼─────────────────────────────────┐ │ MATCHING LAYER │ │ PairingEngine · Imbalance Oracle · Boost Calculator │ └────────────────────────────┬─────────────────────────────────┘ │ ┌────────────────────────────▼─────────────────────────────────┐ │ YIELD LAYER │ │ YieldRouter · Aave · Compound · Morpho │ └────────────────────────────┬─────────────────────────────────┘ │ ┌────────────────────────────▼─────────────────────────────────┐ │ RESOLUTION LAYER │ │ Auto-Unwind · Payout Distribution · Yield Settlement │ └──────────────────────────────────────────────────────────────┘

Ingestion Layer

Polymarket adapter

Positions arrive as ERC-1155 tokens from the Conditional Token Framework. The adapter reads market metadata from the Polymarket CLOB API and validates that the token contract matches the expected CTF deployment before accepting deposits.

Kalshi bridge

Kalshi operates a centralized order book. Split Finance operates a custodial wrapper that mirrors Kalshi positions as ERC-20 tokens on-chain. The wrapper is fully collateralized and audited quarterly.

Matching Layer

For each supported market, the PairingEngine maintains an ordered queue of pending YES and NO stakers. Matching occurs when a new stake can be paired against an existing opposite-side stake at equivalent notional.

function match(uint256 marketId) external returns (bool) {
    Queue storage yes = yesQueues[marketId];
    Queue storage no  = noQueues[marketId];

    while (!yes.isEmpty() && !no.isEmpty()) {
        Stake memory a = yes.peek();
        Stake memory b = no.peek();
        uint256 notional = min(a.amount, b.amount);

        _settlePair(marketId, a.owner, b.owner, notional);

        yes.consume(notional);
        no.consume(notional);
    }
    return true;
}

Imbalance oracle

A TWAP-based oracle publishes the current YES/NO imbalance per market every 60 seconds. When imbalance exceeds 70/30, the boost calculator begins scaling the scarce-side APY from +1.00% up to a +2.00% ceiling.

Yield Layer

Once paired, the underlying collateral is released from the CTF contract and deposited into the YieldRouter. Allocation follows a fixed target basket with automatic rebalancing when any strategy drifts more than 10% from its target.

function rebalance(uint256 marketId) external {
    uint256 total = vaults[marketId].totalCollateral();

    _allocate(marketId, AAVE,     total * 60 / 100);
    _allocate(marketId, COMPOUND, total * 25 / 100);
    _allocate(marketId, MORPHO,   total * 15 / 100);
}

APY floor enforcement

A daily keeper job computes realized yield across all strategies. If the trailing 7-day average falls below 6.00% APY, the treasury transfers the difference into the market's yield reserve, which is streamed to stakers over the following week.

Resolution Layer

When a market resolves on its source venue, the resolution keeper:

  1. Withdraws all collateral from yield strategies into the market vault
  2. Redeems the winning side's payout from the CTF contract
  3. Streams final yield accrual to all stakers proportionally
  4. Distributes principal + winnings to the winning staker
  5. Burns receipt tokens and closes the market

Oracle Design

Yield distribution requires an authoritative TWAP per position. The oracle runs inside a Trusted Execution Environment (TEE) that produces signed attestations. On-chain contracts verify the attestation before mutating any vault state.

struct YieldAttestation {
    uint256 marketId;
    uint256 timestamp;
    uint256 twapYes;
    uint256 twapNo;
    bytes   enclaveSignature;
}

Security Model