---
# System prepended metadata

title: Streamr Policy Options
tags: [Spec-Agreements]

---

---
tags: Spec-Agreements
---

# Streamr Policy Options

## Regular Policies Table

<table>
<tr>
<th>Policy</th>
<th>Option 1</th>
<th>Option 2</th>
<th>Option 3</th>
</tr>
<tr>
<td>
Allocate
</td>
<td>
<a href="#1.-Equal-Weight">Equal Weight</a>
</td>
<td>
<a href="#2.-Performance/Weight-Based-Allocation">Performance/Weight Based Allocation</a>
</td>
<td>
<a href="#3.-Salary-and-Bonus">Salary and Bonus</a>
</td>
</tr>
<tr>
<td>
Measure Performance/Weighting
</td>
<td>
<a href="#1.-NULL">NULL</a>
</td>
<td>
<a href="#2.-Oracle-Connection">Oracle Connection</a>
</td>
<td>
<a href="#3.-Stake-Based-Weighting">Stake Based Weighting</a>

</td>
</tr>
<tr>
<td>
Check Global Penalized Leaving
</td>
<td>
<a href="#1.-Minimum-Funding">Minimum Funding</a>
</td>
<td>
<a href="#2.-Large-Number-of-Brokers">Large Number of Brokers</a>
</td>
<td>
</td>
</tr>
<tr>
<td>
Check Local Penalized Leaving
</td>
<td>
<a href="#1.-Minimum-Time">Minimum Time</a>
</td>
<td>
<a href="#2.-Broker-Whitelist-Leaving">Broker Whitelist Leaving</a>
</td>
<td>
</td>
</tr>
<tr>
<td>
Check Ability to Join
</td>
<td>
<a href="#1.-Auto-Allow">Auto-Allow</a>
</td>
<td>
<a href="#2.-Broker-and-Stake">Broker and Stake</a>
</td>
<td>
<a href="#3.-Broker-Whitelist">Broker Whitelist</a>
</td>
</tr>
</table>


## Regular Policies Definitions

### Allocate

The action which maps the current epochs allocation to different brokers in the system. These inputs are not necessarily all required but rather are all possible needs for different allocation functions.

$Allocate(\mathcal{B}, R, s_{i}, p_{i}, n)\rightarrow a_i$

#### 1. Equal Weight

Given some pre-determined and constant $\Delta F$, allocate equally each epoch to all brokers.

$Allocate(\mathcal{B}, R, s_{i}, p_{i}, n)\rightarrow \frac{\Delta F}{n}$

#### 2. Performance/Weight Based Allocation

Given some pre-determined and constant $\Delta F$, allocate the payment based upon each broker's share of total performance/weight.

$Allocate(\mathcal{B}, R, s_{i}, p_{i}, n)\rightarrow \frac{\Delta F \cdot p_{i}}{\Sigma p_{j}}$

#### 3. Salary and Bonus

Given some pre-determined and constant $\Delta F$, as well as a dynamic bonus allocation $\Delta B$, give the brokers an allocation of a base salary as well as a bonus based on performance/weight

$Allocate(\mathcal{B}, R, s_{i}, p_{i}, n)\rightarrow \frac{\Delta F}{n} +\frac{\Delta B \cdot p_{i}}{\Sigma p_{j}}$

### Measure Performance/Weighting


This action maps each broker to a measure of performance. This can also be coming from an oracle but should only be high trust signals to avoid manipulation. Finally, this may also be a policy based on something like stake.

$MeasurePerformance(i)\rightarrow p_i$

where $p_i \in [0,1]$

#### 1. NULL

Return null for all values (no performance measure used)

$MeasurePerformance(i)\rightarrow NULL$


#### 2. Oracle Connection

Given some oracle outside of the system, query for each broker's performance metric.

$MeasurePerformance(i)\rightarrow ORACLE(i)$

#### 3. Stake Based Weighting

Given an amount of stake in each broker, return the percentage of total stake each broker has.

$MeasurePerformance(s_i)\rightarrow \frac{s_i}{\Sigma s_{j}}$


### Check Global Penalized Leaving

This action controls the ability of the entire set of brokers to be able to leave with or without penalty on their stake. While individual brokers may be allowed to leave if they satisfy certain requirements, when this returns true all brokers will be able to leave without penalty.

$CGPL(R, n)\rightarrow y$

where $y \in {0,1}$

#### 1. Minimum Funding

Given some parameter of minimum funding, this function returns true when the funding is below the threshold.

$CGPL(R,n)\rightarrow R < R_{min}$

#### 2. Large Number of Brokers

When the system is at a point where there are at least $n^*$ brokers, a broker may leave.

$CGPL(R, n)\rightarrow n \geq n^*$

### Check Local Penalized Leaving

This action controls the ability of the individual broker to leave without a penalty on stake. One possible example policy would be when a broker has been in the system for a minimum period of time.

$CLPL(\lambda_i, a_i, i)\rightarrow y$

where $y \in {0,1}$

#### 1. Minimum Time

Given a minimum time in the system, this function will return true when the broker has been in the system for that length of time or longer.

$CLPL(\lambda_i, a_i,i)\rightarrow \lambda_i \geq \lambda_{min}$

#### 2. Broker Whitelist Leaving

It may be in the best interest of the system to allow for discretionary decisions regarding leaving in the form of a broker whitelist denoted by W. This would return true only if the broker was in this set.

$CLPL(\lambda_i, a_i,i)\rightarrow i \in W$

### Check Ability to Join

This action controls the logic of whether or not an individual broker is capable of joining the agreement.

$CAJ(n, n_{max}, s_i,i)\rightarrow y$

where $y \in {0,1}$

#### 1. Auto-Allow

This function is meant to display a pattern of failure since things like stake would not be considered. No matter what a broker is always allowed to join.

$CAJ(n, n_{max}, s_i,i)\rightarrow 1$

#### 2. Broker and Stake

Given a maximum number of brokers and minimum stake, the new broker is allowed to join if the current number of brokers is less than the number of maximum brokers and the broker has at least the minimum stake.

$CAJ(n, n_{max}, s_i,i)\rightarrow n < n_{max} \text{ AND } s \geq s_{min}$

#### 3. Broker Whitelist

Given a whitelist of broker IDs $W$, this function will return true only if a broker ID is part of the set.

$CAJ(n, n_{max}, s_i,i)\rightarrow i \in W$

