Creators love raffles and giveaways to give back to their community and expand their following. While normal giveaways can be manipulated arbitrarily by influencers choosing the winner themselves and not actually giving away the promised prizes.
LensRaffle is a module for truly random raffles that can be used by any dapp built on top of Lens. Funds are sent to one randomly chosen follower of a given Lens profile. By handling the raffle with smart contracts and VRFs, users can be assured the giveaways are fair and every follower has the same chance to win.
All raffles of a profile can be displayed to understand how frequently followers of that profile have the chance to win prizes. This is great both for users who want to follow to win some tokens or NFTs as well as influencers who want to grow their follower base.
The modularity of this project makes it easy both to integrate it into existing dapps as well as performing raffles using the LensRaffle platform.
We read from Lens protocol to find followers of specific profiles. Lens’ implementation of a followNFT allows us to easily get the list of followers by accessing the total supply and owners of the respective NFT.
LensRaffle highly depends on true randomness, because the randomness defines the winner of each raffle and thus must not be predictable or able to be manipulated. In order to achieve truly random determination of the lucky winner, we use Chainlink’s Verifiable Random Function (VRF) mechanism.
Data about each raffle is stored on Polygon. Our solidity smart contract automatically stores the winner and amount of every raffle. This provides the transparency to see all prizes that have been given away in the past, and ensures there are no wrong claims about historic giveaways.