B.BlockAxis⌕ Search
Menu

Verifiable randomness and automation

Smart contracts may need verifiable randomness or an external trigger when a condition is met.

IntermediateContent revised · 13.09.20263 min reading · allow 5–10 more minutes for the workshopBlockAxis

Your learning plan

Understand asynchronous randomness and automation

By the end, explain the diagram in your own words, solve the case and justify the correction.

Prerequisites : Chainlink and the oracle problem · EVM and smart contract composability

Level 2 · Intermediate →

Reading path · 15 / 35 · Intermediate

Key takeaway

Smart contracts may need verifiable randomness or an external trigger when a condition is met.

The essentials

Smart contracts may need verifiable randomness or an external trigger when a condition is met. Chainlink VRF provides randomness with a verifiable proof; automation services can trigger predefined contract actions. Both are components of an application rather than guarantees about the whole product.

How it works

A fair random value does not ensure a fair game if the application can discard unfavourable outcomes or change payout rules. Request handling, result consumption and administrative powers need separate examination. Likewise, automating an incorrect condition simply executes the incorrect rule more reliably.

What to watch

Tokenised assets may use published reserve information or net asset values. Assess the underlying attestation, covered assets and update cadence. An on-chain report does not itself establish ownership, absence of liabilities or enforceable redemption rights over assets held outside the blockchain.

Understand the details

Verifiable randomness lets an application verify that a returned random result follows the service’s cryptographic process. The request and fulfillment occur separately, so the application must preserve which request belongs to which game or selection. Automation submits transactions when configured conditions are met; contracts do not spontaneously wake themselves up.

Boundaries and common mistakes

Randomness does not repair unfair rules. Allowing an operator to discard an unfavorable result or change entrants after requesting randomness can undermine the game. Automated execution also depends on funding, gas conditions and valid application state. The execution function should recheck conditions rather than blindly trust an earlier off-chain observation.

The mechanism at a glance

  1. Freeze application inputs
  2. Request with identifier
  3. Later verified response
  4. Apply fixed rules
Understand asynchronous randomness and automation. Conceptual map: read these four landmarks together with the explanation above.
Applied workshop · work at your own pace

Apply the lesson to a case

A raffle closes entries, requests randomness and waits for fulfillment. A second request is later issued for another raffle. Draw identifiers linking each response to its original entrant list, even if responses arrive in the reverse order.

Which state must be frozen before requesting the result?

Choose one answer.

Prepare a correction note

Describe the passage and the proposed correction. This creates a local note for you to share; it sends nothing. Do not include personal or confidential information.