QuantumFair under the Hood: 

QuantumFair's smart contract enables raffle organizers to deposit prizes, including NFTs and ERC-20 tokens, into a secure QuantumFair vault. The setup process involves configuring parameters like ticket price, ticket currency (ETH or a specified ERC-20 token), raffle objective, reserve price, and expiration date. Participant registration is facilitated through an entry point contract that leverages a Beacon Proxy for dynamic asset management. Once the raffle concludes, winner selection is executed via an API3 QRNG call, ensuring a decentralized and transparent process. The smart contract then automatically manages the transfer of prizes and funds to the winner(s) and predefined addresses without intermediaries.

The implementation relies on Solidity contracts and libraries, including RaffleStorage for data management and interfaces like IRaffle and IAssetVault for operational functions. The contract utilizes OpenZeppelin's security and ownership modules to enhance safety and manage permissions. A notable aspect is the integration with API3's Airnode for random number generation, which selects winners based on blockchain-verified quantum randomness. The contract's architecture supports multiple participants and manages assets through a combination of ERC-721 and ERC-20 token standards, facilitating a broad range of raffle configurations.

QuantumFair was built to abstract the technical difficulties of conducting a raffle and allowing everyone to enjoy the game onchain. This allows for more public good funding at a micro level. Moreover, we consider ourselves a public good specifically for Optimism because we believe in its values. 