> For the complete documentation index, see [llms.txt](https://docs.muon.net/muon-protocol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.muon.net/muon-protocol/muon-ecosystem/derand.md). Agents can also search and read this documentation through its [MCP server](https://docs.muon.net/muon-protocol/~gitbook/mcp).

# DeRand

A flexible, chain-agnostic, cost-efficient VRF

<figure><img src="https://1976963665-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff0lJMvO6izwPAndoM9Ok%2Fuploads%2FvqGM8Ko45kL6C6qII17H%2F0.png?alt=media" alt=""><figcaption><p>DeRand</p></figcaption></figure>

[DeRand](https://derand.dev) is a programmable VRF protocol that generates chain-agnostic random numbers. Besides being chain-independent and cost-efficient, DeRand solves the limitations of existing RNGs by introducing an off-chain randomness solution that separates the random number generation layer from the transaction execution layer. This is achieved by leveraging Muon as a Web3 validation layer. The process works as follows

1. A smart contract requests a random number.
2. A MuonApp runs on Muon and generates the random number.
3. An executor retrieves the random number and either executes the on-chain transaction or enables off-chain components to use the random number without pushing it to the blockchain.

The executor is highly flexible (=fully programmable), allowing developers to handle scenarios that existing RNGs cannot accommodate.

<figure><img src="https://1976963665-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff0lJMvO6izwPAndoM9Ok%2Fuploads%2FWU6NWXMY8rrfISLW8nEi%2FDeRand-Gitbook01.jpg?alt=media&amp;token=1e84b034-c0f0-49ad-ae88-85b0665b5447" alt=""><figcaption><p>Derand VRNG</p></figcaption></figure>

\
To see how DeRand MuonApp was developed, see this [GitHub Repository](https://github.com/muon-protocol/muon-apps/blob/master/general/derand_offchain_vrf.js).
