Presage
Derivates layer built on top of Polymarket, enabling users to trade options on their underlying polymarket position with onchain settlement via CRE.
What it is
Presage is an onchain options protocol for prediction markets that lets users write, buy, and settle call and put options on outcome tokens from platforms like Polymarket. Sellers can lock their outcome tokens as collateral to create options with custom strikes, premiums, and expiries, while buyers can purchase these options to gain leveraged exposure to prediction market outcomes. Options are represented onchain and settle automatically based on the final market price, enabling hedging, speculation, and volatility trading around real world events.
The protocol’s core innovation is its integration with the Chainlink's CRE. Instead of users calling protocol contracts directly, a CRE workflow acts as a secure transaction executor. The workflow receives authenticated requests via an HTTP trigger, generates a signed CRE report, and submits it onchain through a forwarder contract to the MarketFactory.sol. The factory verifies the report and routes the operation to the appropriate Market.sol contract to execute actions like WRITE, BUY, EXERCISE, or CANCEL. CRE also powers fully automated option settlement. A scheduled CRON workflow runs every five minutes, scans all markets for expired options, fetches current midpoint prices from the Polymarket orderbook API, and submits signed exercise reports to the protocol contracts. This design demonstrates how CRE can coordinate offchain computation, external data access, and automated execution while maintaining deterministic, verifiable interactions with onchain protocol logic.
We encourage anyone to checkout the live/hosted site
CRE repo
Contracts repo
Frontend repo
How it Works
Presage is built with three main parts. Smart contracts, CRE workflows, and a frontend UI. The core protocol is written in Solidity and deployed on Polygon. A MarketFactory contract creates and manages individual option markets tied to prediction market outcome tokens. Each market allows users to write, buy, exercise, or cancel options via EIP712 compliant signatures, backed by collateralized outcome tokens. The factory inherits from a CRE receiver contract, allowing it to securely accept reports generated by CRE workflows and route them to the appropriate market contracts.
The automation and execution layer is implemented using the CRE with TypeScript and the CRE SDK. A workflow defines both HTTP and CRON triggers. The HTTP trigger accepts requests to perform operations like writing, buying, exercising, or cancelling options. These requests are encoded into a report payload, signed via CRE’s runtime.report, and submitted onchain using EVMClient.writeReport. The protocol contracts verify the report via the CRE forwarder before executing the requested operation. CRE is also used for automated option settlement. A CRON trigger runs periodically to discover expired options, fetch midpoint prices from the Polymarket orderbook API, and generate exercise transactions for settlement. For this prototype, the CRE workflows are executed in simulation using the CRE CLI rather than being fully deployed, demonstrating how the protocol would integrate with CRE automation in production while allowing the entire flow to be tested locally.
We encourage anyone to checkout the live/hosted site
CRE repo
Contracts repo
Frontend repo
Links
Created by
- Forrest Chew
- Nick Morris