code.vegaprotocol.io/vega@v0.79.0/core/integration/features/verified/rewards.feature (about) 1 Feature: Team Rewards 2 3 Setup a maker fees received team game with a fee cap. 4 5 We want to make it so that one team is allocated rewards and the other team is allocated rewards. 6 7 - Team A should have also paid rewards and not have their rewards capped. 8 - Team B should not have paid rewards and have their rewards capped. 9 10 Question is what happens to the left over rewards. 11 12 13 Background: 14 15 And the average block duration is "1" 16 And the following network parameters are set: 17 | name | value | 18 | referralProgram.minStakedVegaTokens | 0 | 19 | market.fee.factors.makerFee | 0.01 | 20 | network.markPriceUpdateMaximumFrequency | 0s | 21 | validators.epoch.length | 60s | 22 23 # Initialise the markets 24 And the following assets are registered: 25 | id | decimal places | quantum | 26 | USD-1-10 | 0 | 1 | 27 And the markets: 28 | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | decimal places | position decimal places | 29 | ETH/USD-1-10 | ETH | USD-1-10 | default-log-normal-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e-3 | 0 | default-futures | 0 | 0 | 30 31 # Initialise the parties 32 Given the parties deposit on asset's general account the following amount: 33 | party | asset | amount | 34 | aux1 | USD-1-10 | 1000000000000 | 35 | aux2 | USD-1-10 | 1000000000000 | 36 | party1 | USD-1-10 | 1000000000000 | 37 | party2 | USD-1-10 | 1000000000000 | 38 | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | USD-1-10 | 1000000000000 | 39 40 # Exit opening auctions 41 When the parties place the following orders: 42 | party | market id | side | volume | price | resulting trades | type | tif | 43 | aux1 | ETH/USD-1-10 | buy | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | 44 | aux1 | ETH/USD-1-10 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | 45 | aux2 | ETH/USD-1-10 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | 46 | aux2 | ETH/USD-1-10 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | 47 And the opening auction period ends for market "ETH/USD-1-10" 48 And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD-1-10" 49 50 Given the parties create the following referral codes: 51 | party | code | is_team | team | 52 | party1 | referral-code-1 | true | team1 | 53 Given the parties create the following referral codes: 54 | party | code | is_team | team | 55 | party2 | referral-code-1 | true | team2 | 56 57 Scenario: This is a test to check what happens to the capped fees. 58 59 Given the current epoch is "0" 60 When the parties submit the following recurring transfers: 61 | id | from | from_account_type | to | to_account_type | entity_scope | asset | amount | start_epoch | end_epoch | factor | metric | metric_asset | markets | lock_period | window_length | ntop | cap_reward_fee_multiple | 62 | 1 | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | ACCOUNT_TYPE_GENERAL | 0000000000000000000000000000000000000000000000000000000000000000 | ACCOUNT_TYPE_REWARD_MAKER_RECEIVED_FEES | TEAMS | USD-1-10 | 100 | 1 | 5 | 1 | DISPATCH_METRIC_MAKER_FEES_RECEIVED | USD-1-10 | ETH/USD-1-10 | 10 | 1 | 1 | 1 | 63 Then the network moves ahead "1" epochs 64 65 ## pary1 66 And the parties place the following orders: 67 | party | market id | side | volume | price | resulting trades | type | tif | 68 | aux1 | ETH/USD-1-10 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | 69 | party1 | ETH/USD-1-10 | buy | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | 70 | party1 | ETH/USD-1-10 | buy | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | 71 | aux1 | ETH/USD-1-10 | sell | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | 72 And the following trades should be executed: 73 | buyer | size | price | seller | aggressor side | buyer maker fee | seller maker fee | 74 | party1 | 10 | 1000 | aux1 | buy | 100 | 0 | 75 | party1 | 10 | 1000 | aux1 | sell | 0 | 100 | 76 77 # party2 78 And the parties place the following orders: 79 | party | market id | side | volume | price | resulting trades | type | tif | 80 | aux1 | ETH/USD-1-10 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | 81 | party2 | ETH/USD-1-10 | buy | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | 82 And the following trades should be executed: 83 | buyer | size | price | seller | aggressor side | buyer maker fee | 84 | party2 | 10 | 1000 | aux1 | buy | 100 | 85 86 When the network moves ahead "1" epochs 87 Then debug transfers 88 And parties should have the following vesting account balances: 89 | party | asset | balance | 90 | party1 | USD-1-10 | 100 | 91 | party2 | USD-1-10 | 0 |