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

feat: incentive accumulator migration #7416

Merged
merged 38 commits into from
Feb 9, 2024
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
246e5f1
feat: scaling factor for pool uptime accumulator
p0mvn Feb 2, 2024
99022a2
changelog
p0mvn Feb 3, 2024
213cec6
updates
p0mvn Feb 5, 2024
04a91c6
updates
p0mvn Feb 5, 2024
880e3d1
Merge branch 'main' into roman/pool-incentive-scaling-factor
p0mvn Feb 5, 2024
1367d0c
handle overflows
p0mvn Feb 5, 2024
748edd8
Apply suggestions from code review
p0mvn Feb 5, 2024
3158f90
updates
p0mvn Feb 5, 2024
f76b9cb
Apply suggestions from code review
p0mvn Feb 5, 2024
f254a26
fix test and clean up
p0mvn Feb 5, 2024
e36f4a1
spelling
p0mvn Feb 5, 2024
9e10789
future proof multiplication overflow
p0mvn Feb 6, 2024
de4b9ba
clean up
p0mvn Feb 6, 2024
8a43a0b
comment
p0mvn Feb 6, 2024
bab4173
lint
p0mvn Feb 6, 2024
fea2d75
Merge branch 'main' into roman/pool-incentive-scaling-factor
p0mvn Feb 7, 2024
5ac3e97
rename
p0mvn Feb 7, 2024
2d49b83
feat: incentive accumulator upgrade handler migration
p0mvn Feb 6, 2024
c5decc9
lint
p0mvn Feb 6, 2024
b1ee555
go mod
p0mvn Feb 6, 2024
32aa8c9
fix test
p0mvn Feb 6, 2024
53bd32d
implement TestMigrateAccumulatorToScalingFactor
p0mvn Feb 7, 2024
c65aaa8
basic genesis test
p0mvn Feb 7, 2024
b58ccbf
fix comment
p0mvn Feb 7, 2024
c03d5e8
clean up tests
p0mvn Feb 7, 2024
e1f07d3
clean up helpers
p0mvn Feb 7, 2024
52b389a
add test for get position IDs by pool ID
p0mvn Feb 7, 2024
3f30364
test for getIncentiveScalingFactorForPool
p0mvn Feb 7, 2024
0004a14
upgrade handler test and tick migration
p0mvn Feb 7, 2024
ab7fa11
update spec
p0mvn Feb 7, 2024
99e3a8d
Merge branch 'main' into roman/upgrade-handler-migration
p0mvn Feb 7, 2024
c9bc00f
Merge branch 'main' into roman/upgrade-handler-migration
p0mvn Feb 8, 2024
7778fe1
updates
p0mvn Feb 8, 2024
68020b1
updates
p0mvn Feb 8, 2024
06c3ad1
feat/fix: add more pools to migrate, fix key parsing bug, add more lo…
p0mvn Feb 9, 2024
56b8146
introduce helper
p0mvn Feb 9, 2024
4ef439b
Update x/concentrated-liquidity/pool.go
p0mvn Feb 9, 2024
71b47b6
Merge branch 'main' into roman/upgrade-handler-migration
mergify[bot] Feb 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clean up
  • Loading branch information
p0mvn committed Feb 6, 2024
commit de4b9bac4e98c9fba1763a1227003906a9112b10
4 changes: 2 additions & 2 deletions x/concentrated-liquidity/incentives_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3597,7 +3597,7 @@ func (s *KeeperTestSuite) TestGetIncentiveRecordSerialized() {
}
}

// This PR shows that there is a chance of incentives being truncated due to large liquidity value.
// This test shows that there is a chance of incentives being truncated due to large liquidity value.
// We observed this in pool 1423 where both tokens have 18 decimal precision.
//
// It has been determined that no funds are at risk. The incentives are eventually distributed if either:
Expand Down Expand Up @@ -3640,7 +3640,7 @@ func (s *KeeperTestSuite) TestIncentiveTruncation() {
// Create a pool state simulating pool 1423. The only difference is that we force the pool state given 1 position as
// opposed to many.
// Liquidity around height 13,607,920 in pool 1423
// We multiply by 10^17 as a sanity check that no truncation occurs within our 10^18 scaling factor choice.
// We multiply by the scaling factor value as a sanity check that no truncation occurs within our 10^27 scaling factor choice.
desiredLiquidity := osmomath.MustNewBigDecFromStr("180566277759640622277799341.480727726620927100").MulMut(currentTickLiquidityIncreaseFactor)
desiredCurrentTick := int64(596)
desiredCurrentSqrtPrice, err := math.TickToSqrtPrice(desiredCurrentTick)
Expand Down