Skip to main content

What is Fairy?

Fairy Waifu

Fairy is a suite of products that enables efficient and infinitely scalable on-chain raffles. Fairy is powered by smart contracts that implement a novel raffling algorithm built on the well-known cryptographic primitives of Merkle trees and Feistel ciphers. Although Fairy's most obvious use-cases are raffles and giveaways, the underlying technology can enable other applications such as games to run on-chain that weren't feasible before!

Why Fairy?

Before Fairy, it was not economically feasible to conduct large-scale raffles on Ethereum Mainnet. This is mainly because the most commonly used algorithm to pick winners is the Fisher-Yates shuffle, which linearly increases in gas cost with the number of winners, and additionally introduces bias in most cases (e.g. when using Chainlink VRF or RANDAO). Projects aligned with Ethereum values still implement raffles this way anyway, even with the high gas costs (see: Devcon '22 raffle, EthCC '23 raffle). However, most projects opt to conduct raffles and giveaways off-chain; with black box raffling processes that make it impossible to determine whether the winners were drawn fairly.

Now, using Fairy's novel Lazy Merkle Raffle algorithm, the gas cost to pick any amount of winners is constant for the raffler. Additionally, there is no bias introduced since the participants are shuffled using a hash-based Feistel Shuffle function that outputs uniform distributions. The tradeoff is a small gas overhead (of verifying a Merkle proof) for winners that wish to claim their winning tickets on-chain.

Wat do with Fairy?

With Fairy's smart contracts, you can:

  • Conduct giveaways, locking prizes into smart contracts to provide transparency to participants that it cannot be manipulated;
  • Perform NFT whitelist raffles on-chain, to show your community that the winner-picking process cannot be manipulated;
  • Economically reveal lootbox drops using a single random number without having to do expensive random number expansions;
  • ...and much more!

Wen Fairy?

We're currently working closely with select brands and protocols who value transparency in their raffles and giveaways. Get in touch by emailing us or DM us on Twitter at @fairyrnd.