-
Notifications
You must be signed in to change notification settings - Fork 624
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] Allow early withdrawals for frozen positions #4525
Merged
+324
−129
Merged
Changes from all commits
Commits
Show all changes
199 commits
Select commit
Hold shift + click to select a range
235653b
initial push
czarcas7ic e4941f6
push
czarcas7ic a3ac7b7
untracked files
czarcas7ic e888677
Merge branch 'adam/add-freeze-api' of https://github.com/osmosis-labs…
czarcas7ic 61f5c76
add untracked files
czarcas7ic afc350f
Merge branch 'adam/add-freeze-api' of https://github.com/osmosis-labs…
czarcas7ic 085bdc1
merge branches
czarcas7ic b7a2a70
Merge branch 'main' into adam/add-freeze-api
czarcas7ic 2e4fd0f
add changes required for fees
czarcas7ic 79017a3
lint
czarcas7ic 8e68719
fix test errors
czarcas7ic b221dcf
clean up
czarcas7ic d2ede58
remove print lines
czarcas7ic a515d5d
feat: single fee accum (#4116)
czarcas7ic 838c2ab
no longer need to get all positions for fee
czarcas7ic c75f163
incentive accum initialization
AlpinYukseloglu 447967e
lint
AlpinYukseloglu 0adb801
Update x/concentrated-liquidity/store_test.go
czarcas7ic 17f47fe
add lower level tests and make uptime accum access private
AlpinYukseloglu 75e0c14
lint
AlpinYukseloglu 5f2e7a5
add gotests for helper fn
AlpinYukseloglu 433e215
Merge branch 'main' into alpo/uptime-accums
AlpinYukseloglu 008379a
Merge adam/add-freeze-api into alpo/uptime-accums
AlpinYukseloglu 400ac3e
Update test to use existing variable
AlpinYukseloglu a4fbf0b
create or update records upon position creation/update
AlpinYukseloglu c604659
add tests and clean up
AlpinYukseloglu 1f75cea
sync position-related changes
AlpinYukseloglu 982830e
add support for negative liquidity delta
AlpinYukseloglu 768ec68
add and test helper & set up tick initialization logic
AlpinYukseloglu c318fa0
implement accumulator updates on tick crossing and clean up proto
AlpinYukseloglu d0184b7
clean up comments
AlpinYukseloglu 6020836
minor test cleanup
AlpinYukseloglu 0d5559a
Merge branch 'alpo/position-uptime-accums' into alpo/CL-accum-update-…
AlpinYukseloglu 01bd068
ensure accum initalization follows conventions and clean up tests
AlpinYukseloglu 1bc68b5
update pool proto and CL pool extension for tracking liq changes
AlpinYukseloglu 188778d
update new field at pool initialization and add tests
AlpinYukseloglu 093024d
comment todos
AlpinYukseloglu a778dbb
clean up naming and move empty options to global var
AlpinYukseloglu 6fbf412
Merge branch 'main' into alpo/position-uptime-accums
AlpinYukseloglu 0c9c235
add clarifying comments and lint
AlpinYukseloglu a5fe6f6
Merge branch 'main' into alpo/position-uptime-accums
AlpinYukseloglu 2ba1d26
Merge branch 'alpo/position-uptime-accums' into alpo/CL-accum-update-…
AlpinYukseloglu 7c6eb8f
implement IncentiveRecord proto
AlpinYukseloglu a4b8620
add comments
AlpinYukseloglu d79c226
lint
AlpinYukseloglu 677bc8a
Merge branch 'alpo/position-uptime-accums' into alpo/CL-accum-update-…
AlpinYukseloglu e0ae23e
set up wiring for proto
AlpinYukseloglu f9f11b3
implement updateUptimeAccumulatorsToNow
AlpinYukseloglu 2c29631
implement and test calcAccruedIncentivesForAccum
AlpinYukseloglu 798b66e
add tests for new helpers
AlpinYukseloglu fcc5c8c
minor comment updates
AlpinYukseloglu debab7f
Merge branch 'alpo/position-uptime-accums' into alpo/CL-accum-update-…
AlpinYukseloglu 9287d3c
accum test updates
AlpinYukseloglu 37aa74f
lint
AlpinYukseloglu a7986a3
Merge branch 'main' into alpo/CL-accum-update-logic
AlpinYukseloglu 81a7b99
Merge branch 'main' into alpo/CL-accum-update-logic
AlpinYukseloglu 7a7c52d
clean up diff
AlpinYukseloglu 2961572
lint
AlpinYukseloglu 19ef297
update go.mod for e2e
AlpinYukseloglu 3d8a86e
clean up proto and add error message
AlpinYukseloglu 2f93b76
lint
AlpinYukseloglu bec7d79
sketch out testing approach
AlpinYukseloglu a208eb2
set up keys
AlpinYukseloglu 6ba9927
clean up diff
AlpinYukseloglu 940f0b7
clean up comments
AlpinYukseloglu e35280e
lint
AlpinYukseloglu b777ee1
implement set and get for incentive records
AlpinYukseloglu 8355980
comment cleanup
AlpinYukseloglu 85da656
minor comment and test cleanup
AlpinYukseloglu d167d77
clean up tests and comments
AlpinYukseloglu de7c146
[CL Incentives] Implement `setIncentiveRecords` and `getIncentiveReco…
AlpinYukseloglu ad5db48
Revert "[CL Incentives] Implement `setIncentiveRecords` and `getIncen…
AlpinYukseloglu c65ddc1
Merge branch 'alpo-set-incentives' into alpo-cl-uptime-global
AlpinYukseloglu ad3938f
set incentive records in new position tests
AlpinYukseloglu 9a5649e
Merge branch 'main' into alpo-cl-uptime-global
AlpinYukseloglu 3859c0b
fix merge conflicts
AlpinYukseloglu 3c5c9de
Merge branch 'main' into alpo-cl-uptime-proto-helpers
AlpinYukseloglu deaf70c
add check for init position record values
AlpinYukseloglu 2661c58
fix and finalize uptime accum position tests
AlpinYukseloglu 4c7f178
fix go mod for e2e
AlpinYukseloglu 26b4505
Merge branch 'alpo-cl-uptime-proto-helpers' in
AlpinYukseloglu 74cadb6
Merge branch 'alpo-cl-uptime-proto-helpers' into alpo-set-incentives
AlpinYukseloglu 166656a
Merge branch 'alpo-set-incentives' into alpo-cl-uptime-global
AlpinYukseloglu a636539
clean up diff
AlpinYukseloglu ee5c2c6
add err check to accum update
AlpinYukseloglu 5407223
fix rounding error
AlpinYukseloglu b5b6643
Merge branch 'alpo-cl-uptime-proto-helpers' into alpo-set-incentives
AlpinYukseloglu a1e4deb
Merge branch 'alpo-cl-uptime-proto-helpers' into alpo-cl-uptime-global
AlpinYukseloglu 83bd08f
implement tick init uptime tracker logic
AlpinYukseloglu acd94eb
fix test compatibility
AlpinYukseloglu dde309a
implement fix for global accums falling out of sync before tick init
AlpinYukseloglu cc21105
add tests to ensure uptime trackers are initialized properly
AlpinYukseloglu 5fe763c
add comment for new helper
AlpinYukseloglu 10919f4
add core logic
AlpinYukseloglu 9419d69
Merge branch 'main' into alpo-cl-uptime-proto-helpers
AlpinYukseloglu a16a58b
go mod tidy
AlpinYukseloglu 586e7bd
fix conflicts
AlpinYukseloglu efe299c
fix e2e
AlpinYukseloglu 4df2525
update go mod
AlpinYukseloglu 05acab6
Merge branch 'alpo-cl-uptime-proto-helpers' into alpo-set-incentives
AlpinYukseloglu c68cca2
Merge branch 'alpo-cl-uptime-proto-helpers' into alpo-cl-uptime-global
AlpinYukseloglu dfa9215
Merge branch 'alpo-cl-uptime-global' into alpo-cl-uptime-tick-init
AlpinYukseloglu 07f94f5
Merge branch 'main' into alpo-set-incentives
AlpinYukseloglu b7e5cd6
Merge branch 'alpo-set-incentives' into alpo-cl-uptime-global
AlpinYukseloglu 736820b
fix and further test tick init logic
AlpinYukseloglu ea20428
remove redundant values from incentive record state
AlpinYukseloglu 3738f83
cleanup from review
AlpinYukseloglu 2cf4d75
Merge branch 'main' into alpo-cl-uptime-global
AlpinYukseloglu 54b9bd3
Merge branch 'alpo-cl-uptime-global' into alpo-cl-uptime-tick-init
AlpinYukseloglu a607e48
comment cleanup
AlpinYukseloglu bbd6e49
set up cross tick tests
AlpinYukseloglu 63bffa4
Merge branch 'alpo-cl-uptime-tick-init' into alpo-cl-uptime-cross
AlpinYukseloglu bba3209
add further tests
AlpinYukseloglu 1d208be
test and comment cleanup
AlpinYukseloglu b080e81
Merge branch 'alpo-cl-uptime-tick-init' into alpo-cl-uptime-cross
AlpinYukseloglu 2c0076a
implement core logic
AlpinYukseloglu 37bc26b
update osmoutils go mod and remove curTick as fn param
AlpinYukseloglu 49dc498
thorough tests for new functionality
AlpinYukseloglu a022dfb
clean up new functions for readability
AlpinYukseloglu bcf4abd
clean up test comments
AlpinYukseloglu 30aa0c5
Merge branch 'alpo-cl-uptime-tick-init' into alpo-cl-uptime-cross
AlpinYukseloglu 7ebd592
Merge branch 'alpo-cl-uptime-cross' into alpo-cl-uptime-inside
AlpinYukseloglu b0e9edb
fix test names
AlpinYukseloglu 6d3c201
Merge branch 'alpo-cl-uptime-cross' into alpo-cl-uptime-inside
AlpinYukseloglu a7d07f0
Merge branch 'main' into alpo-cl-uptime-tick-init
AlpinYukseloglu e610a05
Merge branch 'alpo-cl-uptime-tick-init' into alpo-cl-uptime-cross
AlpinYukseloglu 2ea1348
Merge branch 'alpo-cl-uptime-cross' into alpo-cl-uptime-inside
AlpinYukseloglu e83af52
lint
AlpinYukseloglu f5e0c70
add godoc and further comments
AlpinYukseloglu 0c64337
update go mod for e2e
AlpinYukseloglu 47bb8b4
update liq change logic
AlpinYukseloglu a55414b
update uptime accums before gettings them for tick crossing
AlpinYukseloglu 1ec8a7f
Merge branch 'alpo-cl-uptime-cross' into alpo-cl-uptime-inside
AlpinYukseloglu 972fb0d
Merge branch 'alpo-cl-uptime-inside' into alpo-cl-uptime-claim
AlpinYukseloglu 12962ae
abstract uptime init and update logic to helper
AlpinYukseloglu 333a2e7
add thorough tests for initOrUpdatePositionUptime
AlpinYukseloglu 0536116
update liquidity update logic and tests to use new helper
AlpinYukseloglu 51a7f56
add todo for frozenuntil issue
AlpinYukseloglu 0a51d05
lint
AlpinYukseloglu 9857baa
Merge branch 'alpo-cl-uptime-cross' into alpo-cl-uptime-inside
AlpinYukseloglu 26ddf8b
Merge branch 'alpo-cl-uptime-inside' into alpo-cl-uptime-claim
AlpinYukseloglu 8bb8240
lint
AlpinYukseloglu b117f72
clean up logic and add tests for helper
AlpinYukseloglu 65abf78
go mod for osmoutils e2e
AlpinYukseloglu 511d8a0
move position key computation outside loop
AlpinYukseloglu 85d435d
Merge branch 'main' into alpo-cl-uptime-inside
AlpinYukseloglu 65da1ae
Merge branch 'alpo-cl-uptime-inside' into alpo-cl-uptime-claim
AlpinYukseloglu 874428f
Merge branch 'main' into alpo-cl-uptime-inside
AlpinYukseloglu 654505d
clean up imports and go sum
AlpinYukseloglu 120b213
Merge branch 'alpo-cl-uptime-inside' into alpo-cl-uptime-claim
AlpinYukseloglu 77f158d
fix imports
AlpinYukseloglu 391d74f
[CL Incentives][bugfix]: Replace all uses of frozenUntil with joinTim…
stackman27 78090a5
e2e passing
stackman27 5089a8e
implement message, proto, and core logic
AlpinYukseloglu a424bda
convert freezeduration to uint64
stackman27 8f10042
Merge branch 'sis/cl-inc-jt-fd' into alpo-uptime-claim
AlpinYukseloglu 219d7b5
Merge branch 'main' into alpo-cl-uptime-claim
AlpinYukseloglu 776c7e0
Merge branch 'alpo-cl-uptime-claim' into sis/cl-inc-jt-fd
AlpinYukseloglu f34e75c
Merge branch 'sis/cl-inc-jt-fd' into alpo-uptime-claim
AlpinYukseloglu 93b08b4
Merge branch 'main' into sis/cl-inc-jt-fd
AlpinYukseloglu 9dc78e6
Merge branch 'sis/cl-inc-jt-fd' into alpo-uptime-claim
AlpinYukseloglu 9c6510c
Merge branch 'main' into alpo-uptime-claim
AlpinYukseloglu a13cbc6
implement tests for collectIncentives
AlpinYukseloglu 90b4df4
add msg level tests and clean up logic/tests
AlpinYukseloglu 620602b
draft implementation
AlpinYukseloglu 6e1c365
begin testing
AlpinYukseloglu a39c147
add codec, cli, and simulation
AlpinYukseloglu 034d272
claim incentives upon position deletion to clear records
AlpinYukseloglu cf428d7
comment cleanup
AlpinYukseloglu 43573c3
add more test cases
AlpinYukseloglu 4b12446
lint
AlpinYukseloglu fe7a39f
add error catching test cases
AlpinYukseloglu efe72bc
implement createIncentive message
AlpinYukseloglu 3abe2a8
Merge branch 'alpo-uptime-claim' into alpo-create-incentive
AlpinYukseloglu 580a7ca
cli and codec
AlpinYukseloglu 21268ba
add check and related tests
AlpinYukseloglu c863344
add further tests and lint
AlpinYukseloglu a8c6d4c
add test case for existing incentive records
AlpinYukseloglu 8d03bfa
pull relevant changes into new branch
AlpinYukseloglu 3d882b6
lint
AlpinYukseloglu c28338a
minor test comment updates
AlpinYukseloglu 2ab1610
godoc update
AlpinYukseloglu a781cd5
Merge branch 'main' into alpo-uptime-claim
AlpinYukseloglu a4afed1
expand withdraw tests to better include incentives logic
AlpinYukseloglu 663a8d6
minor optimizations and cleanup from code review
AlpinYukseloglu 899f0b0
Merge branch 'alpo-uptime-claim' of https://github.com/osmosis-labs/o…
AlpinYukseloglu 2acb254
Merge branch 'alpo-uptime-claim' into alpo-create-incentive
AlpinYukseloglu b07e763
[CL Incentives] Implement `CreateIncentive` logic and message (#4519)
AlpinYukseloglu bded5b6
Revert "[CL Incentives] Implement `CreateIncentive` logic and message…
AlpinYukseloglu 58a6f96
Merge branch 'alpo-create-incentive' into alpo-early-withdrawals-new
AlpinYukseloglu fd86d6a
make unit tests more robust
AlpinYukseloglu 8ffa117
minor comment cleanup
AlpinYukseloglu 0e4c1ca
Merge branch 'main' into alpo-uptime-claim
AlpinYukseloglu 4cd2975
fix conflicts
AlpinYukseloglu f9d3efa
Merge branch 'alpo-uptime-claim' into alpo-create-incentive
AlpinYukseloglu 3fcef27
Merge branch 'alpo-create-incentive' into alpo-early-withdrawals-new
AlpinYukseloglu 82acd75
Merge branch 'main' into alpo-create-incentive
AlpinYukseloglu a10d0cd
Merge branch 'alpo-create-incentive' into alpo-early-withdrawals-new
AlpinYukseloglu 972a2f5
Merge branch 'main' into alpo-early-withdrawals-new
AlpinYukseloglu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor test case I think would be good to see is that, if we have three positions (one 20%, one 50%, and one 30%) that get created at the same time, if the 20% forfeits rewards that is is properly distributed between the 50% and 30% proportionally. Not at all blocking, just something I thought would be good to verify.