Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CL Incentives] Key incentive records by owner address to prevent DoS/trolling #4515

Closed
Tracked by #3991
AlpinYukseloglu opened this issue Mar 6, 2023 · 0 comments · Fixed by #4581
Closed
Tracked by #3991
Assignees
Labels
F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board

Comments

@AlpinYukseloglu
Copy link
Contributor

Background

We currently key incentive records by poolId, denom, and minUptime. While this is technically sufficient and robust, it allows for any user to dust each uptime accumulator with a denom and essentially prevent that denom from being used for incentives.

This became much bigger of an issue when we constrained the supported uptimes, since it becomes trivially easy to do this.

Suggested Design

  • I suggest we add incentiveOwner to the end of the incentive record key. This prevents anyone from being blocked from creating incentives due to existing incentives on the pool. This will require updating incentive record getters and setters.
  • To ensure incentive retrieval remains simple, I suggest we move minUptime in front of denom in the key and then implement a GetAllIncentiveRecordsForUptime function that gathers all the incentives for a given poolId | minUptime from state

Acceptance Criteria

  • All new and existing tests pass
@AlpinYukseloglu AlpinYukseloglu added the F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board label Mar 6, 2023
@AlpinYukseloglu AlpinYukseloglu self-assigned this Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant