In runtime-modules/referendum/src/lib.rs, in fn vote the voting stake is only locked for balances transfer, but not for paying fees, tips or transaction costs; enabling users to use up their staked balance for these actions. We suggest to change the limits of the staking lock to WithdrawReasons::all().
Issue description
In runtime-modules/referendum/src/lib.rs, in fn vote the voting stake is only locked for balances transfer, but not for paying fees, tips or transaction costs:
This enables voters to still use the balance locked as a voting stake for paying (system) transaction costs, reserving funds, paying higher-level fees or tips for transaction inclusion.
Risk
Users that participate in voting in referendums could still use their staked balance for paying transaction costs, fees, etc. This undermines the purpose of staking and could encourage users to act dishonestly without punishment.
Mitigation
We suggest to change the limits of the staking lock to WithdrawReasons::all().
Summary
In runtime-modules/referendum/src/lib.rs, in
fn vote
the voting stake is only locked for balances transfer, but not for paying fees, tips or transaction costs; enabling users to use up their staked balance for these actions. We suggest to change the limits of the staking lock toWithdrawReasons::all()
.Issue description
In runtime-modules/referendum/src/lib.rs, in
fn vote
the voting stake is only locked for balances transfer, but not for paying fees, tips or transaction costs:This enables voters to still use the balance locked as a voting stake for paying (system) transaction costs, reserving funds, paying higher-level fees or tips for transaction inclusion.
Risk
Users that participate in voting in referendums could still use their staked balance for paying transaction costs, fees, etc. This undermines the purpose of staking and could encourage users to act dishonestly without punishment.
Mitigation
We suggest to change the limits of the staking lock to
WithdrawReasons::all()
.