# Deployment Logic

### 1. General

Tokemak aims to deploy all of its POA to venues based on the votes of the LDs while using LP provided assets as leverage (defined by the POA multiplier) The quantities of assets deployed to outside venues are dictated by the following guardrail factors. More detailed information on the guardrails can be found in the "Guardrails & Impermanent Loss Mitigation" section.
1. 1.
Protocol owned assets (POA or "reserve," eg ABC) Do not deploy more than 3x the qty available POA ("POA Multiplier")
2. 2.
LP provided base asset available to pair (eg ETH) If not enough provided by LPs the available base assets are pro rata distributed across reactors.
3. 3.
TOKE staked to the reactor Ideally, enough TOKE should be staked to the reactor to result in TOKE staked + ABC reserve = LP ABC, or in other words two thirds of the value of deployed LP assets should be staked by LDs.
Note that these are starting parameters and we will be able to significantly relax these as more data becomes available.
The below detailed logic is set up in such way that if followed in order will result in the correct deployed amount.

### 2. Deployment Logic & Equations

#### 1. Based on POA (assets in reserve)

In a first step, the assets provided by the LPs (AssetLP) are passed through the first guardrail. The assets available owned by the protocol multiplied by the POA Multiplier (eg 3) determine the maximum amount of LP assets deployable (LPAsset_Deployable1). This guardrail is applied to both the Token Reactor assets and the Pair Reactor assets.
This guardrail is calculated based on Qty.
\begin{align*} &\text {IF POA_{reserve} \times POAMultiplier \geq Asset_{LP}} \\ &\ \ \ \text {THEN Asset_{LP} = LPAsset_{Deployable1}} \\ &\text {IF POA_{reserve} \times POAMultiplier < Asset_{LP}} \\ &\ \ \ \text {THEN POA_{reserve} \times POAMultiplier = LPAsset_{Deployable1}} \end{align*}
2. Based on pair asset available to pair
In a second step, the system compares the amount of available pair assets (eg ETH) in the Pair Reactor (after applying the POA guardrail) to the LP provided assets in order to determine if all assets can be paired up with ETH. Should not enough ETH be available in the Pair Reactor, the system will proceed by equally distributing the ETH across the reactors.
This guardrail is calculated based on notional value.
\begin{align*} &\text {IF LPETH_{Deployable1} \geq SumAssets_{Deployable1}} \\ &\ \ \ \text {THEN ETH_{Pairable}=1} \\ &\text {IF LPETH_{Deployable1} < SumAssets_{Deployable1}} \\ &\ \ \ \text {THEN ETH_{Pairable}= LPETH_{Deployable1} \div SumAssets_{AssetDeployable1}} \\ &\rightarrow \ LPAsset_{Deployable1} \times ETH_{Pairable} = LPAsset_{Deployable2} \end{align*}

#### 3. Based on TOKE staked to the reactor

The last step is to assure a minimum amount of TOKE is staked to the reactor by the LDs. While more TOKE can be staked to a reactor the value of ABC deployed is not to surpass 1.5x the value of the TOKE staked to the reactor.
This is calculated based on notional value.