-
Notifications
You must be signed in to change notification settings - Fork 150
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
bundled positions #89
Merged
yugure-orca
merged 14 commits into
orca-so:main
from
yugure-orca:yugure/bundled-positions
Apr 7, 2023
Merged
bundled positions #89
yugure-orca
merged 14 commits into
orca-so:main
from
yugure-orca:yugure/bundled-positions
Apr 7, 2023
Conversation
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
use mpl-token-metadata 1.7 because rust 1.60 does not compile 1.8
- initialize_pool.test: update error codes, add a test case for ignoring bump
- ProgramResult to Result<()> - add /// CHECK comments - remove space attribute on Mint account - change create_metadata_accounts_v2 to v3 - update testcases - Change in error code detected first - Change in account closing method coral-xyz/anchor#2169
yugure-orca
force-pushed
the
yugure/bundled-positions
branch
from
March 13, 2023 14:27
d0ac15e
to
36ea6fe
Compare
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
doc fields are added on IDL
Fixed test cases that did not take into account rewards accruing up to just before the close. This test case is not related to bundled positions. The test case happened to fail, so I fixed them to make them all successful.
rawfalafel
approved these changes
Apr 6, 2023
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.
LGTM!
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivations
Some of the accounts created when a Whirlpool position is opened are not deleted when the position is closed. Therefore, the rent of accounts that are not deleted is an unrefundable cost.
In addition, the range (tick_lower_index and tick_upper_index) of a Whirlpool position cannot be changed after it has been opened, so a position must be closed and a new position opened if the range is to be changed. In other words, in order to change the range of a position, there is an overhead in the form of rent.
Some liquidity providers have a need to change the range of their positions frequently, and the rent overhead associated with changing the range of a position is not negligible and is a barrier to changing the range of a position.
Even if changes of range are infrequent, there is negative incentive to limit the creation of positions because of the unrefundable cost of each position. If the overhead of creating positions is eliminated, more positions can be used.
on-chain program updates
Move NFT name, symbol, metadata URI and UpdateAuthority definitions to constants (at util/token.rs before move)
Add account
Add instruction
delete_position_bundle must be executed by the owner.
The rented lamports can be refunded to receiver.
instruction update
Add PDA seeds constraint to not close Bundled Position
new Position Bundle NFT is introduced
SDK updates
Tests passed
integration
Integration/multi-ix
sdk