> For the complete documentation index, see [llms.txt](https://flowfi.gitbook.io/flowfi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://flowfi.gitbook.io/flowfi/mechanisim/reward-logic.md).

# Reward Logic

## General Introduction

\
Deepool's reward structure is designed to manage the incentives for Liquidity Directors (LDs) and Liquidity Providers (LPs), with primary objectives including:

* Aligning the demands of LDs with the most efficient deployment strategies for the system.
* Tailoring rewards to reflect the performance of the Reactors (performance-based emissions).
* Modulating the influence of disparate Reactor performances on the overall reward distribution.

Overall Reward Quantity The total quantity of DPT rewards allocated to both LDs and LPs is calculated using the rewards generated from Deepool's deployment of LP tokens from a Token Reactor (based on an 8-week rolling average, divided between LDs and LPs) combined with a fundamental allocation of rewards.

Liquidity Director Reward Logic The allocation of LD rewards to specific reactors considers the votes by LDs and the Optimal Allocation (the ideal vote distribution as determined by the protocol to maximize performance). These factors are given appropriate weightings. Additional parameters adjust the effect of relative reactor performance on the rewards for a particular reactor.

LDs will earn maximum rewards when they align their votes with the Optimal Allocation. The amount of liquidity provided by LPs does not influence the rewards earned by LDs through their vote allocations to a Reactor.

Summary The total rewards for LDs are based on the performance of the Reactors and include a baseline reward allocation. The proportion of rewards for LDs is determined by LD reward logic, balancing:

* Optimal vote allocation ("How would the protocol ideally distribute LD votes based on Reactor performance?"), ensuring well-performing Reactors are suitably rewarded.
* Votes allocated by LDs ("What do LDs prefer, irrespective of Reactor performance?"), ensuring the decisions of individual LDs are duly considered.

<figure><img src="https://729548845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWYUkJoY1tQVI16wRZS4K%2Fuploads%2FV7hK9fRl6e8TRaygM5AL%2Fimage.png?alt=media&amp;token=a54d3f71-1e27-43b5-a049-3277cbfc3b3e" alt=""><figcaption><p>Schematic of the LD reward logic</p></figcaption></figure>

### **Liquidity Director Equations**

In order to define the actual rewards paid out to LDs of i-th Reactor, we first constrain the parameter Rew of i-th Reactor in two steps by defining Rew\_a and Rew\_b as

$$
\begin{aligned}Rew\_ a\_{(i)}=\&min(max(Rew\_{(i)},a),b)\ M=&{ x:x\  is\  Rew\_ a} \end{aligned}
$$

$$
\begin{aligned}Rew\_ b\_{(i)}=\&Rew\_ a\_{(i)}-minM+c\ N=&{ x:x\  is\  Rew\_ b} \end{aligned}
$$

Then, the optimal % allocation of votes Opt(i) (optimal vote allocation) for the i-th Reactor is defined by

$$
Opt\_{(i)}=\frac{Rew\_ b\_{(i)}}{\sum N}
$$

The % share of rewards paid out to the i-th Reactor is calculated using the following equation:

$$
r\_ ld\_{(i)}=ld^{\frac{2}{3} }*{(i)}\times Opt^{\frac{1}{3} }*{(i)}
$$

Finally, the reward amount for LDs the i-th Reactor are given by

$$
R\_ ld\_{(i)}=R\_ ld\times r\_ ld\_{(i)}
$$

####

## Liquidity Provider Reward Logic

In the new logic, whereas LD rewards are not impacted by the LP side of the Reactor, LP rewards are impacted by the factors responsible for the rewards given out in the LD side of the Reactor.

While this is very similar to the original “balance the reactors” logic, it now takes into account the optimal allocation Opt(i) as defined in the LD reward logic.

### Summary

The overall amount of rewards allocated to LPs is determined by the percentage of the overall Token Reactor TVL the Token Reactor represents, the percentage of votes allocated to the Reactor by the LDs and the optimal vote allocation.

<figure><img src="https://729548845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWYUkJoY1tQVI16wRZS4K%2Fuploads%2Fv09XIoRZHoIPkr8mViI6%2Fimage.png?alt=media&amp;token=dbbc4df0-43c5-40f8-b1be-30e3200c42ac" alt=""><figcaption><p>Schematic of the LP reward logic</p></figcaption></figure>

### **Liquidity Provider Equations**

The % share of rewards paid out to the i-th Reactor is calculated using the following equation:

$$
r\_ lp\_{(i)}=lp^{\frac{1}{3} }*{(i)}\times ld^{\frac{1}{3} }*{(i)}\times Opt^{\frac{1}{3} }\_{(i)}
$$

Note that the share of rewards r\_lp (i) makes use of the optimal allocation Opt (i).\
Finally, the reward amount for LPs in the i-th Reactor are given by
