From 85fa5b6cdbb7081acfcea583738fd9cf4c41b751 Mon Sep 17 00:00:00 2001 From: Witold Date: Tue, 6 Aug 2024 17:09:33 +0200 Subject: [PATCH 1/2] refactor: preventcreation of rewards with no payout, but with high computational cost --- protocol/0056-REWA-rewards_overview.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/protocol/0056-REWA-rewards_overview.md b/protocol/0056-REWA-rewards_overview.md index 51b619542..bed1439bd 100644 --- a/protocol/0056-REWA-rewards_overview.md +++ b/protocol/0056-REWA-rewards_overview.md @@ -225,10 +225,9 @@ If a party meets **all** the eligibility requirements, their reward metric $m_ee In order to allow creation of rewards which can pay-out to parties who are not actively trading, a transfer using this metric should be accepted in the cases where: -- it specifies no metric asset, no markets within the market scope, no staking requirement, and no position requirement - in this case, all parties on the network are given a score of $1$. -- it specifies no metric asset, no markets within the market scope, no position requirement, but does specify a staking requirement - in this case, all parties meeting the staking requirement are given a score of $1$. +- it specifies only one of: metric asset, market scope, staking requirement, position requirement (an asset must be specified also in this case) - all parties meeting the eligibility criteria are given a score of $1$. -If however a position requirement is specified, an asset must be specified also and then parties must meet the position requirement to receive rewards. +Note: at least one requirement must be specified to avoid a trivial attack on the network where an attacker can just keep setting these rewards such that they never get paid but constantly evaluated on the whole network. ### Reward windows and transfer delays @@ -1189,7 +1188,7 @@ At the end of epoch 2, 10000 VEGA rewards should be distributed to the `ETHUSDT` ### Valid combinations -- Given a recurring transfer using the eligible entities metric and the below combination of fields, rewards should be uniformly distributed amongst all entities on the network regardless of trading activity. +- Given a recurring transfer using the eligible entities metric and the below combination of fields, rewards should not be distributed since no eligibility criteria are set: - no dispatch metric specified - no markets specified - no staking requirement specified From 98ad240822ca69a49a0465537081b7d00a868a5f Mon Sep 17 00:00:00 2001 From: Witold Date: Thu, 26 Sep 2024 15:38:31 +0200 Subject: [PATCH 2/2] refactor: move to appropriate section --- protocol/0056-REWA-rewards_overview.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/protocol/0056-REWA-rewards_overview.md b/protocol/0056-REWA-rewards_overview.md index bed1439bd..977c123af 100644 --- a/protocol/0056-REWA-rewards_overview.md +++ b/protocol/0056-REWA-rewards_overview.md @@ -1188,13 +1188,6 @@ At the end of epoch 2, 10000 VEGA rewards should be distributed to the `ETHUSDT` ### Valid combinations -- Given a recurring transfer using the eligible entities metric and the below combination of fields, rewards should not be distributed since no eligibility criteria are set: - - no dispatch metric specified - - no markets specified - - no staking requirement specified - - no position requirement specified -(0056-REWA-171) - - Given a recurring transfer using the eligible entities metric and the below combination of fields, rewards should be uniformly distributed amongst all entities meeting the staking requirement regardless of trading activity. - no dispatch metric specified - no markets specified @@ -1216,6 +1209,13 @@ At the end of epoch 2, 10000 VEGA rewards should be distributed to the `ETHUSDT` ### Invalid combinations +- Given a recurring transfer using the eligible entities metric and the below combination of fields, rewards should not be distributed since no eligibility criteria are set: + - no dispatch metric specified + - no markets specified + - no staking requirement specified + - no position requirement specified +(0056-REWA-171) + - Given a recurring transfer using the eligible entities metric and the below combination of fields, the transfer should be rejected. - no dispatch metric specified - no markets specified