<p>I do not think there is a way to get the epoch nonce but I also think that in most cases, the epoch nonce is a good source of &quot; trusted source of randomness&quot;.</p>
<p>Maybe explain a bit more thoroughly of what you are trying to achieve.</p>

CC BY-SA 4.0
2022-10-31T17:28:22.113Z
For example If I would like to make a grand Strategy game where the map gets generated and players get assigned spots based on a Random Number(seed), this would not have to happen often, just every time a game starts and the games can take months so no real reason to need an RNG oracle.

Or for a lottery that happens every 5 days. Epoch nonce is definitely the most trusted randomness to use for a fair draw of the winner.
Leo
CC BY-SA 4.0
2022-10-31T19:13:31.790Z
Using the random-ness for a game is probably fine, but I would definitely not consider it a good source of random-ness for cryptography.
Erik de Castro Lopo
CC BY-SA 4.0
2022-10-31T21:31:18.120Z
Why not for Cryptography ? Not for seed generation or anything like that(since it is obviously not private), but for a VRF scheme like Ourobors uses for the leadership schedule should be fine.
Leo
CC BY-SA 4.0
2022-11-01T21:30:13.627Z
I am by no means a cryptography expert, but my understanding is that cryptography requires very high quality randomness, specifically, well beyond a single 64 bit nonce on a blockchain.
Erik de Castro Lopo
CC BY-SA 4.0
2022-10-30T23:50:12.093Z
2022-10-30T23:50:12.093Z
Erik de Castro Lopo
<p>Is is possible to access the epoch nonce from your Plutus script, to use as a trusted source or randomness  ?</p>
<p>The only suggestion for on-chain randomness I have found, is using an RNG oracle. But the Chain already produces a random number during each epoch!</p>
<p>If I would like to create a Application that uses randomness infrequently, the epoch nonce is a much better candidate, since it has a much stronger source of trust than any oracle, at least the foreseeable future.</p>
<p>Is this possible with the current Plutus V2 implementation ?</p>

<plutus>
Can I access the epoch nonce from inside a Plutus script?
# Can I access the epoch nonce from inside a Plutus script?

(Asked by: username_0 on 2022-10-30)

Is is possible to access the epoch nonce from your Plutus script, to use as a trusted source or randomness ?

The only suggestion for on-chain randomness I have found, is using an RNG oracle. But the Chain already produces a random number during each epoch!

If I would like to create a Application that uses randomness infrequently, the epoch nonce is a much better candidate, since it has a much stronger source of trust than any oracle, at least the foreseeable future.

Is this possible with the current Plutus V2 implementation ?

**Tags:** plutus

---

## 1 answers

### Answer by username_1 on 2022-10-30. Score: 0

I do not think there is a way to get the epoch nonce but I also think that in most cases, the epoch nonce is a good source of " trusted source of randomness".

Maybe explain a bit more thoroughly of what you are trying to achieve.

> **Comments:**
> **username_0**: For example If I would like to make a grand Strategy game where the map gets generated and players get assigned spots based on a Random Number(seed), this would not have to happen often, just every time a game starts and the games can take months so no real reason to need an RNG oracle.  Or for a lottery that happens every 5 days. Epoch nonce is definitely the most trusted randomness to use for a fair draw of the winner.  
> **username_1**: Using the random-ness for a game is probably fine, but I would definitely not consider it a good source of random-ness for cryptography.  
> **username_0**: Why not for Cryptography ? Not for seed generation or anything like that(since it is obviously not private), but for a VRF scheme like Ourobors uses for the leadership schedule should be fine.  
> **username_1**: I am by no means a cryptography expert, but my understanding is that cryptography requires very high quality randomness, specifically, well beyond a single 64 bit nonce on a blockchain.  

---

