🛠️Duel Struct

Each duel is stored in a Duel struct with sub-structs for organization:

DuelConfig

  • asset: uint256 (ID of the crypto asset).

  • startTime: uint256 (block timestamp when created).

  • startPrice: int256 (oracle price at start).

  • duration: uint256 (seconds until end).

  • percentage: uint8 (1-100% change required).

  • isUp: bool (true for price increase prediction).

DuelStatus

  • resolved: bool (true after resolution).

  • winnerFor: bool (true if "for" side wins).

DuelPots

  • effectiveLosingDuel: uint256 (losing $DUEL pot after fees).

  • effectiveLosingUsdc: uint256 (losing USDC pot after fees).

  • totalForDuel: uint256 (total $DUEL staked on "for").

  • totalAgainstDuel: uint256 (total $DUEL staked on "against").

  • totalForUsdc: uint256 (total USDC staked on "for").

  • totalAgainstUsdc: uint256 (total USDC staked on "against").

Last updated