Hello devs!
We’re thrilled to introduce you to Randomizer Edge, available now on zkSync Era Testnet!
Randomizer Edge is the next evolution in verifiable random function (VRF) protocols. This groundbreaking solution aims to redefine how VRF data is employed in decentralized networks by introducing a unique Peer-to-Peer (P2P) architecture, drastically reducing gas fees, and optimizing performance.
Where can I use it?
Randomizer Edge is available now on zkSync Era Testnet on the following address: 0xb71b96f979C989F650970697f71095e163ded9eB
.
Refer to our documentation for the 2 simple functions you need to integrate Randomizer VRF into your smart contract.
What Sets Edge Apart?
Randomizer Edge is not an upgrade, but a new protocol that runs alongside of the original Randomizer, now named Randomizer Core. Edge is a complete rethinking of how VRF can be more efficient and cost-effective.
One of the driving forces behind the creation of Randomizer Edge is the distinct handling of ecrecover
by zero-knowledge integrations of the Ethereum Virtual Machine (EVM), which posed limitations on smart contract-enforced VRF validation.
Unlike Core, which handles the entire VRF process within the smart contract to ensure maximum security and unpredictability, Edge employs a brand new built-from-scratch P2P network designed specifically for verifiable random number callbacks to smart contracts, while being just as unpredictable as its original counterpart.
This new approach allows for a staggering 75% reduction in gas fees compared to Randomizer Core!
How Does It Work?
Here’s how Randomizer Edge is engineered for efficiency:
Offloading Computation: The most resource-intensive operations are moved from smart contract logic to a secure P2P messaging and verification protocol. This makes the protocol’s smart contract lighter and more agile.
Aggregated VRF Data: Randomizer Edge offers aggregated VRF data from three different sources (the beacons, with the final beacon being selected by aggregating the VRF data of the first 2 selected beacons), identical to what Randomizer Core provides. The beauty here is in the cost: we’ve reduced the associated gas consumption by ~75% by processing the VRF data within the P2P network and handling the entire callback process in one single transaction.
Custom Consensus Mechanism: The protocol’s P2P network comes with its own built-in consensus system. Beacons within the network are selected to generate and validate each other’s VRF data (with extra validation beacons in place) before being committed to the smart contract (where the consensus is validated), sort of like a Layer 2 network. Edge also publishes every piece of VRF generation data on-chain, allowing for public verifiability of the entire randomization process. This ensures robustness and integrity, while still matching Randomizer Core’s unpredictability of the outcome and selected beacons.
Versatility and Choice
Randomizer Edge isn’t a replacement but a new option you can use instead of, or together with, Randomizer Core.
It’s plug-and-play, meaning all you need to do is set the Randomizer Core or Edge address and both will work immediately. Request, callback, and fee data handling is the exact same.
On networks where both are available, you have the freedom to choose the protocol that best fits your needs. Switching between (or using both) protocols is simple: When storing the request id, instead of storing the uin256 id value, you can store a bytes32 value consisting of the request ID packed with the Randomizer address. This way, using different Randomizer addresses will give you new unique IDs with each request that you can store in a single requestToUser(bytes32 packedId => address user)
mapping.
What’s Next?
We are in the final stages of public testnet testing, reaching near-100% test coverage, followed by getting security audits before a mainnet launch. When completed, Randomizer Edge will debut on zkEVM layer 2 mainnets, ushering in a new era for decentralized applications.
We can’t wait for you to experience the new and efficient world of Randomizer Edge on the zkSync Testnet!
Stay tuned for more updates!