"random()" function in secret contract?

Hello every one.
I know The requirement for determinism is the reason we won’t see the “random()” function on ethereum smart contract.
the question is : can we make random numbers in our calculations on enigma secret contract?

Not yet as right now it runs only EVM opcodes.

They might be able to extend the EVM by creating the E²VM (EnigmaEVM) or e²Wasm

That would include a pseudo-precompiled “contract” that would include a function def random() public constant returns (uint64)

But under the hood would be generated by the SGX random generator or some MPC.

What about a random “oracle”. Could we access randomness from somewhere else? https://www.random.org/clients/ for instance?


http://www.town-crier.org/

they use SGX – Enigma could implement SSL+parsing too.

1 Like

Looks cool. Is this something you @david are working on?

We can rely on SGX for randomness, i.e. there’s a RNG function inside the enclave that can be used. Would probably be easier than using random.org + SSL connection

Chainlink is primarily derived from Towncrier (http://www.town-crier.org/). Technically speaking, this can be integrated into Enigma protocol.