> For the complete documentation index, see [llms.txt](https://xai-foundation.gitbook.io/xai-network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xai-foundation.gitbook.io/xai-network/kn/about-xai/sentry-keys-explained/referee-smart-contract/creating-assertion-hash-and-checking-payout.md).

# Creating Assertion Hash and Checking Payout

The contract has a function that creates a hash of the Sentry Key ID, challenge ID, challengerSignedHash from the challenge, and the successor state root. It then checks if the hash is below a certain threshold, which is calculated based on the total number of Sentry Licenses that have been minted. If the hash is below the threshold, the assertion is valid for a payout.

The Referee contract ensures the integrity of the Xai network by validating assertions and rewarding successful ones, thereby incentivizing Sentry Nodes to monitor the network accurately and diligently.
