# How to Verify Fairness

{% embed url="<https://www.youtube.com/watch?t=16s&v=Eb_DjtxDaF4>" %}

## To get Started&#x20;

**1.**&#x46;ollowing the drawing of the giveaway, click the icon on the giveaway page: **Provably Fair Draw**

![Click to Verify](https://content.gitbook.com/content/LIfMHqDEB5rVHERvbUyz/blobs/Lbcdp8O6gm50cUVzP5aY/Screen%20Shot%202022-05-31%20at%2017.45.17.png)

**2. What information you will need to verify fairness:**

* **Before the draw,** you are given the following information: ServerSeed Hash, Number of Participants, Number of Winners and your PID.

ServerSeed Hash is used to verify the ServerSeed after the giveaway is drawn, to confirm whether we have tampered. You will get ServerSeed after the draw.&#x20;

![](https://content.gitbook.com/content/LIfMHqDEB5rVHERvbUyz/blobs/rIL7ZcoEoQkjXnzy5RVA/v2.png)

* **After the draw**, you are able to view all following information which will be used for verifying the fairness by algorithm: ServerSeed, ServerSeed Hash,  ClientSeed (Target ETH block hash), Number of Participants, Number of Winners and your PID.

![](https://content.gitbook.com/content/LIfMHqDEB5rVHERvbUyz/blobs/0Cj1NFrTBBWPkn07qCwM/pf.png)

## **To verify the ServerSeed**

<mark style="color:blue;">**How to verify:**</mark> To determine whether we've tampered with it or not, you can encrypt the **ServerSeed** given in the giveaway using **HmacSHA256**, and compare the hashed value with the **ServerSeedHash** given in the giveaway.&#x20;

<mark style="color:blue;">**How to check the result:**</mark> If the ServerSeed Hash you got in HmacSHA256 matches the one given in the giveaway (the values are the same)✅, it indicates that no tampering has occurred.

![](https://content.gitbook.com/content/LIfMHqDEB5rVHERvbUyz/blobs/hZ4hpbnVfObKnHw7oky5/hash2.png)

## **To verify the giveaway result**

**4.** To verify the draw result, click **Verify** first.

![](https://content.gitbook.com/content/LIfMHqDEB5rVHERvbUyz/blobs/F4UCMaFSDk82VoJQ1RIh/verify.png)

**5.** Now you enter the verification page. There is no need to change anything, click **Verify** again to begin verifying your giveaway results automatically by the algorithm.

![](https://content.gitbook.com/content/LIfMHqDEB5rVHERvbUyz/blobs/wcDjyvrLNoPyXFKI6UPa/v.png)

**6.** By using algorithms, the verified result will be displayed here; the result will show whether your giveaway result matches what you got, if it does, it means the giveaway is fair and genuine.

![](https://content.gitbook.com/content/LIfMHqDEB5rVHERvbUyz/blobs/Vd54x1y4ZInOzE6bs58J/result.png)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cwallet.com/cwallet-tools/giveaway/how-to-verify-fairness.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
