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

fix: incentive records get overwritten; key incentive records by ID #5492

Closed
p0mvn opened this issue Jun 10, 2023 · 0 comments · Fixed by #5496
Closed

fix: incentive records get overwritten; key incentive records by ID #5492

p0mvn opened this issue Jun 10, 2023 · 0 comments · Fixed by #5496
Assignees
Labels
F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board

Comments

@p0mvn
Copy link
Member

p0mvn commented Jun 10, 2023

Background

We currently can only create one incentive record per pool id, uptime index, incentive denom and incentive creator:

key := types.KeyIncentiveRecord(incentiveRecord.PoolId, uptimeIndex, incentiveRecord.IncentiveDenom, incentiveCreator)
incentiveRecordBody := types.IncentiveRecordBody{
RemainingAmount: incentiveRecord.IncentiveRecordBody.RemainingAmount,
EmissionRate: incentiveRecord.IncentiveRecordBody.EmissionRate,
StartTime: incentiveRecord.IncentiveRecordBody.StartTime,
}

It looks like if I create the same gauge twice, the first one will get completely overwritten. Incentive records should have IDs in their keys to avoid this overwriting.

Suggested Design

Incentive records are keyed by ID

Acceptance Criteria

  • add functional test validating that internal CL incentives work after multiple epochs with gauge updates
  • add functional test validating that CL incentives work after creating multiple external gauges for a single: per pool id, uptime index, incentive denom and incentive creator
@p0mvn p0mvn added the F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board label Jun 10, 2023
@p0mvn p0mvn self-assigned this Jun 10, 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
None yet
Development

Successfully merging a pull request may close this issue.

1 participant