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][Internal Review] Add functional to Distribute coins using InternalGauge and External Gauge #5471

Closed
stackman27 opened this issue Jun 8, 2023 · 1 comment · Fixed by #5500
Assignees

Comments

@stackman27
Copy link
Contributor

Background

we added the ability to use internal and external gauge in here: #5459. Now it'll be good to have functional testing on it

Invariants to Check

  • check if internal gauge are not created when external gauge is expected and vice versa
  • check NoLock is only for CL gauges
  • check correct emission rate and coins distributed per epoch
  • more tbd

Acceptance Criteria

  • rigorously test both the flows
  • all test should pass without hindering other tests/flow
@p0mvn
Copy link
Member

p0mvn commented Jun 10, 2023

We need to create the following tests:

  • Create 2 balancer pools
  • Create 2 concentrated pools
  • Create 1 external by duration gauge perpetual via MsgCreateGauge
  • Create 1 external by duration gauge non-perpetual over 2 epochs MsgCreateGauge
  • Create 1 external no-lock gauge perpetual MsgCreateGauge
  • Create 1 external no-lock gauge non-perpetual over 2 epochs MsgCreateGauge
  • Create distribution records for internal incentives using HandleReplacePoolIncentivesProposal
    • incentivize one of the balancer pools (that is lockable durations associated with them
    • incentivize one of the concentrated pools

Then, let 1 epoch pass artificially. Validate that:

  • internal incentives were correctly distributed to the right pool
  • external gauge incentives were correctly distributed to the right pools
  • IncentivizedPools query returns the right thing
  • ExternalGauges query returns the right thing

Next, remove distr records completely using logic in HandleReplacePoolIncentivesProposal

Let the second epoch pass. Confirm that

  • only external non-perpetual gauges with 2 epochs distributed
  • no internal incentive distribution

Let thing epoch pass. Confirm that:

  • nothing distributes as non-perpetual gauges with 2 epochs have ended and perpetual gauges have not been reloaded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants