New answers tagged


Given two integers a and b which are coprime, then (a x + b) modulo n will visit all integers from 0 to n - 1 exactly once. You can use this to "randomly" assign NFTs by choosing a fixed large prime a and populating b from VRF. Given sufficiently large a, a and b are very likely to be coprime. You can then simply iterate through [0, x) assigning ...

Top 50 recent answers are included