Skip to content

Commit

Permalink
chore: add volume rebate program acs
Browse files Browse the repository at this point in the history
  • Loading branch information
cdummett committed Aug 15, 2024
1 parent eb75ed1 commit 95a237f
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
45 changes: 45 additions & 0 deletions protocol/0095-HVMR-high_volume_maker_rebate.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,48 @@ As variable fees for the taker depending upon with whom they are trading would n
## Governance Requirements

As the rebate possible level interacts with other fee settings there must be a restriction on it's possible values in governance change proposals. However, as both the rebate and the relevant fees could be changed at once the failure should occur at enactment of the proposal rather than initial validation. The criterion `max(additional_maker_rebate) <= market.fee.factors.treasuryFee + market.fee.factors.buybackFee` should be checked at changes of both the maker rebate program and the two fee factor values to ensure this constraint remains true.

## Acceptance Criteria

### Governance Proposals

1. If an `UpdateVolumeRebateProgram` proposal does not fulfil one or more of the following conditions, the proposal should be `STATUS_REJECTED`:
- the `end_of_program_timestamp` must be less than or equal to the proposals `enactment_time` (<a name="0095-HVMR-001" href="#0095-HVMR-001">0095-HVMR-001</a>).
- the number of tiers in `benefit_tiers` must be less than or equal to the network parameter `volumeRebateProgram.maxBenefitTiers` (<a name="0095-HVMR-002" href="#0095-HVMR-002">0095-HVMR-002</a>).
- all `minimum_party_maker_volume_fraction` values must be a float strictly greater than 0 (<a name="0095-HVMR-003" href="#0095-HVMR-003">0095-HVMR-003</a>).
- the `window_length` must be an integer strictly greater than zero (<a name="0095-HVMR-004" href="#0095-HVMR-004">0095-HVMR-004</a>).
1. A volume rebate program should be started the first epoch change after the `enactment_datetime` is reached (<a name="0095-HVMR-005" href="#0095-HVMR-005">0095-HVMR-005</a>).
1. A volume rebate program should be closed the first epoch change after the `end_of_program_timestamp` is reached (<a name="0095-HVMR-006" href="#0095-HVMR-006">0095-HVMR-006</a>).
1. If a volume rebate program is already active and a proposal `enactment_datetime` is reached, the volume rebate program is updated at the next epoch change.
- Propose program A with `enactment_timestamp` ET1 and `end_of_program_timestamp` CT1 (<a name="0095-HVMR-007" href="#0095-HVMR-007">0095-HVMR-007</a>).
- Proposal for program A accepted and begins first epoch after ET1 (<a name="0095-HVMR-008" href="#0095-HVMR-008">0095-HVMR-008</a>).
- Propose program B with `enactment_timestamp` ET2 (ET2 > ET1 && ET2 < CT1) and `end_of_program_timestamp` CT1 (CT1 < CT2) (<a name="0095-HVMR-009" href="#0095-HVMR-009">0095-HVMR-009</a>).
- Proposal for program B accepted and overrides program A the first epoch after ET2 (<a name="0095-HVMR-010" href="#0095-HVMR-010">0095-HVMR-010</a>).
- Program is closed first epoch after CT2, there should be no active proposals (<a name="0095-HVMR-011" href="#0095-HVMR-011">0095-HVMR-011</a>).
1. Updating any of the following network parameters whilst there is an active volume rebate program will not modify or cancel the active program in any way. The updated parameters will however be used to validate future volume rebate program proposals.
- `volumeRebateProgram.maxBenefitTiers` (<a name="0095-HVMR-012" href="#0095-HVMR-012">0095-HVMR-012</a>).

### Maker volume fraction

#### Contributing trades

1. Each trade in which a party is the "maker" **should** contribute towards the parties maker volume fraction (<a name="0095-HVMR-013" href="#0095-HVMR-013">0095-HVMR-013</a>). For product spot (<a name="0095-HVMR-014" href="#0095-HVMR-014">0095-HVMR-014</a>).
1. Each trade in which a party is the "taker" **should not** contribute towards the parties maker volume fraction (<a name="0095-HVMR-015" href="#0095-HVMR-015">0095-HVMR-015</a>). For product spot (<a name="0095-HVMR-016" href="#0095-HVMR-016">0095-HVMR-016</a>).
1. A trade generated during auction uncrossing should not contribute to either parties maker volume fraction (<a name="0095-HVMR-017" href="#0095-HVMR-017">0095-HVMR-017</a>). For product spot (<a name="0095-HVMR-018" href="#0095-HVMR-018">0095-HVMR-018</a>).

#### Evaluating contributions across windows

1. Given a rebate program with a window length greater than zero. If a party generated an equal amount of volume in the current epoch to a party who created volume in a previous epoch in the window, then they should both have a maker volume fraction of `0.5`. (<a name="0095-HVMR-019" href="#0095-HVMR-019">0095-HVMR-019</a>). For product spot (<a name="0095-HVMR-020" href="#0095-HVMR-020">0095-HVMR-020</a>).
1. Given a rebate program with a window length greater than zero. If a party generated an equal amount of volume in the current epoch to a party who created volume in a previous epoch which is no longer in the window, they the party should have a maker volume fraction of `1` (and the other party will have a fraction of `0`). (<a name="0095-HVMR-021" href="#0095-HVMR-021">0095-HVMR-021</a>). For product spot (<a name="0095-HVMR-022" href="#0095-HVMR-022">0095-HVMR-022</a>).

#### Evaluating contributions across markets

1. Given two parties making markets in two separate derivative markets using settlement assets with different quantum values, if the parties generated equal volume (e.g. 10,000 USD) then they should both have a maker volume fraction of `0.5`. (<a name="0095-HVMR-023" href="#0095-HVMR-023">0095-HVMR-023</a>).
1. Given two parties making markets in two separate spot markets using quote assets with different quantum values, if the parties generated equal volume (e.g. 10,000 USD) then they should both have a maker volume fraction of `0.5`. (<a name="0095-HVMR-024" href="#0095-HVMR-024">0095-HVMR-024</a>).
1. Given two parties making markets in a separate derivative and spot market using a settlement and quote asset with different quantum values respectively, if the parties generated equal volume (e.g. 10,000 USD) then they should both have a maker volume fraction of `0.5`. (<a name="0095-HVMR-025" href="#0095-HVMR-025">0095-HVMR-025</a>).

### Setting benefit factors

1. At the start of an epoch, each parties `additional_rebate_factor` is reevaluated and fixed for the epoch (<a name="0095-HVMR-026" href="#0095-HVMR-026">0095-HVMR-026</a>).
1. A parties `additional_rebate_factor` is set equal to the factors in the highest benefit tier they qualify for (<a name="0095-HVMR-027" href="#0095-HVMR-027">0095-HVMR-027</a>).
1. If a party does not qualify for the lowest tier, their `additional_rebate_factor`is set to `0` (<a name="0095-HVMR-028" href="#0095-HVMR-028">0095-HVMR-028</a>).
33 changes: 33 additions & 0 deletions protocol/features.json
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,39 @@
"0007-POSN-034"
]
},
"Volume rebate program": {
"milestone": "suzuka_castle",
"acs": [
"0095-HVMR-001",
"0095-HVMR-002",
"0095-HVMR-003",
"0095-HVMR-004",
"0095-HVMR-005",
"0095-HVMR-006",
"0095-HVMR-007",
"0095-HVMR-008",
"0095-HVMR-009",
"0095-HVMR-010",
"0095-HVMR-011",
"0095-HVMR-012",
"0095-HVMR-013",
"0095-HVMR-014",
"0095-HVMR-015",
"0095-HVMR-016",
"0095-HVMR-017",
"0095-HVMR-018",
"0095-HVMR-019",
"0095-HVMR-020",
"0095-HVMR-021",
"0095-HVMR-022",
"0095-HVMR-023",
"0095-HVMR-024",
"0095-HVMR-025",
"0095-HVMR-026",
"0095-HVMR-027",
"0095-HVMR-028"
]
},
"Unknown": {
"milestone": "unknown",
"acs": []
Expand Down

0 comments on commit 95a237f

Please sign in to comment.