Event
Back to All
V.1.4.3
V.1.4.3
  • nChain Event User Guide
  • πŸ“”Overview
    • Introduction
    • Configuration Symbols
    • Features and Benefits
    • Core Concepts
    • Encoded and Unencoded ‑ Records
  • πŸ€”Using nChain Event
    • How to Use nChain Event
    • Initial Set-Up
  • πŸ”Independent Records
    • Introduction
    • Functional Description
      • Write Record
      • Read Record
      • Verify Record †
    • Use Cases
      • Lucky Number Tickets
      • Internet of Things (IoT) Data
      • Intellectual Property Rights (IPR) Evidence
      • Car Dealership
    • Tutorials
      • Data Integrity
      • Blockchain Unique Identifiers
    • API Workflow
      • Configure API
      • Write Record
      • Get Location Status
      • Read Record
      • Verify Record †
  • πŸ”—Linked Records Β§
    • Introduction
    • Functional Description
      • Create Link Record Β§
      • Read Link Record Β§
      • Update Link Record Β§
      • Delete Link Record Β§
      • Verify Link Record Β§ †
      • Navigate Linked Record Β§ ΒΆ
    • Use Cases
      • Luxury Handbag Provenance
      • Random Prize Draw
    • Tutorials
      • Collection Integrity
      • Provenance Integrity
    • API Workflow
      • Configure API
      • Create Link Record Β§
      • Get Link Location Status Β§
      • Read Link Record Β§
      • Update Link Record Β§
      • Delete Link Record Β§
      • Verify Link Record Β§ †
      • Navigate Link Record Β§ ΒΆ
  • βš™οΈAPI Documentation
    • nChain Event API
  • ⛓️Bitcoin SV Blockchain
    • Features and Benefits
    • Writing to Blockchain
    • Reading from Blockchain
    • Transaction Format
  • ⁉️Troubleshooting
    • Troubleshooting
    • Error Codes
    • Glossary
    • Contact Us
Powered by GitBook
On this page
  1. Linked Records Β§
  2. Use Cases

Random Prize Draw

PreviousLuxury Handbag ProvenanceNextTutorials

Last updated 4 months ago

This random prize draw example leverages the blockchain to ensure integrity and transparency. By using nChain Event's linked records feature, every process step, from ticket generation to the final prize award, is recorded on the blockchain, ensuring that the entire prize draw is open for verification and audit in near real-time. This prevents tampering or manipulation, ensuring that participants can trust the fairness of the prize draw.

  1. An operator devises a prize draw and advertises it globally. They create a linked record (A above) with details such as: the prize, maximum tickets, draw date, ticket price, terms, and conditions. The location of the linked record acts as a unique reference for the draw and can be published immediately.

  2. When the operator creates a ticket, they update the linked records with a new entry (B above). This entry has a unique identifier that serves as the ticket, which is then given to the holder.

  3. The operator creates the number of tickets specified initially using linked records (C, D, E above) and distributes them to holders. For security, each ticket can include a unique code related to the ticket holder, and be encoded. This takes place in near real-time.

  4. When the prize draw occurs, a unique random number is generated by writing a specific record to the linked records (X above). This ensures transparency and fairness, as the operator does not know all of the inputs used to generate the random number, and they cannot attempt generating multiple random numbers.

  5. The winning ticket is identified by the random number and is added to the linked records (Y above) by the operator.

  6. After the winner claims their prize, the operator closes the prize draw and finalises the linked records (Z above).

Note: the whole state of the prize draw is always on the blockchain in near real-time. The prize draw description, the tickets and the winner provenance may be verified by anyone at any time using readily available blockchain browsers.

Benefits

  • The records are irrefutably linked together on the blockchain.

  • Records and timestamps are recorded.

  • Transparency: Records are publicly accessible globally from the blockchain.

  • A verifiable and irrefutable proof of the records exists on the blockchain (non-repudiation & tamper-proof).

  • Uses the blockchain as a global random number generator.

Unique identifiers and random numbers

Example of this random prize draw on the blockchain

Here is an example of this random prize draw on the blockchain.

Follow the links in the table to see the actual records on the blockchain.

Note: you can navigate through all the records in WhatsOnChain by clicking the first input for earlier records, or the last output for later records.

#
Item
Value

1

File Contents

Global Prize Draw on the blockchain for transparency. 4 tickets, followed by Random Selector and winner.

Encoding and Fingerprint

-

Location

(TXID, output #1)

2

File Contents

Ticket1

Encoding and Fingerprint

-

Location

(TXID, output #1)

3.1

File Contents

Ticket2

Flower: Pansy

Encoding and Fingerprint

SHA256(23:59:59.123)|Base64

BnU8F5mhlQb4fHQe8jEFugx1K40y7SG/AOhrugFk6+s=

Location

(TXID, output #1)

3.2

File Contents

Ticket3

City: Florence

Encoding and Fingerprint

SHA256(23:59:59.123)|Base64

Eav3xiiP56d/vRnWopYCqXqBKoXZEMkwG8A59BVzwHw=

Location

(TXID, output #1)

3.3

File Contents

Ticket4

Pet: Timmy

Encoding and Fingerprint

SHA256(23:59:59.123)|Base64

PEFDAd5f4vpmgRySKY492zv+3NXYN4FO+2VSkKNbKX8=

Location

(TXID, output #1)

4

File Contents

Random Selector

Encoding and Fingerprint

-

Location

(TXID, output #1)

5

File Contents

Winner is picked from 2 LSB of random selector location. 00=>Ticket1, 01=>Ticket2, 10=>Ticket3, 11=>Ticket4

Random location is: 2a0b8764cf5df2899d8c4d7e0670efc028afed1ed2f98aebbc8ad150d2df6065

Last 2 bits are: 01

Winner is: Ticket2

Encoding and Fingerprint

-

Location

(TXID, output #1)

6

File Contents

-

Encoding and Fingerprint

-

Location

(TXID, output #1)

See for details about generating unique identifiers and random numbers.

πŸ”—
here
ec4e6bb1f04e68bf029e5e517ad041ef4343faed414cc3b46c30599b5ef1f385
98c986fc0d1ce8df55faf4734324aeef602298931ba5e5aedfcff9711cd50926
17a728b985d3ea1baa99bc7c2924384eb9493ccd6324c6cf95ccb5d8d3047f34
832604ec7c5bd4f0ab883193ec6ffa19b86ddc000510d7c44deafb2dc5e5d3fd
94788398123ba546d49368d158a3bb5e7c3eaa18f14e3ebf8451cd15d955990e
2a0b8764cf5df2899d8c4d7e0670efc028afed1ed2f98aebbc8ad150d2df6065
aefaf50833866f61fd8afe1daf3898d50042c51c036035fb30fe4465c9ead066
da85370bfbc1dc144471229c2a9c1c7f49e8c5c50d1ec66364c11028cee5fd74