Skip to content

jamesmccomish/megaparlay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Megaparlay Megaparlay

Megaparlay is a parlay betting platform built on the Conditional Token Framework (CTF). V1 is a simple jackpot style mechanism where users pick sets of 6 outcomes, and the first user to correctly complete a parlay wins the entire prize pool up to that point.

Overview

🧠 Concepts

  • Outcomes: Outcomes are added by the Megaparlay owner. They are active until they are resolved on the CTF.
  • Parlays: Users select sets of 6 active outcomes to create a parlay. All 6 must be correct to win.
  • Fixed Entry Cost: Each parlay costs exactly 1 USDC
  • Winner-Takes-All: The first user to claim with a correct parlay wins the entire prize pool up to that point.
  • CTF Integration: Leverages outcomes from existing prediction markets for outcome validation.

🛠️ Key Features

  • Inactive Timeout: If admin doesn't add outcomes for 32 days, users can withdraw funds.
  • V2 Migration: If there is a contract upgrade, all funds will be transferred to the new contract. There is a 48-hour grace period for users to claim refunds on open parlays before the migration can occur.
  • Owner Controls: The owner has the right to add and remove outcomes, and to set the v2 contract address.

Architecture

Megaparlay is built as a monorepo with the following packages:

Deployments

Network Contract Address
Polygon Megaparlay 0x29de9089705BF45f220cFCfdb3658ABAe5F47E75
Amoy Megaparlay 0xdF556a10Dc25b06717EaEC258D13044AB0905523
Amoy MockCTF 0xE8BD3779c8259dEb0C6be1D5E6673b02E8ed0d17

License

This project is licensed under MIT copyright James McComish.

About

A parlay betting platform built on the Conditional Token Framework & Polymarket API

Topics

Resources

License

Stars

Watchers

Forks