Skip to main content

Smart Contracts

These are Djinn's Base mainnet contract addresses. They are UUPS upgradeable proxies governed by a TimelockController, so the proxy addresses below stay stable while implementation logic upgrades through the timelock.

Live on Base mainnet. These proxy addresses are permanent; settlement is denominated in Circle USDC.

Governance

TimelockController: 0xDdB899dEE76a3241f500201f215FBf5eF6A16d2F

All contract upgrades and configuration changes go through an on-chain timelock. A governance multisig is the sole proposer; anyone can execute after the delay. Contracts have Pausable, UUPS upgradeToAndCall, and ReentrancyGuard.

USDC

Circle USDC: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

Settlement uses Circle's official USDC on Base.

SignalCommitment

Stores encrypted signal blobs, commitment hashes, and signal metadata. Entry point for genius signal creation.

Address (Base)

Mainnet
0x4D54797740141165FF997884Be0162eee39278c6

Key functions

commitSignal(bytes encryptedBlob, bytes32 commitHash, string sport, ...)cancelSignal(uint256 signalId)getSignal(uint256 signalId) view

Escrow

Holds idiot USDC deposits. Handles purchases, fee distribution, and buyer withdrawals.

Address (Base)

Mainnet
0xE79AC0488D14E2747Ad6251631dB1922E4CeC2E8

Key functions

deposit(uint256 amount)withdraw(uint256 amount)purchase(uint256 signalId, uint256 notional, uint256 odds)claimFees(address genius, address idiot)claimFeesBatch(address genius, address[] idiots)setOutcome(uint256 purchaseId, uint8 outcome)

Collateral

Holds genius USDC collateral backing their SLA commitments. Slashed on negative settlement.

Address (Base)

Mainnet
0x870768AbBd6AA1D7E390691082cb769A21ca56D8

Key functions

deposit(uint256 amount)withdraw(uint256 amount)deposits(address) viewlocked(address) view

Account

Tracks genius-idiot pair purchases in an append-only queue for settlement grouping.

Address (Base)

Mainnet
0x4a65461239Ce1417f90fF8d6A47392d2672455Bb

Key functions

recordOutcome(address genius, address idiot, ...)getQueueState(address genius, address idiot) viewgetPairPurchaseIds(address genius, address idiot) viewgetAuditBatchCount(address genius, address idiot) viewgetCurrentCycle(address genius, address idiot) view

Audit

Executes settlement: computes damages, slashes collateral, distributes refunds and credits.

Address (Base)

Mainnet
0x9c5126bD9Be525107e8826029d8F340F30BD6406

Key functions

settleAuditSet(address genius, address idiot, int256 qualityScore, ...)finalizeAuditSet(address genius, address idiot)

OutcomeVoting

Validator consensus mechanism. Collects quality score votes and triggers settlement at 2/3+ agreement.

Address (Base)

Mainnet
0x870E4c6DAA26E4e77429E61c7Ad294440428cBa7

Key functions

submitVote(address genius, address idiot, int256 qualityScore, uint256 totalNotional)addValidator(address validator)removeValidator(address validator)

CreditLedger

Tracks non-transferable Djinn Credits (Tranche B damages). Credits discount future purchases.

Address (Base)

Mainnet
0x8Cd38c68106aC6346167Dec880D152d40B5a04E5

Key functions

balanceOf(address) viewaward(address recipient, uint256 amount)consume(address buyer, uint256 amount)

KeyRecovery

Allows buyers to recover signal decryption keys if they lose their local data.

Address (Base)

Mainnet
0xbDBbab32a1755e2bb7AEB7e091bf481F62dDbfa4

Key functions

storeRecoveryBlob(uint256 signalId, bytes blob)getRecoveryBlob(uint256 signalId) view

Integration

For programmatic interaction, use the REST API rather than calling contracts directly. The API handles multi-step orchestration (MPC, validator coordination, share distribution) that would be complex to replicate. Direct contract calls are suitable for read-only queries and custom indexing.

Full ABIs are available in the contracts/out directory of the repository.