> For the complete documentation index, see [llms.txt](https://toyland-1.gitbook.io/toyland/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://toyland-1.gitbook.io/toyland/chainlink-vrf.md).

# Chainlink VRF

{% embed url="<https://youtu.be/eRzLNfn4LGc?feature=shared>" %}

### Verifiable Random Function (VRF) Oracle

**Toyland** uses a **Verifiable Random Function (VRF)** to ensure fairness and transparency in its games. A VRF acts as a **Random Number Generator (RNG)** that provides outcomes which are verifiable on-chain, ensuring that every result is tamper-proof and provably fair.

| Network             | Subscription                                                                                                                                                                                 |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Binance Smart Chain | [<mark style="color:blue;">Subscription link</mark>](https://vrf.chain.link/bsc#/side-drawer/subscription/bsc/76244623983725017148143203049984512123902920915432809283802125419470714091280) |

***

#### **VRF Fees** <a href="#vrf-fees" id="vrf-fees"></a>

Using VRFs requires significant computational power, and a fee is necessary to resolve RNG requests. Here’s what you need to know about VRF fees:

1. **Fee Payment**:
   * The VRF fee is paid upfront by the user at the time of request.
   * Gas fees might appear high initially because the total fee can only be determined once the request is made.
2. **Fee Refund**:
   * A large portion of the VRF fee is refunded in the same transaction.

***

#### **Pending VRF Requests** <a href="#pending-vrf-requests" id="pending-vrf-requests"></a>

Occasionally, VRF requests may not resolve immediately. Here’s what happens in such cases:

* **Pending Requests**:
  * Players can find unresolved VRF requests in their **Pending VRF Requests** section on their profile page.
* **Stuck Wagers**:
  * On rare occasions, a VRF request may fail to resolve, causing the player's wager to remain stuck in the game contract.
  * After **100 blocks**, players can click the **"Refund"** button to retrieve their wager from the contract.

***

#### **Chainlink VRF Certification** <a href="#chainlink-vrf-certification" id="chainlink-vrf-certification"></a>

On **September 5th, 2022**, Chainlink VRF received **GLI-19 compliance certification** from **BMM Testlabs**, an independent gaming certification lab.

* **Industry First**: This certification marked the first VRF compliance in the blockchain gaming industry, solidifying Chainlink VRF as a trusted solution for secure randomness.
* **Commitment to Quality**: Toyland’s integration with Chainlink VRF underscores its dedication to delivering a secure and transparent gaming experience.

By leveraging Chainlink VRF, Toyland ensures that all games are underpinned by cryptographically secure randomness, offering users a gaming environment they can trust.
