Supra
Supra 공식 지갑

How to Use Supra dVRF

February 10, 2026 - 4 min read

What Is a VRF?

Blockchains cannot generate real randomness on their own. Everything on-chain is deterministic and visible, which means any “random number” produced inside a smart contract can be predicted or manipulated. A Verifiable Random Function (VRF) solves this by generating randomness off-chain, proving it cryptographically, and then delivering it on-chain where smart contracts can verify it.

Without a VRF, a lottery could be rigged, an NFT mint could be unfair, or a game outcome could be influenced. A VRF acts as a trustless source of randomness so your smart contracts can create unpredictable, unbiased, and tamper-proof results.

How Supra’s dVRF Works

Supra’s decentralized VRF (dVRF) takes this a step further by removing the single point of failure found in centralized VRF systems. Instead of one node generating randomness, Supra splits the VRF private key among many nodes. Each node produces a partial result, and these are combined into a final random output.

Here is the process in simple terms:

  1. Your smart contract requests randomness.
  2. Supra’s network of nodes each produces a partial signature.
  3. These partial signatures are combined into one final VRF output.
  4. The output is packaged with a cryptographic proof.
  5. Your smart contract verifies the proof on-chain.
  6. Once verified, your contract can safely use the randomness.

This approach gives you unpredictable randomness with strong cryptographic security while still being fast enough for modern on-chain apps.

Supra uses parallel processing across distributed node clusters to accelerate generation, reduce bottlenecks, and maintain high security. Even if some nodes go offline or act maliciously, the system continues working as long as enough honest nodes participate.

Why This Works: Supra’s Parallel Architecture

Supra’s validator network is organized so that randomness can be generated and verified without delay.
This structure enables:

  • Partial results generated quickly across multiple nodes
  • Fault tolerance even if some nodes misbehave
  • High security through threshold cryptography
  • On-chain verifiability for every random output
  • The final result is a VRF system that is both decentralized and fast enough for real applications like games, raffles, NFT reveals, DeFi sampling, and more.

Walkthrough

1. Open the dVRF Subscription Manager

Go to the official dVRF UI:

https://supra.com/data/dvrf

This is where you create a subscription, fund it, and manage requests.

2. Connect Your Wallet

Click Connect Wallet and choose MetaMask.

Make sure your wallet is set to Ethereum Sepolia and you already have some test ETH from a faucet.

Tip: Use the Sepolia faucet before starting.

3. Create Your Subscription

Go to My Subscription > Create Subscription.

Fill out the form:

  • Address: Your wallet address
  • Project Name: Any name you want
  • Admin Email: Your email
  • Admin Telegram: Your telegram
  • Max Gas Price (GWei): 1
  • Max Gas Limit: 500000

You can use the same gas price and gas limit values shown above.

After submitting, your subscription will appear under My Subscription.

4. Fund Your Subscription

Click Actions > Deposit Funds.

Enter 0.03 ETH and confirm.
You’ll now see your updated subscription balance.

5. Open Remix to Deploy the Contract

Go to Remix:

https://remix.ethereum.org/#lang=en&optimize&runs=200&evmVersion&version=builtin

Create a new contract file and paste the following code:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface ISupraRouter {
    function generateRequest(
        string memory _functionSig, 
        uint8 _rngCount, 
        uint256 _numConfirmations, 
        uint256 _clientSeed,
        address _clientWalletAddress
    ) external returns(uint256);
}

contract Interaction {
    address supraAddr;
    
    constructor(address supraSC) {
        supraAddr = supraSC;
    }
    
    mapping(uint256 => string) result;
    mapping(string => uint256[]) rngForUser;
    
    function exampleRequest(uint8 rngCount, string memory username) external {
        uint256 numConfirmations = 1; 
        
        uint256 nonce = ISupraRouter(supraAddr).generateRequest(
            "exampleCallback(uint256,uint256[])", 
            rngCount, 
            numConfirmations, 
            123, 
            msg.sender
        );
        
        result[nonce] = username;
    }
    
    function exampleCallback(uint256 nonce, uint256[] calldata rngList) external {
        require(msg.sender == supraAddr, "only supra router can call this function");
        
        uint256[] memory x = new uint256[](rngList.length);
        rngForUser[result[nonce]] = x;
        
        for(uint8 i = 0; i < rngList.length; i++) {
            rngForUser[result[nonce]][i] = rngList[i] % 100;
        }
    }
    
    function viewUserName(string memory username) external view returns (uint256[] memory) {
        return rngForUser[username];
    }
}

6. Enter the Router Address

From the network list:

https://docs.supra.com/dvrf/learn-supra-dvrf/networks

Since we’re using Sepolia, the Router Contract is:

0x7e0EA6e335EDA42f4c256246f62c6c3DCf4d4908

When deploying the contract in Remix, paste this address as the constructor argument.

This links your test contract to Supra’s dVRF router.

7. Deploy the Contract

Click Compile, then Deploy using MetaMask.

Once deployed, you’ll see all contract functions available:

  • exampleRequest
  • exampleCallback 
  • viewUserName

(Remix shows multiple callbacks, but they all map to your actual implementation.)

8. Make a Randomness Request

Call exampleRequest with:

  • rngCount: 3
  • username: “test1”

Click transact and confirm in MetaMask.

This sends a request to Supra dVRF to generate 3 random numbers.

You will see a transaction appear in your wallet/activity list.

9. Read the Random Results

After randomness is returned on-chain, call:

viewUserName("test1")

You should see something like:

uint256[]: 54, 99, 9

These are the random outputs generated by Supra dVRF, each reduced modulo 100 in your contract.

twitterlinkedinfacebookmail

RECENT POSTS

뉴스, 인사이트 및 더 많은 정보를 받으세요.

뉴스, 업데이트, 업계 인사이트 등 다양한 정보를 받으시려면 Supra 뉴스레터에 가입하세요.

개인정보이용 약관웹사이트 데이터 사용 및 쿠키버그 공개생체 정보 개인정보 보호 정책

©2026 Supra | Entropy Foundation (스위스: CHE.383.364.961). 판권 소유