joystream
joystream copied to clipboard
No 20% tx fee cut for validators
Block author still gets tip, but no inclusion fee cut of 20%, also good for tokenomics, see background https://github.com/Joystream/joystream/issues/4174
┆Issue is synchronized with this Asana task by Unito
Implemented in https://github.com/Joystream/joystream/pull/4199
How to test in QA: verify that validator does not receive any tx inclusion fee revenue at all, they still should be able to receive tips.
How to test in QA: verify that validator does not receive any tx inclusion fee revenue at all, they still should be able to receive tips.
I added a basic test for correct implementation of the DealWithFees
implementation in the runtime as cargo unit tests, but this is by no means a complete test coverage.
We could have simple test scenario in integration tests as follows:
- Setup Account
X
fund it fromAlice
(the block author) - Record total issuance, and balance of
Alice
andX
- execute
N
balances:transfer() calls each with a tipT
, transferring amountV
to accountY
- At end of the scenario (which should be completed before the end of an Era) the following should hold:
- Alice Balance should have increased by
(N * T)
only - Account X balance decresed by
(N * T + N * V + TotalTxFeesPaid)
- Account Y balance equal to
(N * V)
- Total Issuance reduced by
TotalTxFeesPaid
- Alice Balance should have increased by
we can derive TotalTxFeesPaid
by BalanceOf(X) - (N * T + N * V)
we can also simplify by transfering to self ie. X == Y
and transferring zero
balance, ie V == 0