# Primary Lottery Mechanics

### **Participation:**

* **Entry Requirements:** Users must have 10 USDC to participate.
* **Approval Process:** Users need to approve the lottery contract to access their USDC.
* **Lottery Entry:** After approval, users click the "Enter with 10 USDC" button. This sends 10 USDC to the lottery contract, increasing the number of participants in the lottery.

<figure><img src="/files/hkO54B2yGMJNVwnYXIqo" alt=""><figcaption></figcaption></figure>

### **Winner Selection:**

* **ChainLink VRF Integration:** Once the final participant enters the lottery, the ChainLink VRF (Verifiable Random Function) is triggered to select the winner randomly.
* **Settlement:** The `settleLottery()` function is automatically called by an in-house bot. This function finalizes the lottery and transfers the winnings to the winner's wallet.\
  \- **Manual Settlement:** If the bot fails to execute the settlement, any user can manually settle the lottery by invoking the `settleLottery()` function through the smart contract interface on PolygonScan.

### **Rewards Distribution:**

* **Winners:** The selected winner receives the total prize in USDC.
* **Losers:** Participants who do not win are minted loserUSDC tokens, which are non-transferable and can only be used for entry into the Second Chance Lottery.


---

# 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.beracana.com/double-chance-lotteries/overview/primary-lottery-mechanics.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.
