✨How It Works (Step-by-Step)
Create a Duel
Anyone can create a duel by specifying an asset (e.g., ETH), duration (in seconds), percentage change (1-100%), direction (up/down), and an optional initial stake. The starting price is fetched from the Chainlink oracle.
Stake on a Duel
Users join by staking $DUEL and/or USDC on "for" (predicting the price will meet the target) or "against". Staking is allowed until the duel duration ends.
Resolve the Duel
After the duration, anyone can call resolveDuel to check the ending price via oracle. The winner is determined:
If "up" prediction: Wins if price ≥ start price + (percentage %).
If "down" prediction: Wins if price ≤ start price - (percentage %).
Process Fees
The losing pot is reduced by fees. For $DUEL, part is burned and part swapped to ETH. For USDC, fees go directly to the marketing wallet.
Claim Winnings
Winners claim their original stake plus a proportional share of the effective losing pot.
Edge Cases
If no stakes on one side, the duel can still resolve, but payouts are limited. Unresolved duels can't be staked on after time expires.
The platform is owned by a deployer who can update the marketing wallet or perform emergency withdrawals. All interactions are on-chain for transparency.
Token
$DUEL is an ERC20 token with minting (owner-only) and burning capabilities. It's used for staking and has deflationary mechanics via burns.
Deployment Notes
Built on Solidity 0.8.20. Tested on networks with Uniswap V2 and Chainlink oracles (e.g., Ethereum Sepolia for the provided oracle address).
Last updated