The Reveal — a technical perspective
We are happy to see the Original Block Collection live on the market. Everything seems to be going smoothly, opensea displays all the pieces correctly, people start to correctly identify their art and some transactions on the open market are beginning to take place. All very encouraging.
We took half a day off to recharge after yesterday’s launch and now we are back with a couple of updates. The first one is a technical one from our devs.
TL;DR: on a technical level, the reveal went smoothly and you always had your art from the first second. There were never — and there will never — be any changes to that. Read on to learn more.
A bit more about that. We have seen some confusion in the community caused by the frontend bug described in the previous article, which caused people to see different artworks in their My Collection section on the website (where, for a brief moment after launch, they saw incorrect pieces) and opensea (where they saw the correct pieces all along). The confusion is understandable, especially from the non-technical people, so we thought it would be a good idea to take a step by step journey to explain the process and why your artwork has always been yours.
What exactly happened during reveal process
We started a day before with minting all of the unsold tokens, which took some time (and tons of ETH), since we could mint only 50 pieces in a block in order to meet gas limits. A little bit of math:
- 8,893 total pieces — 3,201 sold = 5,692 to mint
- 5,692 pieces / 50 per block = 114 transactions
- Approx. 120,000 gas required to mint one token
- 50 pieces * 120,000 gas = 6,000,000 gas per transaction (block)
- Average gas price ~180
- Total cost = 114 transactions * (6,000,000 gas * 0.00000018 price) = 123.12 ETH
Minting started at that block:
Moving forward — we had to do this in order to set shuffle indexes in smart contract, since the last piece purchased before the reveal was the one to set startingIndexBlock. You can easily look up this value going to etherscan.
We then bought the last piece for 9.99 ETH a few hours before the reveal.
This has set the startingIndexBlock to value 12146404
Next step was to hit finalizeStartingIndex function in order to set the startingIndex. We hit that here:
And this resulted in setting startingIndex to value 737
The shuffling logic is represented by following equation:
(tokenID + startingIndex) % BAI_SUPPLY
Where BAI_SUPPLY is constant, equals to 8893, tokenID is a variable and startingIndex is a constant set by calling finalizeStartingIndex function and it is set to 737.
For example, if your tokenID is 467, then after reveal your artwork is (467 + 737) % 8893 = 1204
We have visualised the tokenID shift on our website under provenance section, which you can find here:
After we set the startingIndex, we generated a new metadata set and updated baseURL calling the function of smart contract here:
Last step was to update the domain setup in order to present reveal artworks under artworks.bai.art instead of placeholders. Since OpenSea uses some caching mechanisms and other optimisations, it took some time to refresh all the artworks there.
Why are my tokens shuffled?
Because the idea behind the reveal is to make it random. Same thing as Hashmasks and many others did. There are two randomising processes — naming of the artworks and then shifting the index. It is done to make sure we did not assigned any particular artwork to tokenID, just a random process based on indexes on smart contracts and our internal randomisation — naming of artworks.
Why I saw different artwork on the website than on opensea
So, that is what the process looked like from the technical perspective. Next updates — expected
We will have a follow-up dev Q&A session in our chat at approximately 4PM GMT today.
Thank you for reading!