penumbra-zone / dex-explorer

Web app for visualization the state of the Penumbra DEX
Apache License 2.0
7 stars 1 forks source link

Fill in details for LP position page #3

Open hdevalence opened 6 months ago

hdevalence commented 6 months ago

The MVP code is now up, with a skeleton of the LP position page: https://dex-explorer.testnet-preview.penumbra.zone/lp/plpid1zh5ngkkhcnlzugaeztk74umu7r7ytq9ghurz6v25n6m7mzyzvruqa3fdve

Brainstorming an initial list of changes to fill in data:

Position Status Box

Timeline

The visual design language for the timeline is that the left-aligned boxes are actions by the user who controls the position, and the right-aligned boxes are actions by the DEX engine interacting with the position (currently this is just filling against it)

General thought on the "timeline"-ness: can we put explicit time markers on the side of the current content? Maybe putting block heights on one side and date time on the other, in a greyed out font that blends with the background?

User Actions

DEX Actions

There may be many, many executions connected to a particular position. It would be good to have some way to optionally collapse these, maybe using some heuristics.

One concrete suggestion: if there are more than 2*N executions, show only the first N and last N trades, with a vertical ellipsis in between (maybe also with a count of how many items are elided). Clicking on the ellipsis shows all of the intervening executions. The user can restore the collapsed view by refreshing the page. Then, set N = 1, so we only show the first and last trades, but have code where we could easily change to show more or less if we change our mind.

philipjames44 commented 6 months ago

Additional TODO for tracking:

hdevalence commented 5 months ago

The EventPositionExecution events now include the previous reserves state (allowing complete trade display) as well as a context field with the end-to-end pair (allowing display of something like "while routing C -> D")