---
tags: Spec-Agreements
---
# Streamr Global Brokers Subsystem Math Spec
This math spec covers the specifics of the brokers in the overall ecosystem.
## Global State
#### System State
| Symbol | Description | Domain |
| --------|------- | ----- |
| $B$| Global Set of Brokers| |
## Local State (Agent Level)
We move forward to define the *local states* of the agents (every ith broker) participating in the system:
| Symbol | Description | Domain | Initial Value |
| --------|------- | ----- | ----- |
| $\Gamma_{i}$ | Set of owned agreements| | $\emptyset$|
## Mechanisms
### Global Broker Set Mechanisms
#### Join
Upon passing any verification related to the sytem, a broker will be added to the set of global brokers with the ability to now either join an agreement or start an agreement as the owner.
In terms of the global state, the action expands the broker set.
$$ B^+ = B \cup \{i\}$$
#### Leave
When the broker either chooses to leave or is forced to leave, all agreements associated with this broker will be force cancelled.
In terms of the global state, the action reduces the broker set.
$$ B^+ = B - \{i\}$$
#### Deploy Agreement
The overall mechanism with regards to deployment is handled at the main level, but on a local level it will add the agreement into the local variable for this broker.
The representation to broker i and agreement k is:
$$ \Gamma_{i}^+ = \Gamma_{i} \cup \{k\}$$
#### Transfer Agreement
TO DO: Can this be handled.
#### Cancel Agreement
The overall mechanism with regards to deployment is handled at the main level, but on a local level it will remove the agreement into the local variable for this broker.
The representation to broker i and agreement k is:
$$ \Gamma_{i}^+ = \Gamma_{i} - \{k\}$$