> For the complete documentation index, see [llms.txt](https://partyfinance.gitbook.io/polkaparty/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://partyfinance.gitbook.io/polkaparty/technical-information/become-a-party-animal.md).

# Funding Mechanism

## Introduction

Below are the equations  used for the Party-with-tokens proposal. As a brief summary, every party member will be minted an ERC20 token whenever they join the party or deposit more funds to the party. That token represents the member’s share of the party’s pool and their membership. Whenever members wants to withdraw their funds, these tokens will be burned. This scenario assumes that every deposit in DA gets correctly distributed according to the pool asset distribution. Quotes are retrieved from 0x in order to proceed with the swaps on every deposit/withdraw.

## Equations

### Party Tokens&#x20;

The purpose of this formula is to calculate how many tokens should be minted for new deposits on the deposits party member. Since, value of different assets inside the party are constantly changing, the desire approach is to take a snapshot in time for the current party’s fund value in the Denominated Asset (DA from now on) as necessary to get the number of tokens that the user should get.&#x20;

![](/files/Oo2cPbOTeLDMq2T9TQaP)

Where:&#x20;

![](/files/SIlClx2fIV377s55sv0O)

![](/files/DYYKoSyOc0MAMbV61zhb)

In practice, we need to find the exact MPT value. The rest of the variables are already known. Having said that, we can change the formula to the following:

![](/files/aWt9AbASNaRJgTEHI14j)

The total quantity of tokens to be minted (MPT) is equal to the current supply of tokens multiplied by the ratio between the coming flow in DA (IDA) by the total party value in DA (P VDA). Keep in mind that Tsupply should be greater than zero for this current solution. When the party gets created, initial token supply is zero. Therefore;

![](/files/7PltZFumAKD9mhuBu3T4)

![](/files/X9AyonbJkqkuwopmvpwD)

The following document details an example of how this would work in practice


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://partyfinance.gitbook.io/polkaparty/technical-information/become-a-party-animal.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
