Private prediction markets built on Flare.
DarkPool is a decentralized prediction market platform built on the Flare Coston2 testnet.
It allows users to create prediction markets, trade on YES or NO outcomes, provide liquidity, resolve markets, and claim rewards after resolution.
- Create prediction markets
- Trade YES and NO positions
- Provide and withdraw liquidity
- Resolve markets
- Claim rewards
- Search and explore markets
- Trending markets
- Wallet integration
- Creator fee system
- Flare Coston2 testnet support
- Coston2 Explorer and Faucet links
- FAQ and How It Works sections
- Next.js
- React
- TypeScript
- Tailwind CSS
- Solidity
- Hardhat
- Ethers.js / Viem
- Flare Coston2
DarkPool is split into two main parts.
The frontend is built with Next.js, React, TypeScript, and Tailwind CSS.
It provides the user interface for:
- Browsing markets
- Creating markets
- Trading positions
- Managing liquidity
- Claiming rewards
- Connecting wallets
The smart contract layer is built with Solidity and Hardhat.
The main contracts are:
MarketRegistry.solPredictionMarket.sol
MarketRegistry manages market information and market status.
PredictionMarket handles liquidity, YES and NO positions, market resolution, rewards, and fee accounting.
darkpool-app/
├── frontend/
│ ├── app/
│ ├── components/
│ ├── public/
│ └── ...
│
├── contracts/
│ ├── contracts/
│ │ ├── MarketRegistry.sol
│ │ └── PredictionMarket.sol
│ ├── scripts/
│ ├── test/
│ └── hardhat.config.ts
│
└── README.md
git clone https://github.com/AranAveng/darkpool-app.git
cd darkpool-appGo to the frontend directory:
cd frontendInstall dependencies:
npm installStart the development server:
npm run devThe application will normally run at:
http://localhost:3000
Open a separate terminal and go to the contracts directory:
cd contractsInstall dependencies:
npm installCreate the required environment variables for the Coston2 network.
Example:
COSTON2_RPC_URL=your_rpc_url
PRIVATE_KEY=your_wallet_private_keyCompile the contracts:
npx hardhat compileDeploy to Flare Coston2:
npx hardhat run scripts/deploy.ts --network coston2DarkPool currently runs on the Flare Coston2 testnet.
Network: Flare Coston2
Chain ID: 114
Native Token: C2FLR
Use the website links to access the Coston2 Explorer and Faucet.
The current Coston2 deployment uses:
0xdd8ee6dbafdd899111c896d0e261c257db4c35c8
0x4626d47a46dec10772f7187a7ae4eb08c155f44c
- Connect your wallet
- Browse available prediction markets
- Select a market
- Choose YES or NO
- Enter the amount of FLR
- Confirm the transaction
- Wait for the market to end
- The market creator resolves the market
- Winning positions can claim rewards
Creators can also provide liquidity when creating a market.
DarkPool uses a 2% total trading fee.
The current fee split is:
2% total
├── 1% market creator
└── 1% DarkPool treasury
The treasury wallet is:
0xa1A6d000859955f62C8fDbFB101f70a00F3cc856
The frontend uses the deployed contract addresses from the project configuration.
When deploying new contracts, update the frontend contract address configuration so the application points to the correct deployment.
Do not commit private keys, RPC secrets, or other sensitive values to the repository.
This project is actively developed as a Flare Coston2 testnet application.
Before making changes:
- Keep frontend and contract addresses in sync
- Test smart contract changes locally before deployment
- Verify Coston2 transactions after deployment
- Avoid committing secrets or environment files
The frontend can be deployed to Vercel.
The smart contracts are deployed to Flare Coston2.
DarkPool is currently a testnet project.
It is intended for development, testing, and experimentation on Flare Coston2.
This project is licensed under the MIT License.