• Live Crypto Prices
  • Crypto News
    • Worldwide
      • Bitcoin
      • Ethereum
      • Altcoin
      • Blockchain
      • Regulation
    • Australian Crypto News
  • Education
    • Cryptocurrency For Beginners
    • Where to Buy Cryptocurrency
    • Where to Store Cryptos
    • Cryptocurrency Tax in Australia 2021
No Result
View All Result
CryptoABC.net
No Result
View All Result

Sui Introduces Secure Native Randomness for Testnet Applications

June 14, 2024
in Blockchain
Reading Time: 3min read
0 0
A A
0
Sui Introduces Secure Native Randomness for Testnet Applications
0
SHARES
8
VIEWS
ShareShareShareShareShare





Developers on the Sui Testnet now have access to a new source of secure randomness generated by Sui validators, according to The Sui Blog. This essential feature, powered by the sui::random module, opens up various possibilities for developers and builders on the platform.

Applications of Onchain Randomness

Onchain randomness can be utilized in numerous ways, from simulating dice rolls to ensuring fair ticket allocations. Key use cases include:

  • Games of chance: Lotteries, card games, and casino games can leverage onchain randomness to ensure fairness and transparency, allowing anyone to verify the game’s integrity.
  • Random sampling: Useful in governance, dispute resolution, and randomized audits. It can also be employed in committee selections for oracles and DAOs.
  • NFTs: Randomness can create NFTs with varying rarity levels, adding uniqueness and creativity to crypto collectibles.
  • Contests and player matching: Random placement in tournament brackets, matching players for games, and determining the order of play in turn-based games.

Ensuring Secure Randomness

For onchain randomness to be effective, it must be both unpredictable and unbiasable. Unpredictability prevents attackers from manipulating outcomes, while unbiasability ensures no single party can influence the randomness generation process. Existing solutions often fall short due to predictability and bias issues.

Mysten Labs has developed a solution leveraging threshold cryptography and Distributed Key Generation (DKG) to achieve these qualities. This solution, supported by the validator network, allows for fast and secure randomness generation. Validators initiate a DKG protocol to generate secret shares of a distributed key at the start of each epoch. They use these shares to produce randomness continuously during the epoch.

Advantages of Sui’s Native Randomness

Sui’s native randomness solution is faster and more secure than existing methods. It operates parallel to the consensus mechanism, providing random values quickly after a transaction is ordered but before execution. Additionally, Sui’s Move programming language and Programmable Transaction Blocks (PTBs) offer powerful compositions while preventing potential manipulation through built-in restrictions and compiler warnings.

Using the sui::random Module

The sui::random module provides access to pseudorandomness within Sui, enabling various applications. For instance, developers can implement a Move function to select a random winner for a raffle:

entry set_winner(game: &mut Raffle, rnd: &Random, ctx: &TxContext) {
    assert!(is_none(game.winner), EWinnerAlreadySet); // winner is of type Option<u32>
    let gen = new_generator(rnd, ctx);
    game.winner = Some(gen.generate_u32_in_range(1, game.num_of_tickets)); // num_of_tickets is u32 that represents the number of participants
}

This function ensures that a winner has not already been selected, initializes a new random generator, and generates a random number within the range of ticket numbers. The result is a securely and unpredictably chosen winner, thanks to Sui’s robust random generation guarantees.

Sui’s introduction of secure and scalable randomness is a significant advancement, enabling developers to build more robust and secure applications. The feature is now available on the Sui Testnet, and developers are encouraged to explore its capabilities and provide feedback. For more detailed technical information, refer to the Onchain Randomness documentation.

Image source: Shutterstock

. . .

Tags


Credit: Source link

ShareTweetSendPinShare
Previous Post

Many Don’t Understand The Importance of Trump Bitcoin Support, Says Samson Mow

Next Post

Cardano Drops As Hoskinson Clarifies Relationship To Elon Musk

Next Post
Cardano Drops As Hoskinson Clarifies Relationship To Elon Musk

Cardano Drops As Hoskinson Clarifies Relationship To Elon Musk

You might also like

Crypto Lender BlockFills Faces Restructuring, Lawsuit After Losses and Accounting Issues

Crypto Lender BlockFills Faces Restructuring, Lawsuit After Losses and Accounting Issues

March 9, 2026
XRP Bollinger Bands Are Squeezing—Volatility Incoming?

XRP Bollinger Bands Are Squeezing—Volatility Incoming?

March 12, 2026
US Government Seeking To Retry Tornado Cash Developer Roman Storm on Money Laundering and Sanctions-Violation Charges

US Government Seeking To Retry Tornado Cash Developer Roman Storm on Money Laundering and Sanctions-Violation Charges

March 11, 2026
Binance WSJ Lawsuit: The Crypto Exchange Sues Wall Street Journal Over ‘Defamatory’ Iran Sanctions Report

Binance WSJ Lawsuit: The Crypto Exchange Sues Wall Street Journal Over ‘Defamatory’ Iran Sanctions Report

March 11, 2026
XRP Price Sets Stage for Comeback — Recovery Wave Incoming?

XRP Price Sets Stage for Comeback — Recovery Wave Incoming?

March 9, 2026
Bitcoin Hovers Around $70K as Weak Demand and Defensive Positioning Signal Fragile Market, Says Glassnode

Bitcoin Hovers Around $70K as Weak Demand and Defensive Positioning Signal Fragile Market, Says Glassnode

March 6, 2026
CryptoABC.net

This is an Australian online news/education portal that aims to provide the latest crypto news, real-time updates, education and reviews within Australia and around the world. Feel free to get in touch with us!

What's New Here!

Oil Surges Near $100 Stalling Bitcoin Breakout

Oil Surges Near $100 Stalling Bitcoin Breakout

March 12, 2026
Uniswap (UNI) Price Rallies 6.53% – Is Now the Time to Buy? Comprehensive Analysis & Trading Insights

PEPE Price Prediction: Technical Recovery Expected as RSI Shows Oversold Conditions

March 12, 2026

Subscribe Now

  • Contact Us
  • Privacy Policy
  • Terms of Use
  • DMCA

© 2021 cryptoabc.net - All rights reserved!

No Result
View All Result
  • Live Crypto Prices
  • Crypto News
    • Worldwide
      • Bitcoin
      • Ethereum
      • Altcoin
      • Blockchain
      • Regulation
    • Australian Crypto News
  • Education
    • Cryptocurrency For Beginners
    • Where to Buy Cryptocurrency
    • Where to Store Cryptos
    • Cryptocurrency Tax in Australia 2021

© 2021 cryptoabc.net - All rights reserved!

Welcome Back!

Login to your account below

Forgotten Password?

Create New Account!

Fill the forms below to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Please enter CoinGecko Free Api Key to get this plugin works.