Roll with Move: Secure, Instant Randomness on Aptos By Alin Tomescu and Zhuolun Xiang

Overview:

Aptos Labs introduces Aptos Roll, the first secure and instant on-chain randomness API specifically designed for proof-of-stake (PoS) blockchains. This API simplifies the process of obtaining random values in Move smart contracts, crucial for applications like decentralized games, raffles, NFTs, and airdrops.

Key Features:

  1. Instant Delivery:

    • APIs:
      • randomness::u64_integer(): Returns a uniformly-sampled 64-bit unsigned integer.
      • randomness::bytes(n): Returns a uniformly-sampled vector of n bytes.
      • randomness::permutation(n): Returns a uniformly-sampled shuffle of the vector [0, 1, 2, …, n-1].
    • Benefit: Provides randomness instantly, unlike external beacons which require a commit-and-reveal process.
  2. Security:

    • Trust Model: Relies on the security and availability of the Aptos PoS validator set.
    • Unpredictable and Unbiasable: Randomness is secure as long as adversaries control less than 50% of the stake.
  3. Novel Cryptography:

    • Weighted Publicly-Verifiable Secret Sharing (wPVSS): Efficient and aggregatable, reducing communication overheads.
    • Weighted Distributed Key Generation (wDKG): Facilitates secure secret sharing among validators.
    • Weighted Verifiable Random Function (wVRF): Ensures constant communication per validator, optimizing performance.

Technical Details:

  • Epoch-Based Randomness:
    • Validators generate a shared secret at the start of each epoch via wDKG.
    • This shared secret is used to compute a randomness seed for each block in the epoch.
  • Block-Specific Randomness:
    • Validators evaluate a wVRF using the shared secret to produce a block seed.
    • The seed ensures each block has unique, unbiasable randomness.

Comparison to Other Solutions:

  1. DFINITY:

    • Uses threshold DKG (tDKG) and threshold VRF (tVRF), suitable for non-PoS models. Easier but less secure for PoS.
  2. External Beacons (e.g., Drand):

    • Require external trust and commit-reveal processes, delaying randomness.
  3. Verifiable Delay Functions (VDFs):

    • Cannot produce instant randomness and are unsuitable for low-latency blockchains.
  4. Flow and Celo Designs:

    • Susceptible to bias and predictability by malicious validators.

Why Aptos Roll Stands Out:

  • Instant Access: Provides immediate randomness, enhancing developer convenience.
  • Security: Matches the blockchain’s inherent security, ensuring robustness.
  • Efficiency: Optimized cryptographic techniques minimize overhead, making it practical for real-world use.

Medium link

11 Likes

Nice one! Looking forward to it.

6 Likes

This is absolutely awesome

3 Likes

Interesting. Thanks for the update

3 Likes

Aptos the best

2 Likes

Aptos with great techs

2 Likes

Thanks for the update

1 Like

Good information

2 Likes

interesting concept, random lottery ?

2 Likes

Good one…bro

1 Like