[CL Incentives] Scale gas cost for new incentives by number of existing incentives #4517
Labels
F: concentrated-liquidity
Tracking the development of concentrated liquidity feature to improve filtering on the project board
Background
The current implementation of incentive creation allows for a DoS vector where a user can spam new incentives with dust amounts. Since our reward calculation is linear in the number of incentive records, this exposes the chain to being forced to run unbounded compute.
To combat this, we should scale gas costs for creating incentives by the number of existing incentive records.
Suggested Design
baseGas * len(existingIncentiveRecordsForUptime)
on each incentive record addconcentrated-liquidity/types/constants.go
:setIncentiveRecord
increateIncentive
:Acceptance Criteria
The text was updated successfully, but these errors were encountered: