@scrt_labs
SCRT Labs
2 years
Randomness is core to the fair execution of many dApps. However, generating secure and private entropy in a decentralized manner is a very difficult task. Secret-RNG, built on @SecretNetwork , solved this puzzle and this feature is now coming to the wider #Cosmos #IBC . 1/n ๐Ÿงต๐Ÿ‘‡
3
43
120

Replies

@scrt_labs
SCRT Labs
2 years
2/n First let's cover where randomness is essential for blockchain #dApps / #web3 , use cases: 1. On-chain games with random components like gambling, damage calculation, loot boxes, boss drops etc. 2. #NFT - unordered minting, trait randomization, identity numbering and more.
3
0
9
@scrt_labs
SCRT Labs
2 years
3/n 3. DAOs/ #defi - wallet initialization, task assigning, unordered voting/liquidations, order book ordering etc. Now let's understand how these random numbers are generated and what is still left to improve.
1
0
8
@scrt_labs
SCRT Labs
2 years
4/n We can separate randomness/entropy like this: - True random (Nature, lava lamps) One can not predict a future event from past events, generation is non-deterministic - Pseudo-random (Computer algorithms) Deterministic generation and previous events give away information
1
0
8
@scrt_labs
SCRT Labs
2 years
5/n In a pure #blockchain environment generating True randomness is not deemed possible. This is the case because blockchains are deterministic in nature, meaning there is no quality entropy (like lava lamps etc.) to use as input seed for a Random Number Generator (RNG).
1
0
8
@scrt_labs
SCRT Labs
2 years
6/n Every RNG with the same seed will provide the same sequence of numbers, hence we call these operations pseudo-random. The RNG is only as secure/random as the entropy used to determine the seed. If I know the seed (like the system time at init) I know the ordered output.
1
0
7
@scrt_labs
SCRT Labs
2 years
7/n Even if a RNG is initialized from something not available/known to any observers one could start predicting the sequence. With every public output an RNG provides, it becomes easier and easier for any observer to hard force and learns the seed that initialized the RNG.
1
0
7
@scrt_labs
SCRT Labs
2 years
8/n Hopefully this helps to understand why randomness can be a problem in blockchain. If I launch a public p-RNG and mint NFTs with this output then one knows the order of the NFTs coming out. Same applies to damage calculation and more, these need RNG not predictable by users.
1
0
8
@scrt_labs
SCRT Labs
2 years
9/n So how does blockchain currently solve this? On blockchains like #Ethereum this is currently solved by using off-chain data, specifically the #Chainlink -vrf oracle. This off-chain solution is not tied to the deterministic blockchain entropy and provides better randomness.
Tweet media one
1
0
6
@scrt_labs
SCRT Labs
2 years
10/n However, off-chain solutions are not optimal as they are "trusted", require fees besides gas and extra infrastructure. #Secret -RNG aims to solve RNG on-chain by being Secure, Decentralized and ..... #Private #IBC contracts is bringing this feature to the entire @cosmos
1
0
6
@scrt_labs
SCRT Labs
2 years
11/n ๐Ÿ”’ Secure Secret-RNG is a smart contract on the @SecretNetwork that works in 2 txs. The first will create a random number and the second will retrieve it. This makes it so one can not error out the transaction on purpose if the output is not desirable (eg. voting usecase).
Tweet media one
1
0
7
@scrt_labs
SCRT Labs
2 years
12/n ๐Ÿ–ฅ๏ธ Decentralized The code for the RNG is immutable on the @SecretNetwork blockchain and can be called by anyone. Every interaction with the contract will change the initialization seed inside the contract, better securing the next number. More usage == better randomness
1
0
7
@scrt_labs
SCRT Labs
2 years
13/n ๐Ÿ•ต๏ธ Private The contract state on @SecretNetwork is private which means no one can ever know the seed used to create the RN, making Secret-RNG a "True Random" generator. Interactions with contracts are also private securing the RN output when sharing the RN is not needed.
Tweet media one
1
1
7
@scrt_labs
SCRT Labs
2 years
14/n Cross-chain interoperable smart contracts over #IBC are coming to @Cosmos โš›๏ธ and @SecretNetwork enabling hundreds of developers and projects access to better on-chain RNG. Any contract on @JunoNetwork @osmosiszone etc can call #Secret -rng and get a secure random number!
1
1
10
@scrt_labs
SCRT Labs
2 years
15/n @scrt_labs is aiming to make this process as simple as possible by providing an interface much like @chainlink does for #EVM chains but then on-chain. Using encrypted sends of these RN even more use-cases will open up currently only possible on @SecretNetwork - $SCRT
1
1
7
@scrt_labs
SCRT Labs
2 years
16/n @CosmWasm V1.0, #Interchain accounts, #IBC smart contracts and Privacy as a service are all coming in the upcoming Shockwave-Delta upgrade for @SecretNetwork Learn more via the @scrt_labs development update.
1
1
8
@scrt_labs
SCRT Labs
2 years
17/n Are you an interested developer and want to check out #Secret -RNG? Give @scrt_labs a follow, we are happy to help out! Getting started guide for Secret Contracts: Github Secret-RNG:
1
1
9
@IncioMan
Alex
2 years
0
0
0