# ENS Raffles POC

With the purpose of understanding the feasibility of this Raffle system dedicated to ENS domains the ENS Raffles team developed a Proof of Concept of raffle using

* the test version of ENS domains available on **Ethereum Goerli**
* **Arbitrum Goerli** to develop ticket sales (so as to test communication between L1 and L2)
* Chainlink to determine winners in a trustless way

## Join Raffle

To join a raffle, you only need to have configured the Arbitrum Goerli test network in your wallet. This can be done quickly using [Chainlist](https://chainlist.org/chain/421613).

Once you've select the raffle you are interested in, you just need to choose the number of tickets you intend to purchase and submit a transaction.

{% hint style="info" %}
Remember that in this POC the prices are in AGOR. If you do not own any, you can **bridge GoerliETH to AGOR** using [Arbitrum Bridge](https://bridge.arbitrum.io/)\
To get GoerliETH you can use ENS faucer r this other [faucet offered by chainlink](https://faucets.chain.link/)
{% endhint %}

<figure><img src="https://3721694819-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjtTBWAKEvs6A0ESvyn8d%2Fuploads%2FmlTFVUqVPegBzLPJHbVM%2Fscreen%20buy%20tickets.PNG?alt=media&#x26;token=edfbd455-bd03-43a8-8122-f41bb09b94ee" alt=""><figcaption><p>Buy Ticket</p></figcaption></figure>

The counter represents tickets sold against the total number of tickets needed to reach the softcap. In the upper right corner, however, we can see the tickets already held for the selected raffle.

## Create Raffle

To create a new raffle, you just need a testnet ENS domain available on Goerli network. \
You can discover more about it [here](https://ensraffles.gitbook.io/ens-raffles/testnet/ens-testnet).

Once the wallet is connected, the ENS domains in the wallet are automatically shown, so you can select the one to be included in the raffle

<figure><img src="https://3721694819-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjtTBWAKEvs6A0ESvyn8d%2Fuploads%2F036crRBOjBmQRDG2pxZO%2Fscreen%20choose%20your%20domain.PNG?alt=media&#x26;token=20d9c54d-6556-4816-a166-994193388189" alt=""><figcaption><p>Select ENS domain</p></figcaption></figure>

{% hint style="info" %}
If you don't find your domains, probably it's because they're Wrapped. \
To use it with ENS Raffles the ENS domain MUST be Unwrapped. \
In order to manage your ENS Domains, you need to visit [the page dedicated to your domains on ENS app](https://app.ens.domains/my/names)
{% endhint %}

Once the domain is selected, we need to choose the characteristics of the raffle that is going to be created (on Layer2):

* Softcap (AGOR) - Since the raffle takes place on Layer2, currently the ticket purchase price is in AGOR. Here you need to decide on the minimum amount you are willing to sell the domain for
* Deadline - Choose when this raffle will end
* Minimum tickets to sell - Once the minimum revenue target has been defined, it is necessary to choose how many tickets must be sold to reach it

<figure><img src="https://3721694819-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjtTBWAKEvs6A0ESvyn8d%2Fuploads%2FOKXU4aYlIfxFvT6yjQ49%2Fscreen%20set%20variables.PNG?alt=media&#x26;token=71d9ce42-158a-4599-b757-45f47512d4e8" alt=""><figcaption><p>Choose Softcap and Tickets Number</p></figcaption></figure>

Suppose we set a softcap of 10 $AGOR, then the minimum revenue the domain owner will get is 10 $AGOR. Then we decide that these 10 AGORs will be achieved by selling 1000 Tickets.

Implicitly, we chose that the price of one ticket is 0.01 AGOR.

To confirm and create the raffle, you have to give authorization for the withdrawal of ENS domains from the wallet. This is because the domain must be in an escrow contract during the raffle, so as to ensure that the winner will get his or her prize.

<figure><img src="https://3721694819-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjtTBWAKEvs6A0ESvyn8d%2Fuploads%2FXcBCLdj7HJtC2OCLI1GK%2Fscreen%20allow%20access.PNG?alt=media&#x26;token=297ada23-f532-4bd1-820a-cd6fdebd3a7c" alt=""><figcaption><p>Allow access to ENS domains</p></figcaption></figure>

A few minutes after the transaction is successful, the raffle created is visible on the Homepage.

<figure><img src="https://3721694819-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjtTBWAKEvs6A0ESvyn8d%2Fuploads%2FZT2fhsJekFnnIuMq5Ntv%2FScreen%20raffle%20created.PNG?alt=media&#x26;token=311c0695-97f7-45d3-95ce-a396dcb10a18" alt=""><figcaption><p>Raffle created</p></figcaption></figure>

The raffle was successfully created. The price of a ticket, as anticipated, is 0.01 $AGOR


---

# 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://ensraffles.gitbook.io/ens-raffles/testnet/ens-raffles-poc.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.
