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

dex: replace PositionRewardClaim by repeated PositionWithdrawal #3883

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

hdevalence
Copy link
Member

Instead of having a separate reward claim action that can only be performed once, we can add a sequence number to the withdrawn position NFT, allowing multiple withdrawals.

@hdevalence
Copy link
Member Author

In addition to existing unit tests, I verified that pcli works with withdrawn positions just fine:

Scanning blocks from last sync height 294 to latest height 294
[0s] ██████████████████████████████████████████████████       0/0       0/s ETA: 0s
 Account  Value                                                                                Source                                                               Sender
 # 0      1lpnft_withdrawn_0_plpid18veu9yl7vfp4qpqvr60nae0rmz8qhw4dy3cct447w5pthuvqw6ts2mfjkr  Tx 5b54fdc2b31218a4481698992566ba3995fad7f1c9a30ca39c5f1cfa8b9fac2e  penumbra1hckq024z3fd6wl29kk4rwfny…
 # 0      100gm                                                                                Tx 64760e64c5a5f8d82d27987363d491f40fa02657de9630f1172c7a10f292f4d7  Unknown
 # 0      19800gm                                                                              Tx c710ce76a63b205711cea8364a1f5e501e986361c541ad93a339a3528fbe0588  penumbra1hckq024z3fd6wl29kk4rwfny…
 # 0      500000test_usd                                                                       Genesis                                                              Unknown
 # 0      1lpnft_opened_plpid1dad0tyhd4hlfaetj5v25qzz708ngsm2maqg6chudzq6x4dmgr08s7vmlnu       Tx c710ce76a63b205711cea8364a1f5e501e986361c541ad93a339a3528fbe0588  penumbra1hckq024z3fd6wl29kk4rwfny…
 # 0      100cube                                                                              Genesis                                                              Unknown
 # 0      10000pizza                                                                           Genesis                                                              Unknown
 # 0      1000000penumbra                                                                      Genesis                                                              Unknown
 # 0      19900gn                                                                              Tx ee42a08a2960f1407b51b586a4da8c8803a085d4d2661714411f85912b055403  penumbra1hckq024z3fd6wl29kk4rwfny…
 # 0      100gn                                                                                Tx 5b54fdc2b31218a4481698992566ba3995fad7f1c9a30ca39c5f1cfa8b9fac2e  penumbra1hckq024z3fd6wl29kk4rwfny…

@erwanor
Copy link
Member

erwanor commented Feb 26, 2024

ACK on mechanism, i think this is great and the state reduction is appreciated. I want to give it a more thorough review later today, but this should make it into 68.

@hdevalence
Copy link
Member Author

Closes #3851 as a side effect.

Instead of having a separate reward claim action that can only be performed
once, we can add a sequence number to the withdrawn position NFT, allowing
multiple withdrawals.
@hdevalence hdevalence merged commit 54185a5 into main Feb 27, 2024
6 checks passed
@hdevalence hdevalence deleted the lpnft-withdrawn-seq branch February 27, 2024 07:19
@cratelyn cratelyn added the A-dex Area: Relates to the dex label Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dex Area: Relates to the dex
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants