Loot Box smart contract
The LootBox smart contract, compatible with EVM and written in Solidity, implements the ERC721 protocol and lottery logic. For generating pure random numbers, it integrates with ChainLink VRF. The contract is deployed through a modified Upgradable Proxy mechanism that supports multiple implementations concurrently. Key modules include:
ERC721 implementation: Each loot box is an NFT, capable of changing states: LootBox -> Gem or Golden Ticket -> Burned. An intermediate locked state exists during the random number request. In its Gem or Golden Ticket state, it functions as a regular, tradable NFT.
Prize Register: This module stores information about available prizes and their probabilities.
Jackpot’s pool: Responsible for collecting and distributing jackpot prizes.
Sale module: Manages the sale of loot boxes.
Signature module: Verifies signatures of free tickets.
Random module: Integrates with ChainLink VRF for getting random numbers.
Admin module: Provides an API for managing prizes, prices, and probabilities, with a role-based security system.
Last updated