---
# System prepended metadata

title: Revenue Sharing cadCAD Model
tags: [Legacy]

---

---
tags: Legacy
---

# Revenue Sharing cadCAD Model

The revenue sharing model is being refactored to work with multiple brokers and multiple delegators as well as behaviors specific to withdrawls and their impact on the system.

Model: https://github.com/BlockScience/streamr-revenue-sharing

It is important to note that building the cadCAD model and writing the mathematical specification feed into one and other. Taking a step back from the specification to code the model illuminates many different areas.

Presentation Goal: Give an overview of the current model progress and discuss potential policy/mechanism design specific questions.

## Simulation Overview - Current Substeps

1. [**Behavioral**] Broker revenue is simulated as a behavioral function that is based on how much stake an agreement has.
2. [**Policy**] Yield allocation policy is used for disbursing revenue
3. [**Behavioral**] Brokers potentially leave
4. [**Behavioral**] Delegators potentially leave
5. [**Behavioral**] New brokers potentially join
6. [**Behavioral**] New delegators potentially join
7. [**Behavioral & Policy**] Delegators perform their asset allocation and transfer funds to brokers
8. [**Behavioral**] Brokers stake funds on agreements
9. [**System**] Bookkeeping is done in terms of system state

## Substeps to be Developed

1. Slashing behavioral substep
2. Retirement/withdraw from brokers (likely within asset allocation)
3. Any policies in regards to brokers or delegators being allowed or not allowed to join the system or leave without penalty

## Policies

1. Deposit (bonding curve, vesting, etc.)
2. Withdraw policies (penalties, vesting, retirement pool)
3. Yield allocation (owner share vs. delegator share, vesting)
4. Slashing penalty allocation (who pays for it)
5. Share allocations (bonding curve, owner share vs. delegator share, etc.)

## Behavioral Representations

1. Delegator joining frequency
2. Delegator leaving frequency
3. Broker joining frequency
4. Broker leaving frequency
5. Broker staking frequency
6. Revenue opportunities (linear or diminishing for staked capital, maximum amount of stake/work a broker can do)
7. Slashing representation and frequency

## Discussion Topics
1. Are there any other policies that have been thought about prior that we want to bring into this? Or missing pieces?

- Assumed project lifecycle, creator bootstrapping distribution, enough brokers for smaller scale+completely selfless. Differing incentive structure. Not just time, capacity is some type of agent. More demand -> incentives to get more brokers in

2. Proposal for fund withdrawl: retirement pools
- A delegator triggers this when ready to take back their stake and they are placed in a special class for "retirement"
- A debt is added to the broker pool which the yield allocation takes into account for settlement of this debt.
- Every period some of the debt gets paid off but the delegator no longer is making money or is making it on a smaller stake
- Once the debt is paid off the delegator is removed from the retirement pool and it is complete.
- Edge case 1: What if the delegator wants to withdraw only some of the stake
- Edge case 2: What if the delegator is in the retirement pool but then stakes again alter on?

- Time locks
- Vesting backed
- Understand how others have done 
- Can we have clawbacks? Grace period of asking for money back.
- Need solvency criteria, threshold for force close
- Fixed income, annuities
- Secondary markets?

- **Identify comparatives in the traditional finance world**


3. Bonding Curve for delegator allocation
- What are the benefits of using a bonding curve here versus simple linear shares based on staking?
- How does it work at initialization of the broker pool contract? 


4. Yield Allocation: What kinds of methods for yield allocation do we want to use?
- Owner share of revenue is given to owner and then the rest allocated by share ownership?
- Instead of disbursing every period, making the revenue held as a reserve which the delegator profits from when taking out?
- Is a vesting schedule a good policy choice?