# Marketplace Lottery

A percentage of every purchase made of the marketplaces is taken and store into a lottery fund that can be claimed into an ongoing marketplace lottery. Each purchase adds credits to the buyer's account that can be used to purchase tickets in the marketplace lottery.

Basically, every time you purchase an item from a marketplace, a percentage of the tokens spent is taken for the marketplace lottery and you get free lottery credits.

## How To Transfer Lottery Funds Into The Marketplace Lottery?

You can claim a transfer of funds from the marketplaces into the marketplace lottery whenever there's a new ongoing round. Here's how to proceed:

* Go to the [lottery page](https://payswap.org/lotteries)
* Find the marketplace lottery and click on the **Control Panel** button in its panel
* In the control panel's menu, click on the Claim Lottery Revenue button. To claim the first lottery funds, fill in the form like below and validate the transaction. This will transfer the lottery funds from all three marketplaces into the marketplace lottery

<div><figure><img src="https://3481829468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbuuWgsRQF3QPmDvV7XJQ%2Fuploads%2Fgit-blob-628b501e972e13551b22d7eb02bec3043957e7db%2Flottery.png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://3481829468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbuuWgsRQF3QPmDvV7XJQ%2Fuploads%2Fgit-blob-566b1cf90bff910a3d93b21ef9667933a3cabee1%2Flottery2.png?alt=media" alt=""><figcaption></figcaption></figure></div>

* The second lottery fund is that generated from sponsors on the marketplaces. Fill in the form with the From Sponsors field set to Yes and validate the transaction. This will transfer tokens from the marketplaces sponsor funds into the marketplace lottery
* Congratulations! The marketplace lottery should have a high enough prize pool to distribute to the participants.
* Anyone can run these functions to transfer the funds into the marketplace lottery

## How To Buy Tickets Into The Marketplace Lottery

Buying tickets into the marketplace lottery is just like buying tickets into any other lottery with the difference that if you have enough lottery credits, your ticket price will be 0. You can read more about how to purchase tickets in a lottery on the page below:

{% content-ref url="how-to-play-lottery" %}
[how-to-play-lottery](https://docs.payswap.org/products/lottery/how-to-play-lottery)
{% endcontent-ref %}

Lottery tickets are generated every time you make a purchase on the marketplaces and are associated with the wallet address you use to make the purchases. This means if your credit with wallet address 1 is 100 and you use wallet address 2 to buy tickets in the lottery marketplace, the 100 credits will not be used.

[Get further support from the community here.](https://paychat.payswap.org/#/room/%23paycom%3Amatrix.org?via=matrix.org)


---

# 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.payswap.org/products/lottery/marketplace-lottery.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.
