Skip to content

Commit

Permalink
Merge pull request #860 from vegaprotocol/859-refer-to-arrays-in-net-…
Browse files Browse the repository at this point in the history
…param-proposals

Add net param formatting tips
  • Loading branch information
candida-d authored Jan 3, 2024
2 parents aa16e16 + 23d8eb8 commit 405655e
Show file tree
Hide file tree
Showing 14 changed files with 80 additions and 12 deletions.
1 change: 1 addition & 0 deletions docs/concepts/governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,3 +346,4 @@ Some network parameters have minimum/maximum boundaries to ensure they aren't su
| `governance.proposal.(TYPE).minEnact` | Must be greater than / equal to the corresponding `minClose`, proposal can't be enacted before voting on it has closed. |
| `governance.proposal.(TYPE).requiredMajority` | Minimum 0.0, maximum 1.0. Is multiplied by 100 to get percentage. |
| `governance.proposal.(TYPE).requiredParticipation`| Minimum 0.0, maximum 1.0. Is multiplied by 100 to get percentage. |
| `rewards.activityStreak.benefitTiers`: `reward_multiplier` | Minimum 1.0. |
14 changes: 13 additions & 1 deletion docs/concepts/trading-on-vega/discounts-rewards.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ You can see the current reward hoarder bonus requirements and benefits on the [b

These tiers are set through network parameters, and thus can be changed through [governance](../governance.md#network-parameter-governance).

:::tip Try it out
[Tutorial: Propose a network parameter change](../../tutorials/proposals/network-parameter-proposal.md)

Note: You'll need to format your proposal using JSON to include multiple tiers in the value field.
:::

## Activity streak
Traders that keep up an activity streak, either by placing trades or keeping a position open over several epochs, can receive a greater share of rewards and their locked reward proceeds will be available sooner.

Expand All @@ -83,6 +89,12 @@ You can see the current activity streak requirements and benefits on the [block

The details for activity streaks are set through network parameters, and thus can be changed through [governance](../governance.md#network-parameter-governance).

:::tip Try it out
[Tutorial: Propose a network parameter change](../../tutorials/proposals/network-parameter-proposal.md)

Note: You'll need to format your proposal using JSON to include multiple tiers in the value field.
:::

## Setting rewards
Rewards can be set up by anyone to incentivise certain trading behaviours they want to see on a market (or markets).

Expand All @@ -102,7 +114,7 @@ Some rewards measure trader activity over a number of epochs (set per reward). T

:::tip Try it out
* [How to fund rewards](#how-to-fund-rewards)
* [Set up a reward transfer](../../tutorials/assets-tokens/transferring-assets.md)
* [Tutorial: Set up a reward transfer](../../tutorials/assets-tokens/transferring-assets.md)
:::

### How rewards are scaled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
rationale: {
title: "Update market.fee.factors.infrastructureFee",
description: "Proposal to update market.fee.factors.infrastructureFee to 300}"
description: "Proposal to update market.fee.factors.infrastructureFee to 300"
},
terms: {
updateNetworkParameter: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"proposalSubmission": {
"rationale": {
"title": "Update market.fee.factors.infrastructureFee",
"description": "Proposal to update market.fee.factors.infrastructureFee to 300}"
"description": "Proposal to update market.fee.factors.infrastructureFee to 300"
},
"terms": {
"updateNetworkParameter": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"rationale": {
"title": "Update market.fee.factors.infrastructureFee",
"description": "Proposal to update market.fee.factors.infrastructureFee to 300}"
"description": "Proposal to update market.fee.factors.infrastructureFee to 300"
},
"terms": {
"updateNetworkParameter": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ vegawallet.exe transaction send --wallet YOUR_WALLETNAME --pubkey YOUR_PUBLIC_KE
\"proposalSubmission\": {^
\"rationale\": {^
\"title\": \"Update market.fee.factors.infrastructureFee\",^
\"description\": \"Proposal to update market.fee.factors.infrastructureFee to 300}\"^
\"description\": \"Proposal to update market.fee.factors.infrastructureFee to 300\"^
},^
\"terms\": {^
\"updateNetworkParameter\": {^
Expand Down
22 changes: 21 additions & 1 deletion docs/tutorials/proposals/network-parameter-proposal.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_position: 4
title: Update network parameter
title: Change network parameter
vega_network: TESTNET
hide_title: true
keywords:
Expand Down Expand Up @@ -44,6 +44,26 @@ The contents of a `changes` object specifies what will be different after the pr

**Value** is the new value you're proposing that the network parameter should have.

Some network parameters include multiple pieces of information in one value. Changes to one of those network parameters needs to include the correct formatting. You can see how the existing value is formatted on [Explorer ↗](https://explorer.vega.xyz/network-parameters).

For example, a proposal to change the `rewards.activityStreak.benefitTiers` network parameter would include a value that looks like the following, using escaped JSON:

```json title="Code sample for multiple values"
"value":
" { \"tiers\": [
{ \"minimum_activity_streak\": 1,
\"reward_multiplier\": \"1.05\",
\"vesting_multiplier\": \"1.05\" },
{ \"minimum_activity_streak\": 2,
\"reward_multiplier\": \"1.10\",
\"vesting_multiplier\": \"1.10\" },
{ \"minimum_activity_streak\": 3,
\"reward_multiplier\": \"1.20\",
\"vesting_multiplier\": \"1.20\" }
]
}"
```

## Templates and submitting
In the tabs below you'll see:

Expand Down
2 changes: 1 addition & 1 deletion scripts/libGenerateProposals/updateNetworkParameter.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function updateNetworkParameter(skeleton, proposalSoFar) {
const result = {
rationale: {
title: `Update ${keyToUpdate}`,
description: `Proposal to update ${keyToUpdate} to 300}`
description: `Proposal to update ${keyToUpdate} to 300`
},
terms: {
updateNetworkParameter: {
Expand Down
1 change: 1 addition & 0 deletions versioned_docs/version-v0.73/concepts/governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,3 +345,4 @@ Some network parameters have minimum/maximum boundaries to ensure they aren't su
| `governance.proposal.(TYPE).minEnact` | Must be greater than / equal to the corresponding `minClose`, proposal can't be enacted before voting on it has closed. |
| `governance.proposal.(TYPE).requiredMajority` | Minimum 0.0, maximum 1.0. Is multiplied by 100 to get percentage. |
| `governance.proposal.(TYPE).requiredParticipation`| Minimum 0.0, maximum 1.0. Is multiplied by 100 to get percentage. |
| `rewards.activityStreak.benefitTiers`: `reward_multiplier` | Minimum 1.0. |
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ You can offset some of the [fees](./fees.md) you pay, or earn even more, by rece
You can earn a commission for referring new users when a referral program is enabled. New users get a discount on their fees, while whoever refers them gets a cut of their referees’ trading fees. How much commission the referrer receives is increased if they have VEGA associated to their public key.

:::tip Refer a friend
Get benefits for referring, or being referred. In the [referrals section of Console](https://vegaprotocol.eth.limo/#/referrals), you can:
Get benefits for referring, or being referred.

In the [referrals section of Console](https://vegaprotocol.eth.limo/#/referrals), you can:
* Create a code to refer others
* Enter a code you've been given
:::
Expand Down Expand Up @@ -71,6 +73,12 @@ You can see the current reward hoarder bonus requirements and benefits on the [b

These tiers are set through network parameters, and thus can be changed through [governance](../governance.md#network-parameter-governance).

:::tip Try it out
**[Tutorial: Propose a network parameter change](../../tutorials/proposals/network-parameter-proposal.md)**

Note: You'll need to format your proposal to include multiple data in the value field.
:::

## Activity streak
Traders that keep up an activity streak, either by placing trades or keeping a position open over several epochs, can receive a greater share of rewards and their locked reward proceeds will be available sooner.

Expand All @@ -84,6 +92,12 @@ You can see the current activity streak requirements and benefits on the [block

The details for activity streaks are set through network parameters, and thus can be changed through [governance](../governance.md#network-parameter-governance).

:::tip Try it out
**[Tutorial: Propose a network parameter change](../../tutorials/proposals/network-parameter-proposal.md)**

Note: You'll need to format your proposal to include multiple data in the value field.
:::

## Setting rewards
Rewards can be set up by anyone to incentivise certain trading behaviours they want to see on a market (or markets).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
rationale: {
title: "Update market.fee.factors.infrastructureFee",
description: "Proposal to update market.fee.factors.infrastructureFee to 300}"
description: "Proposal to update market.fee.factors.infrastructureFee to 300"
},
terms: {
updateNetworkParameter: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"rationale": {
"title": "Update market.fee.factors.infrastructureFee",
"description": "Proposal to update market.fee.factors.infrastructureFee to 300}"
"description": "Proposal to update market.fee.factors.infrastructureFee to 300"
},
"terms": {
"updateNetworkParameter": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ vegawallet.exe transaction send --wallet YOUR_WALLETNAME --pubkey YOUR_PUBLIC_KE
\"proposalSubmission\": {^
\"rationale\": {^
\"title\": \"Update market.fee.factors.infrastructureFee\",^
\"description\": \"Proposal to update market.fee.factors.infrastructureFee to 300}\"^
\"description\": \"Proposal to update market.fee.factors.infrastructureFee to 300\"^
},^
\"terms\": {^
\"updateNetworkParameter\": {^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_position: 4
title: Update network parameter
title: Change network parameter
vega_network: MAINNET
hide_title: true
keywords:
Expand Down Expand Up @@ -44,6 +44,26 @@ The contents of a `changes` object specifies what will be different after the pr

**Value** is the new value you're proposing that the network parameter should have.

Some network parameters include multiple pieces of information in one value. Changes to one of those network parameters needs to include the correct formatting. You can see how the existing value is formatted on [Explorer ↗](https://explorer.vega.xyz/network-parameters).

For example, a proposal to change the `rewards.activityStreak.benefitTiers` network parameter would include a value that looks like the following, using escaped JSON:

```json title="Code sample for multiple values"
"value":
" { \"tiers\": [
{ \"minimum_activity_streak\": 1,
\"reward_multiplier\": \"1.05\",
\"vesting_multiplier\": \"1.05\" },
{ \"minimum_activity_streak\": 2,
\"reward_multiplier\": \"1.10\",
\"vesting_multiplier\": \"1.10\" },
{ \"minimum_activity_streak\": 3,
\"reward_multiplier\": \"1.20\",
\"vesting_multiplier\": \"1.20\" }
]
}"
```

## Templates and submitting
In the tabs below you'll see:

Expand Down

0 comments on commit 405655e

Please sign in to comment.