How Our Random Collector Selector Works

The Random Collector Selector (RCS) is a tool we’ve developed internally to help conduct fair and transparent giveaways for our community. We will use a modified version of our RCS to determine the order of the ten Mexico City Collection artists. This order will be announced during La Revelación, a live streamed event taking place across our galleries in Mexico City, Venice Beach, New York, Berlin, and London.

The core technology powering RCS is Chainlink’s Verifiable Random Function.

Chainlink VRF (Verifiable Random Function) is “a provably fair and verifiable random number generator (RNG) that enables smart contracts to access random values without compromising security or usability. For each request, Chainlink VRF generates one or more random values and cryptographic proof of how those values were determined. The proof is published and verified on-chain before any consuming applications can use it. This process ensures that results cannot be tampered with or manipulated by any single entity including oracle operators, miners, users, or smart contract developers.”

Before we get into a technical explanation, we’ll use an analogy to explain how it works:

  • Chainlink VRF is like a dice with a variable number of sides.

  • Every time it’s called, VRF returns a number corresponding to one of the sides on the dice.

  • For La Revelacion, we used a version of VRF that returns an integer between 0-9, like a ten-sided dice.

It's like this, but on the blockchain
It's like this, but on the blockchain

Each artist is assigned a number 0-9 based on the alphabetical position of their name in the list, distinct from the Mint Pass number.

0 = Anna Lucia
1 = Daniel Calderon-Arenas
2 = Iskra Velitchkova
3 = Marcel Soria-Rodriguez
4 = Monica Rizzolli
5 = P1xelfool
6 = Snowfro
7 = Stefano Contiero
8 = William Mapan
9 = Zach Lieberman

When the “dice” is rolled, the order that these numbers appear determines which artists are assigned to each Mint Pass ID. If there’s a duplicate number, we skip it and move to the next one.

For example, the roll: 7, 4, 3, 9, 8, 7, 6, 2, 0, 1, 5 would correspond to:

Artist #0 = Stefano
Artist #1 = Monica Rizzolli
Artist #2 = Marcelo Soria Rodriguez
Artist #3 = Zach Lieberman
Artist #4 = William Mapan
Artist #5 = Snowfro
Artist #6 = Iskra Velitchkova
Artist #7 = Anna Lucia
Artist #8 = Daniel Calderon-Arenas
Artist #9 = P1xelfool

The Technical Stuff

Our RCS is deployed on Polygon. We use Polygon to significantly reduce gas execution cost compared to Ethereum mainnet.

Two functions do most of the heavy lifting:

  1. ____VRF1RandomSeedArtistNames

  2. ____VRF2ExecuteArtistNameMapping

____VRF1RandomSeedArtistNames accepts no arguments and returns a random seed generated by Chainlink VRF. The output of this function can be accessed by using the read function _RandomResults.

Here’s an example output:


This output is then put through a series of transformations before ending up as our final “dice roll” sequence from the example above.

____VRF2ExecuteArtistNameMapping accepts one argument, Amount, which instructs the contract how many random numbers to generate. It is deterministic; the value entered for Amount will not change the final result, only how many transactions it takes to calculate the final artist mapping on-chain.

If you’d like to inspect the results of the artist mapping on-chain, you can do so by calling the ViewAllArtistNames read function. This function will return an array of human readable names that were generated from the random number in the steps above.

Having a provably random process is an important component of operating on-chain. Our goal with this post was to demystify how our Random Collector Selector works and provide an in-the-weeds explanation for other DAOs that are considering implementing something similar.

We hope you enjoy La Revelación. Hasta luego.

Subscribe to Bright Moments
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
This entry has been permanently stored onchain and signed by its creator.