Because higher precision deserves higher returns
Frontend lives on the
frontendbranch.
| Contract | Address |
|---|---|
| PintelMarket (impl) | 0xe8fAe54b3358bF79C09b82D140B212828971f52B |
| PintelMarketFactory | 0xE41D71CE0F5C2A26946eE999C33B5a523F151759 |
| ChainlinkResolver | 0xd480c456A7CbbDE3F209170bB587A977e1A5CFcf |
| MockERC20 (collateral) | 0xEb2927E0274d4A1D52685610bf256468b79EEa4d |
ENS: pintel.eth on Sepolia
- Yellow Network β Off-chain order book for secondary position trading via ERC-7824 state channels
- ENS β Subname registration (
*.pintel.eth) and text records for market indexing and trader reputation - Chainlink β Price feed oracles for settlement and Automation keepers for trustless market resolution at expiry
| Function | Description |
|---|---|
createMarket(params) |
Deploy a new prediction market as an ERC-1167 clone with ENS subname |
getAllMarkets() |
Returns all deployed market addresses |
getMarketsByCreator(address) |
Returns markets created by a specific address |
userStats(address) |
Returns trader reputation: wins, totalClaims, totalPayout |
syncReputationToENS(bytes32) |
Writes trader stats to ENS text records |
updateMarketRecords(bytes32) |
Updates market ENS records (totalPool, status, positionCount) |
recordResolution(bytes32) |
Records final outcome to ENS after market resolves |
recordClaim(address,uint256,bool) |
Updates trader stats after a claim |
| Function | Description |
|---|---|
openPosition(mu, sigma, collateral) |
Open a Gaussian position with predicted mean, confidence, and stake |
closePosition(positionId) |
Withdraw collateral before market ends |
transferPosition(positionId, newOwner) |
Transfer position ownership to another address |
claim(positionId) |
Claim payout after market is resolved |
resolve(outcome) |
Oracle-only: resolve market with final outcome value |
question() |
Returns the market question string |
getActivePositionCount() |
Returns number of active positions |
getMarketDistribution() |
Returns aggregate (mu, sigma) across all positions |
positions(id) |
Returns full position data: owner, mu, sigma, collateral, active, claimed |
| Function | Description |
|---|---|
registerMarket(market, priceFeed) |
Register a market with its Chainlink price feed |
resolveMarket(market) |
Resolve a single market using live Chainlink price |
batchResolve(markets) |
Resolve multiple expired markets in one tx |
checkUpkeep(checkData) |
Chainlink Automation: checks if any markets need resolving |
performUpkeep(performData) |
Chainlink Automation: resolves eligible markets |
PintelMarketFactory.sol ββ Creates markets via ERC-1167 clones
βββ ENS subname registration (*.pintel.eth)
βββ Text records (question, category, status, endTime)
βββ User reputation tracking (wins, accuracy, payout)
PintelMarket.sol ββ Core AMM + positions + settlement
βββ LΒ² norm CFMM over Gaussian distributions
βββ Position lifecycle: open β close / resolve β claim
βββ Payout = totalPool Γ userPDF(outcome) / Ξ£allPDFs(outcome)
GaussianMath.sol ββ Fixed-point Gaussian math (PRBMath SD59x18)
βββ pdf, l2Norm, scaledPdf, peak, minSigma
βββ All pure functions, no state
ChainlinkResolver.sol ββ Automated oracle resolution
βββ Reads Chainlink price feeds
βββ Chainlink Automation compatible (checkUpkeep/performUpkeep)
βββ Batch resolve multiple markets
- Contracts: Solidity 0.8.24, Foundry, OpenZeppelin, PRBMath SD59x18, Solady
- Oracle: Chainlink Price Feeds + Automation
- Identity: ENS subnames + text records
- Frontend: Next.js 15, wagmi v2, ConnectKit, Recharts, Binance WebSocket
- Chain: Ethereum Sepolia
