7.7 Random Number Generator Oracles
Last updated
Last updated
The MerlinProtocol platform will make use of ChainLink's random number generation system, called VRF, Verifiable Random Function.
The need for random numbers is motivated in the context of TokenXFund by the need to ensure different and variable random time windows that allow the platform to find the updated exchange prices in unpredictable timeframes, the fund to update its assets held and its users to make operations of entry or exit from the fund.
The generation of random numbers involves in VRF a precise chain of steps illustrated below:
To summarize:
a) The Smart Contract consumer of random numbers submits a request for a random number, along with a "seed" on which to base the random generation.
b) The request is received by a VRF Smart Contract, which requests a network of oracles to generate the random number based on the consumer's seed.
c) The oracles use their own "secret key" and the consumer's "seed" to generate offchain a random number, responding to the Consumer Smart Contract with the generated number and publishing on-chain a cryptographic proof, verifiable with the public key of the generating oracle and the consumer's seed.
It is noteworthy that ChainLink also offers guarantees on the data provider oracles, who, being remunerated with fees for their service, have an economic incentive to keep the random generation safe and fast and would lose this incentive in case the cryptographic counter-evidence disproves the genuineness of their work.
The random number generated will be used by MerlinProtocol Smart Contracts to determine unpredictable time intervals in which to make their fund trades, without allowing external price manipulation in close proximity to them.