📎DegenDuel
Description
The core contract managing duels, stakes, resolutions, and payouts. It integrates with $DUEL, USDC, Uniswap V2, and Chainlink oracles.
Inheritance
Ownable (from OpenZeppelin).
Key Integrations
IERC20 for $DUEL and USDC.
IUniswapV2Router02 for swapping $DUEL to ETH.
PriceOracle (Chainlink interface) for price data.
Constants
MIN_STAKE = 1000.
Mappings
oracleAddresses
: Asset ID → Oracle address.duels
: Duel ID → Duel struct.Stakes: Per duel, per user, for/against, in $DUEL/USDC.
Deployment
Constructor sets Uniswap router, marketing wallet (deployer), sample oracle addresses (all point to a Sepolia ETH/USD oracle for testing), USDC, and $DUEL addresses.
Last updated