Skip to content

Smart Contracts

All Chronomancy contracts deploy on Polygon — where Polymarket’s Conditional Tokens Framework (CTF) lives and where gas costs are negligible for the transaction types the protocol requires.


The Rewind insurance system uses four contracts with clearly separated responsibilities:

ERC-4626 vault managing the insurance capital pool.

DetailValue
StandardERC-4626 (tokenized vault)
Deposit tokenUSDC
Receipt tokenrUSDC shares
Withdrawal cooldown7 days
Max per-market exposure10% of pool
Tracked statetotalDeposited, totalCommitted, availableCapacity

The 7-day withdrawal cooldown prevents bank-run dynamics during high-claim periods.

ERC-721 policy NFTs — one per insured position.

On-chain metadata (no IPFS dependency) encodes per policy:

FieldDescription
holderPolicy owner address
conditionIdPolymarket CTF condition identifier
indexSetWhich outcome side is insured
insuredAmountPosition value in USDC
coverageAmount70% of insured amount
premiumPaidPremium in USDC
expiresAtResolution timestamp + 24h
claimed / voidedState flags

Receives (conditionId, insuredAmount) and returns a premium quote.

Steps:

  1. Read current market probability from the operator-signed oracle feed
  2. Check pool capacity (availableCapacity ≥ coverageAmount)
  3. Apply the pricing formula (actuarial base × time decay × utilization)
  4. Transfer premium from user
  5. Call RewindPolicy.mint()

The oracle is operator-signed in v0.1 (not decentralized). Decentralized oracle is a Phase 2+ upgrade — UMA is explicitly excluded due to vote-buying vulnerability at low OI.

Processes verified claims and pays out.

Verification checklist (all must pass):

  1. Caller owns the policy NFT
  2. payoutNumerators(conditionId) confirms the insured side lost
  3. Claim submitted within the 24h window after resolution
  4. User still holds the underlying CTF position (balanceOf > 0)

On valid claim: transfers coverageAmount USDC from pool to user, burns the policy NFT.


All Rewind contract interactions with Polymarket are read-only:

FunctionContractPurpose
payoutNumerators(conditionId, index)CTFRead resolution outcome
balanceOf(user, positionId)CTFVerify user holds position
positionId = keccak256(collateralToken, conditionId, indexSet)DerivedPosition identifier

CTF Contract Addresses on Polygon:

ContractAddress
Conditional Tokens0x4D97DCd97eC945f40cF65F87097ACe5EA0476045
CTF Exchange0x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982E
NegRisk Adapter0xd91E80cF2E7be2e162c6513ceD06f1dD0dA35296

The FF vault is a single ERC-4626 contract on Polygon.

DetailValue
StandardERC-4626
Deposit tokenUSDC
LP tokenffUSDC
Target alpha20–40% annualized gross
Seed capital$250K recommended
BreakevenMonth 6–9

Position transfer flow:

  1. User selects a Polymarket position to exit early
  2. Vault quotes an exit price based on user’s CS tier
  3. User approves the CTF position transfer
  4. Vault receives the ERC-1155 position shares
  5. User receives USDC immediately
  6. Vault holds position to resolution, collects the full payout

The FF vault uses a quarter-Kelly position sizing algorithm to cap exposure per market relative to vault size. This limits single-event drawdown even when many users exit the same market.


ContractChainUpgrade Pattern
RewindPoolPolygonTransparent proxy (upgradeable)
RewindPolicyPolygonNon-upgradeable (NFT contract)
RewindPricingEnginePolygonReplaceable (call target updated by admin)
RewindClaimsPolygonTransparent proxy
FF VaultPolygonTransparent proxy
CS AttestationsPolygon (via EAS)Schema-versioned

Why Polygon: Polymarket CTF positions exist on Polygon. Gas costs for the transaction volume Chronomancy expects (many small insurance purchases) are negligible. Azuro also supports Polygon.

Related: