Pilot Program: Verified Open Randomness powered by xFUND
A new era of utility unfolds today for the FUND/xFUND ecosystem with VOR or Verified Open Randomness. Simply put VOR is used as an on-chain (ETH) event to call the Unification Network of Oracles to provide verified Randomness (similar to Chainlink VRF, but with a few key advantages)
Verified Open Randomness is a critical component of the growing NFT and gaming sectors. We will release a dedicated article on use cases, but in short summary VOR is useful for
- Generative NFT that requires true randomness (perhaps there are valuable traits)
- On Chain Gaming
- Lottery and Lootboxes
Why VOR and How does it work?
The first thing many people ask is why do we need VOR when we can just use built in ETH functions to generate a random number? The reason is that Solidity has no built-in method for generating random numbers and other methods are subject to exploit by bad actors when there is financial incentive.
The way that VOR works is that the client builds a random number request into their Smart Contract on the ETH network, which forwards requests to the VORCoordinator smart contract (which acts as a Router for requests, xFUND fee payment and fulfillment).
VOR Provider Oracles monitor this contract for emitted events, and a random number, along with the proof of its generation are sent back to the VORCoordinator, which verifies it before passing the random number back to the client’s smart contract.
Verifying the Randomness
By putting the random generation off-chain we vastly improve safety measures against miner attack almost to the point of effectively eliminating it, but at the same time, how do we trust the randomness of the Oracle which in theory could game the system the same way the miners did ?
VOR Oracles use their secp256k1 private keys (the type of keys used to sign transactions on the ETH network) to generate randomness. When they register as a provider in the VORCoordinator smart contract, they register using the corresponding public key.
This is where the verified aspect comes into play. When you query the contract/oracle and it returns a random number (which has been generated using its private key), in addition it returns proof of its generation — this proof is then verified by the VORCoordinator smart contract against the Oracle’s public key before sending the result back to the client.
For all intents and purposes, this acts in a similar way to transaction signature verification, ensuring that the randomness provided is cryptographically secure and sound.
So by doing this we complete the loop of allowing true verified randomness to be queried on chain for applications where truth is important.
How Do I Access VOR?
Accessing VOR as a developer thankfully does not require you to deploy a separate contract, nor go through arduous “biz dev meetings” with our team. VOR is an open API access available in a free and trustless manner.
Integrating VOR into your smart contracts is a relatively simple 3-step process:
- Import our Base smart contract into your own smart contract
- Define a function to initialize a request
- Define a function to receive the random number
The way VOR works is that you will submit a request to the VOR system via your contract, specifying the provider who will respond to the request. When you do this you will pay a small amount of xFUND to the contract. You can learn about and acquire xFUND here.
The specified provider will generate the random number and proof, and send them back to your smart contract via the VORCoordinator smart contract.
To access VOR, there is a small payment in xFUND required along with your request. This is used mainly to pay for the gas for providers to send back the random number.
The Road Forward with VOR
We are releasing VOR as “open access” in that it does not require bizdev calls or any specific permissions to access. We believe that trustlessness is the key to long term blockchain success. Currently VOR is operating on Rinkeby testnet and will have a mainnet release shortly. to access it, please check the documentation below or jump into our tech-discord to speak with the team
Source code Links:
xfund-vor repo (contracts & VOR Provider Oracle software) — https://github.com/unification-com/xfund-vor
VORCoordinator contract source (routes requests, fulfilments, xFUND payments) — https://github.com/unification-com/xfund-vor/blob/main/contracts/VORCoordinator.sol
VORConsumer base contract source (developers integrate this into their contract) — https://github.com/unification-com/xfund-vor/blob/main/contracts/VORConsumerBase.sol
VOR Provider Oracle software (run by VOR provider Oracles) — https://github.com/unification-com/xfund-vor/tree/main/oracle
VOR NFT Demo — https://github.com/unification-com/vor-demos/blob/main/contracts/NFTCompetition.sol
VOR DnD Demo — https://github.com/unification-com/vor-demos/blob/main/contracts/DnD.sol
Rinkeby Testnet deployed contract links:
VORCoordinator: https://rinkeby.etherscan.io/address/0x6d5Ba663dDCa573557c8420256Dc85F31D9762B0#code
xFUNDMOCK Token: https://rinkeby.etherscan.io/address/0x245330351344F9301690D5D8De2A07f5F32e1149#code
VOR NFT Demo — https://rinkeby.etherscan.io/address/0xE1426CE899537340E5551cF37Db813B75Ec6C579#code
VOR DnD Demo — https://rinkeby.etherscan.io/address/0x79C288Eccc6319563811B4Ca0A1F9D28b561Daf4#code
Documentation — https://vor.unification.io