# PizzaFarm

<figure><img src="https://957292655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F18Ti7izmV2IKgjfYgtuk%2Fuploads%2FjrsxBrYaXm98Od6tCaUh%2Fimage.png?alt=media&#x26;token=8b28a341-bf68-4dfe-9668-7ab97255668a" alt=""><figcaption></figcaption></figure>

Within the Fractal Network, the BRC-20 swap module is already active. Liquidity providers can earn additional token rewards through PizzaFarm, a process commonly known as LP mining. We are currently developing a non-custodial BRC-20 module within the Fractal Network to further support this.

## Pizza Farm&#x20;

PizzaFarm will serve as the frontend interface for this module, allowing liquidity providers on PizzaSwap to earn additional rewards through the platform.

## How does PizzaFarm work?

In version 1 (V1), we have completed the development of the staking chain index, primarily used to calculate LP shares and distribute reward tokens to liquidity providers.

## Staking Mechanism

### Linear Vesting

Token linear vesting usually means releasing a certain amount of tokens at a constant rate over a period of time. This linear vesting mechanism ensures transparency and fairness in token distribution, commonly used for token lock-up schedules, team rewards, or liquidity mining rewards.

#### `Basic Formula for Linear Vesting`

<figure><img src="https://957292655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F18Ti7izmV2IKgjfYgtuk%2Fuploads%2FdPHMKxhhsIqS1rXPHVsV%2Fimage.png?alt=media&#x26;token=c8525418-db38-4a77-9c9d-24e58522d739" alt=""><figcaption></figcaption></figure>

<figure><img src="https://957292655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F18Ti7izmV2IKgjfYgtuk%2Fuploads%2Fc1UWGHMubLgzhkMDmNKI%2Fimage.png?alt=media&#x26;token=fc9c78f5-acbf-4ed3-8845-50aa93b110ea" alt=""><figcaption></figcaption></figure>

#### `Reward Formula`

$$
R\_u(t) = (\frac{L\_u}{L\_{total}})\times(\frac{T\_{total}}{T\_{end} - T\_{start}})\times(t-T\_{start})
$$

## Staking Index

The index code references Uniswap's staking standards, which are the foundational framework for calculating LP shares and distributing rewards. You can learn more and explore the details here:

{% embed url="<https://github.com/Uniswap/liquidity-staker/blob/3edce550aeeb7b0c17a10701ff4484d6967e345f/contracts/StakingRewards.sol>" %}
