🧮
Variables, Equations and the State
Coming from the causal loop diagram, the diagram below goes a level deeper to define the relationships between the variables mathematically.


Mathematical definitions of the variables and the relationships between them are as shown below:
Qcᵢ: Number of queries from Connector i, i ∈ [1, n] Qcuᵢ: Number of queries from Curator i, i ∈ [1, n] Qhᵢ: Number of queries from Hollower i, i ∈ [1, n] Quᵢ: Number of queries from User i, i ∈ [1, n] Qutot: Total user queries by users Qbriᵢ: # of queries bridger i’s content received Qbritot: Total # of received queries by all bridgers Cqᵢ: # of content per query for Connector i, i ∈ [1, n]
DBFq: DBaaS Fee Per Query DBFhᵢ: Fees collected from Hollower i, i ∈ [1, n] DBFtot: Total DBaaS Fees Collected
PFq: PaaS Fee Per Query PFcᵢ: Fees collected from Connector i, i ∈ [1, n] PFtot: Total PaaS Fees Collected
SSFq: SSaaS Fee Per Query SSFcuᵢ: Fees collected from Curator i, i ∈ [1, n] SSFtot: Total DBaaS Fees Collected
Ftot: Total Fees Collected
RRuser: User Rewards Rate RRbrid: Bridger Rewards Rate RRfb: FirstBatch Revenues Rate
Rutot: Total User Rewards Rbritot: Total Bridger Rewards Rfb: FirstBatch Revenues Ruᵢ: User i’s rewards, i ∈ [1, n] Rbriᵢ: Bridger i’s Rewards, i ∈ [1, n] Rfb: FirstBatch Revenues
The utility function of the protocol is given by a coub-douglas productivity function of bridger and user rewards, divided by an exponential function of the personalization fees per query. This equation expresses the positive effect bridger and users rewards have on the ecosystem while still accounting for the negative effect of query fees:
Lagrange multipliers equation of the Coub-Douglas part of the utility function and its first order conditions can be calculated as:
The monetary policy of the protocol is dynamically managed by controlling reward rates and fee amounts while satisfying the first-order conditions above. Fees for the Similarity Search as a Service and DataBase as a Service are based on traditional SaaS pricing methods.
The state of the token ecosystem is defined as a combination of 7 sections. Protocol-wide variables are under the first two sections; exogenous variables (fee amounts and reward rates) are continuously updated to determine the monetary policy, and endogenous variables keep track of the sums created by the agents’ actions. The other sections keep data related to unique agents for each role. The state as the ecosystem from a high level is as such:
The set above has multiple subsets and matrices as its elements as seen in the code snippet below:
State = {
"ProtocolEx":{"DBFq":2,"PFq":2,"SSFq":3,"RRuser":0.5, "RRbrid":0.2, "RRfb":0.3}, # Protocol-wide variables set by FirstBatch
"ProtocolEn":{"Qutot":0,"Qbritot":0,"DBFtot":0,"PFtot":0, "SSFtot":0, "Ftot":0, "Rutot":0, "Rbritot":0}, # Protocol-wide sums determined by actions
"FirstBatch":{"Rfb":0}, # FirstBatch's revenue
"Users":[{"Qu":0,"Ru":0}, {"Qu":0,"Ru":0}, {"Qu":0,"Ru":0}], # Query count and rewards of each user
"Bridgers": [{"Rbri":0,"Qbri":0}, {"Rbri":0,"Qbri":0}, {"Rbri":0,"Qbri":0}], # Query count and rewards of each bridger
"Connectors": [{"Qc":0,"Cq":50, "PFc":3}, {"Qc":0,"Cq":50, "PFc":3}], # Query count, content per query and fees collected for each connector
"Curators": [{"Qcu":0,"SSFcu":0}, {"Qcu":0,"SSFcu":0}], # Query count and fees collected for each curator
"Hollowers": [{"DBFh":0,"Qh":0}, {"DBFh":0,"Qh":0}] # Query count and fees collected for each hollower
}
- DBFq (DBaaS Fee Per Query)
- PFq (PaaS Fee Per Query)
- SSFq (SSaaS Fee Per Query)
- RRuser (User Rewards Rate)
- RRbrid (Bridger Rewards Rate)
- RRfb (FirstBatch Reward Rate)
- Qutot (Total user queries)
- Qbritot (Total # of received queries by all bridgers)
- DBFtot (Total DBaaS Fees Collected)
- PFtot (Total PaaS Fees Collected)
- SSFtot (Total DBaaS Fees Collected)
- Ftot (Total Fees Collected)
- Rfb (FirstBatch Revenues)
- User i
- Quᵢ (Number of queries from User i)
- Ruᵢ (User i’s rewards)
- Bridger i
- Rbriᵢ (Bridger i’s Rewards)
- Qbriᵢ (# of queries bridger i’s content received)
- Connector i
- Qcᵢ (Number of queries from Connector i)
- Cqᵢ (# of content per query for Connector i)
- PFcᵢ (Fees collected from Connector i)
- Curator i
- Qcuᵢ (Number of queries from Curator i)
- SSFcuᵢ (Fees collected from Curator i)
- Hollower i
- DBFhᵢ (Fees collected from Hollower i)
- Qhᵢ (Number of queries from Hollower i)