Learn

## Randomize Tiers of Ryder NFTs

By Friedger Müffke
12.8.22

Ryder NFTs is an early campaign for the Ryder social wallet with different tiers. Each NFTs have different perks and benefits. These tiers are revealed sometime after the mint.

There are different approaches to create random distribution of these tiers so that users do not know what NFTs they will mint. For example, project managers can publish a hash of the metadata before the mint starts so that project manager can’t manipulate the outcome.

We have chosen a mathematical way. Brilliant mathematicians have provided us with tools to calculate the tiers of each NFTs in a way that is not predictable during mint.

The interested reader can lookup “permutation polynomials”, more precisely, “Dickson polynomials”. The idea is to shuffle the digital collectibles ids using one of the functions that Dickson showed to be a 1:1 mapping if the number of digital collectibles is a prime number. The 670th prime number is 5003 which is close enough to our target of 5000 NFTs .

Dickson described a few functions but one of them can be used with an arbitrary parameter making the function perfect for a random input. The function is the following:

``x⁵ + a*x³ + 1/5*a²x + a``

The shuffled list of our 5003 ids with parameter a = 100 starts with 2201, 4932, 4040, 515, 710, 1452, 168, 8.. and ends with 271, 3002, 100. (The last number will always be equal to parameter a).

For parameter a (Dickson parameter), we can use a number that is unknown at the start of mint like the VRF seed or the Bitcoin block header time available on the Stacks blockchain. With the current limitations of Stacks 2.05, we chose the block header time (modulo 5003) for simplicity, and we believe that the Ryder NFTs are not enough incentives for Bitcoin miners to change their mining software to get the best tiers.

For our cross-chain mint, we take the parameter determined on the Stacks blockchain and update the smart contract on Ethereum accordingly.

Now, we can calculate the tier for any given NFT id on-chain in the NFT smart contract in a sufficiently unpredictable way, thanks to Dickson and the Bitcoin block time.

### How to verify the Dickson parameter submitted to the Ryder NFT contract on Ethereum?

The random element is defined by the bitcoin block during the reveal. To verify that indeed the promised value was added, you can follow the steps below:

1.Find the Stacks block of the reveal transaction (shuffle-prepare function call of the stacks contract) e.g. stacks block #83667

2.Find the corresponding Bitcoin block e.g. on the stacks explorer (that is bitcon block #763438)

3.Get the Bitcoin block details, e.g. on https://learnmeabitcoin.com/explorer

4.Take the time of the block modulo 5003, which is the value that is submitted as the so-called Dickson parameter that defines the shuffling of the ids (and thereby of the tiers).

This is the same bitcoin block time as the one available to the Stacks blockchain. You can check this for example in the stacks explorer sandbox with contract

SP3VCX5NFQ8VCHFS9M6N40ZJNVTRT4HZ62WFH5C4Q.get-block-info and function get-block-info-time for input 83667.

Our team keeps on shipping features after features! If you're ready for the #ryde of your life, join the pre-sale here.

Article written by Friedger Müffke, Engineering Partner

# Similar blog posts

Learn

#### What are BRC-20 Tokens: The cause of Bitcoin congestion

BRC-20 tokens have taken the Bitcoin world by storm, With over 14,307 BRC-20 tokens congesting the Bitcoin blockchain, they have gained massive popularity despite their limited features and functionality.
Announcement

#### Ryder's Exciting Q1 2023 Progress Report: A Look Back on a Productive Quarter

Explore Ryder's Q1 2023 progress report: product development, engineering breakthroughs, manufacturing advancements, and growth strategies.
Learn

#### Top 5 Ordinals Wallets: A Comprehensive Guide to the Best Bitcoin NFT Wallets

Discover the top 5 Ordinals wallets making waves in the Bitcoin NFT space. Explore unique features, compare user experiences, and find the perfect wallet for your Ordinals needs.
Learn

#### Top 5 Web3 Software Wallets for 2023: Empowering the Next Million Users

Discover the top 5 most popular cryptocurrency software wallets for 2023 and how they're making digital assets more accessible to millions.
Learn

#### The Ultimate Bitcoin Layer is almost here

Building on Bitcoin is currently the hottest thing in the crypto town. What better way to dive into it than looking at the hottest Bitcoin layer, Stacks (STX).
Learn

#### How to create and own an Ordinals NFT?

One exciting development that took the bears by storm and brought back the fun to Twitter was the creation of Ordinals on the Bitcoin blockchain.
Announcement

#### Creepz is joining the #Ryde!

Our latest collab partner? Creepz! The Gen Z/ Millennial NFT brand that attracted high-profile and influential owners such as Brooklyn Beckham, Steve Aoki, Sia, Louis Tomlinson, and Seth Green is #ryding the bandwagon!
Announcement

#### x2y2 is joining the #ryde to a decentralized and self-custodial web3

x2y2, the third-biggest marketplace in Ethereum officially backs Ryder!
Announcement

#### The Sandbox’s Yohan Lee joins Ryder!

That’s right: the Global Operations Manager at The Sandbox has joined Ryder as a Strategic Advisor!
Announcement

#### The NFT Daily is joining the #Ryde!

The UK's largest NFT news and media company is officially working with Ryder!
Product news

Announcement

#### Still in for the #ryde? Here’s what Q32022 has been like.

The year is almost over but the most exciting part for us this year is yet to come: December 10 marks the date Ryder goes on pre-sale!
Learn

Announcement

Announcement

#### Ryder handles are here!

Make sure you grab your favorite community handles at handles.ryder.id before they’re gone.
Announcement

Blog post

#### How’s your #ryde on the Web3 wave?

Let us bring you up to speed with how we are preparing Ryder to bring Web3 into all aspects of our lives.
Blog post

Well, hello there, Ryders. 👋 Buckle up and #ryde with us on web3 🏍️ This is the first edition of our…
Blog post

#### Q32021 Recap and What’s ahead

2021 is coming to an end, and we are still silently building like we used to, from software, hardware, to product design; we are h…