Regarding Crate Generation

Background

Buyers of the F1® Delta Time crates alerted the team about a potential exploit in which some players appeared to be able to pull cars and drivers in extended streaks (a streak being when crates of the same tier contain the highest possible rarity car or driver tokens in back-to-back openings), with other players not receiving the same streaks when buying a similar number of crates.

There were concerns that this is a bug, a pattern, or that there was a security breach and/or that there could be a problem with how the crates are created. There were also concerns that there might have been errors or problems with the smart contracts.

Members of the community initially raised concerns prior to the more recent streaks. When we received those concerns, we reviewed the crate contents patterns and confirmed that they were in line with how the randomisation is designed. We appreciate and welcome the community to share such concerns and issues.

Starting on 4 March 2020, the F1® Delta Time technical team began performing an in-depth review of the crate generation system. We take this matter extremely seriously and conducted a thorough and full analysis.

Review

The crate sale’s smart contract is purely a payment gateway and is not connected to how crate generation is conducted. Crate generation and distribution are managed off-chain, thus the smart contract logic is not within the scope of this review.

We confirm that the content and ordering of crates are being randomised as designed and that there were no security breaches or manufactured patterns. We acknowledge however that the algorithm we designed for randomisation can give rise to the occasional streaks that users have reported. To understand why this happens we outline some important details below.

Basic design rules of crates:

  • The number, type and rarity of tokens available are predetermined and finite. This information has been previously shared on our social media channels. We ensure that each crate will have (exactly) either a car or a driver.
  • Crates are pre-filled with the F1® Delta Time cars, drivers, tyres and parts. They are not filled on purchase or on opening. An existing pre-filled crate is assigned to the purchaser when he/she opens a crate, and its content is delivered through minting.
  • We use a two-step randomised shuffling algorithm. Crate generation and distribution have an overarching governance to ensure an even distribution of contents, performed as part of the initial shuffle.

The randomisation algorithm code is as follows:

// 5. Shuffle everything - decks and content in decksfor (const deck of cratesInDecks) {  shuffleArray(deck);}shuffleArray(cratesInDecks);

And this is the related array shuffling function:

function shuffleArray(arr) {  const length = arr.length;  for (let i = length - 1; i > 0; --i) {    const idx = Math.floor(Math.random() * (i + 1));    const temp = arr[idx];    arr[idx] = arr[i];    arr[i] = temp;  }  return arr;}

The outcome is that pre-filled crates are shuffled (similarly to how packs of cards are shuffled) immediately after filling. The position of each crate is maintained after shuffling, and there is no further reshuffling or re-randomising after the initial two-step shuffling has occurred. In other words, random streaks of items in successive crates are permissible.

Why Do Users Experience Streaks?

The two-step shuffling algorithm slices the token population into decks which are individually shuffled, and then shuffled with each other. Some streaks can manifest when a slice contains a limited variety of tokens, making the first step of the two-step shuffle less efficient.

Shuffling and decks are used to create general uniformity in distribution. The reason for this is to ensure a varied mix of tokens are available regardless of the amount of crates sold. This helps to avoid issues where, for example, all cars might be randomly assigned to appear in the later drawn crates.

We have investigated the number of streaks that the shuffling algorithm produced and want to clarify to the community how many such streaks exist. We consider a streak for a specific tier of crates to be an occurrence of 3 or more consecutive collectibles of the same type and of the maximum rarity. Taking the Epic tier as an example: as of 5 March 2020 at 4:00am GMT, there have been a total of 16 car streaks and 15 driver streaks in the 554 Epic crates that have already been opened, out of a total of 45 car streaks and 40 driver streaks in the entire 1,500 Epic crates made available during this current sale.

Conclusions

Because the randomisation approach was working as designed, and a specific pattern to follow was not present, we do not consider it is appropriate to change the current structure of the crate sale. When a streak occurs, its length is not, in fact, predictable because the length of that streak is the result of RNG-based shuffling.

We do not believe that it would be appropriate to change the rules of the sale now given that there were no direct technical errors or inappropriate behaviour. Changing the randomisation now could unfairly impact users who have already opened crates. Please remember that the crate sale will end in less than 4 days, after which any unsold crates will be burned.

We do not believe that we should intervene if players experience streaks when opening their crates — after all, the benefit of NFTs lies in their immutability and true ownership. If our decision leads players to avoid acquiring crates from the sale directly, and instead obtain them on the secondary market, this is part of how NFTs and free markets work.

We have considered whether shutting down the crate sale would be appropriate. We feel that stopping the sale would remove the ability of the community to decide whether to buy crates or not, which is problematic given that our design intent was to allow the community to establish the game’s base scarcity model. All unsold crates will be destroyed after the end of the sale period, meaning that all remaining cars, drivers and items for the 2019 season will be permanently removed. Interfering with this model would therefore alter the game’s scarcity strategy. In the current setup, players will ultimately determine how many of these 2019 season F1® Delta Time items will exist in the game, and we consider that to be appropriate.

The team has worked hard throughout the night to reach an appropriate decision. This has been challenging but also an incredibly valuable learning experience which will serve to improve the development of F1® Delta Time and our communications with the game’s community.

Moving Forward

Although we do not plan to alter the current crate sale, please be assured that we have taken extensive notes. One of the early lessons we have learned is the value of explaining to the community the technical mechanics of such sales — not just disclosing the contents and prices of the crates but also explaining how the crates are filled, sorted, ordered, etc. We look forward to working with our community to shape future sales, events and content.

We would like to thank our community on Discord and the broader F1® Delta Time community for raising their concerns to our team members. We acknowledge that we should have reacted more swiftly and promise to do better next time. The feedback from the community clearly tells us that we have a passionate group of fans who have in mind the best interests of the exciting and innovative game that we are building. We are deeply appreciative to be held to task in such a scenario, because it helps us to improve our team and the game.

More than ever, we remain completely dedicated to delivering to this community the game that it is patiently waiting for.

Re: Smart Contract: Our 1155 Inventory contract was audited by Solidified. In the coming weeks, we’ll be sharing articles on the hows and whys of our contract design.

Written by

#F1DeltaTime is an official Formula 1® #blockchain game developed by Animoca Brands and running on the #Ethereum blockchain. Discord: https://discord.gg/eDrHew9

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store