Add MaxTipAmount for pallet-tips (#1709)

Last week we experienced a governance attack.
Surprisingly, there was no upper limit on the tip amount.

Due to the mechanism of pallet-fragment-election, the council members
will be refreshed immediately. Attacker is easy to control the council
and give a large tip amount.
This commit is contained in:
Xavier Lau
2023-09-28 06:08:05 -05:00
committed by GitHub
parent b50d8e6f7f
commit de71fecc4e
4 changed files with 34 additions and 1 deletions
+1
View File
@@ -1289,6 +1289,7 @@ impl pallet_tips::Config for Runtime {
type TipCountdown = TipCountdown;
type TipFindersFee = TipFindersFee;
type TipReportDepositBase = TipReportDepositBase;
type MaxTipAmount = ConstU128<{ 500 * DOLLARS }>;
type WeightInfo = pallet_tips::weights::SubstrateWeight<Runtime>;
}