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

Updates to LiquidityPositionsResponse #4861

Open
grod220 opened this issue Sep 17, 2024 · 0 comments
Open

Updates to LiquidityPositionsResponse #4861

grod220 opened this issue Sep 17, 2024 · 0 comments
Labels
needs-refinement unclear, incomplete, or stub issue that needs work

Comments

@grod220
Copy link
Contributor

grod220 commented Sep 17, 2024

After attempting a UI for LP positions in penumbra-zone/web#1786, there are some changes to LiquidityPositionsResponse that would make it easier to create LP-related UI's.

Proposal

message LiquidityPositionsResponse {
      Position data = 1;
+    PositionId position_id = 2;
+    SpendableNoteRecord note_record = 3;
+    ValueView r1_value_view = 4;
+    ValueView r2_value_view = 5;
}

Reasons for the additions:

  • position_id prevents the need for consumers to match the index in the request with the response
  • note_record allows the response to contain the associated LP NFT. This allows subsequent requests to close/withdraw to know which source account to use for fees. Otherwise, the consumer needs to request all balances and do the matching themselves (an expensive operation). This would quite likely require database work to associate position ID's with base denoms.
  • The two ValueView's are used to display metadata of the reserve assets to users can see icons and amounts in the display denom format. If not returned, the consumer needs to roundtrip two assetMetadataById() requests
@github-actions github-actions bot added the needs-refinement unclear, incomplete, or stub issue that needs work label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-refinement unclear, incomplete, or stub issue that needs work
Projects
None yet
Development

No branches or pull requests

1 participant