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.
Rewind: 4-Contract Architecture
Section titled “Rewind: 4-Contract Architecture”The Rewind insurance system uses four contracts with clearly separated responsibilities:
RewindPool.sol
Section titled “RewindPool.sol”ERC-4626 vault managing the insurance capital pool.
| Detail | Value |
|---|---|
| Standard | ERC-4626 (tokenized vault) |
| Deposit token | USDC |
| Receipt token | rUSDC shares |
| Withdrawal cooldown | 7 days |
| Max per-market exposure | 10% of pool |
| Tracked state | totalDeposited, totalCommitted, availableCapacity |
The 7-day withdrawal cooldown prevents bank-run dynamics during high-claim periods.
RewindPolicy.sol
Section titled “RewindPolicy.sol”ERC-721 policy NFTs — one per insured position.
On-chain metadata (no IPFS dependency) encodes per policy:
| Field | Description |
|---|---|
holder | Policy owner address |
conditionId | Polymarket CTF condition identifier |
indexSet | Which outcome side is insured |
insuredAmount | Position value in USDC |
coverageAmount | 70% of insured amount |
premiumPaid | Premium in USDC |
expiresAt | Resolution timestamp + 24h |
claimed / voided | State flags |
RewindPricingEngine.sol
Section titled “RewindPricingEngine.sol”Receives (conditionId, insuredAmount) and returns a premium quote.
Steps:
- Read current market probability from the operator-signed oracle feed
- Check pool capacity (
availableCapacity ≥ coverageAmount) - Apply the pricing formula (actuarial base × time decay × utilization)
- Transfer premium from user
- 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.
RewindClaims.sol
Section titled “RewindClaims.sol”Processes verified claims and pays out.
Verification checklist (all must pass):
- Caller owns the policy NFT
payoutNumerators(conditionId)confirms the insured side lost- Claim submitted within the 24h window after resolution
- User still holds the underlying CTF position (
balanceOf > 0)
On valid claim: transfers coverageAmount USDC from pool to user, burns the policy NFT.
Polymarket CTF Integration
Section titled “Polymarket CTF Integration”All Rewind contract interactions with Polymarket are read-only:
| Function | Contract | Purpose |
|---|---|---|
payoutNumerators(conditionId, index) | CTF | Read resolution outcome |
balanceOf(user, positionId) | CTF | Verify user holds position |
positionId = keccak256(collateralToken, conditionId, indexSet) | Derived | Position identifier |
CTF Contract Addresses on Polygon:
| Contract | Address |
|---|---|
| Conditional Tokens | 0x4D97DCd97eC945f40cF65F87097ACe5EA0476045 |
| CTF Exchange | 0x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982E |
| NegRisk Adapter | 0xd91E80cF2E7be2e162c6513ceD06f1dD0dA35296 |
Fast-Forward: ERC-4626 Vault
Section titled “Fast-Forward: ERC-4626 Vault”The FF vault is a single ERC-4626 contract on Polygon.
| Detail | Value |
|---|---|
| Standard | ERC-4626 |
| Deposit token | USDC |
| LP token | ffUSDC |
| Target alpha | 20–40% annualized gross |
| Seed capital | $250K recommended |
| Breakeven | Month 6–9 |
Position transfer flow:
- User selects a Polymarket position to exit early
- Vault quotes an exit price based on user’s CS tier
- User approves the CTF position transfer
- Vault receives the ERC-1155 position shares
- User receives USDC immediately
- 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.
On-Chain Architecture: Polygon Deployment
Section titled “On-Chain Architecture: Polygon Deployment”| Contract | Chain | Upgrade Pattern |
|---|---|---|
| RewindPool | Polygon | Transparent proxy (upgradeable) |
| RewindPolicy | Polygon | Non-upgradeable (NFT contract) |
| RewindPricingEngine | Polygon | Replaceable (call target updated by admin) |
| RewindClaims | Polygon | Transparent proxy |
| FF Vault | Polygon | Transparent proxy |
| CS Attestations | Polygon (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:
- Rewind — insurance product details and pricing
- Fast-Forward — vault economics and tiered pricing
- Connected Markets — full CTF integration context