Skip to content

feat: price impact slider, fee tier badge, creator social section - #1191

Merged
Chucks1093 merged 3 commits into
accesslayerorg:devfrom
uche001-dev:fix/accesslayer-assigned-batch
Oct 19, 2026
Merged

Chucks1093 merged 3 commits into
accesslayerorg:devfrom
uche001-dev:fix/accesslayer-assigned-batch

Conversation

@uche001-dev

Copy link
Copy Markdown

Summary

Three scoped deliverables for the assigned issues. #403 is already fully shipped on dev, see notes below.

#403 - Sell proceeds estimate helper

Already fully implemented on dev: estimateSellProceeds in keyPriceDisplay.utils.ts computes the estimate, SellFeeBreakdown.tsx displays it labeled "Estimated proceeds (approximate)" before the confirmation step, and shows "Estimated proceeds unavailable" when it can't be computed - all three acceptance criteria are met, with existing test coverage in TradeDialog.sellPayoutDisplay.test.tsx and TradeDialog.slippageTolerance.test.tsx. No changes needed; not included in this PR.

#755 - Bonding curve price impact simulation (reduced scope, agreed with maintainer)

Given the issue's full scope (canvas sparkline chart with requestAnimationFrame, a strict <16ms/1000-slider-move performance assertion, 24h ETA) versus the other three issues in this batch, this PR covers the core deliverable at reduced scope:

  • computeBuyCostPreview/computeSellPayoutPreview in bondingCurve.utils.ts: a bigint curve engine with the exact signatures requested ((currentSupply, amount, feeBps) returning gross/fee/net/newPrice), cross-validated against the existing float curve (computeBuyCost/computeSellRevenue) within a 1-stroop tolerance across supplies 0/1/10/100/1000
  • computeSlippagePercent + classifySlippageSeverity: the green <1% / yellow 1-5% / red >5% slippage badge classification
  • applyWorstCaseBuffer: the configurable worst-case XLM buffer (default 0.5%)
  • PriceImpactSlider: an interactive quantity slider (numeric input + range, synced) that re-runs the curve engine on every change and renders gross/net cost or payout, new price, the colour-coded slippage badge, and the worst-case XLM figure for buys

Not included: the canvas sparkline chart and the strict 16ms/1000-move performance test. Happy to follow up with those in a separate PR if still wanted.

#1102 - Fee discount tier badge and breakdown

Adds classifyVolumeDiscountTier (bronze/silver/gold by cumulative wallet volume, distinct from the existing per-trade getVolumeTierDiscountBps), getTierDiscountBps, and computeTierProgress (volume needed for the next tier). VolumeTierBadge renders the badge with a tooltip showing the distance to the next tier, and renders nothing for a wallet with no tier (per the "no badge for wallets with no discount tier" acceptance criterion). TierFeeBreakdown shows base fee / tier discount / final fee for the trade confirmation screen.

Scope note: this repo has no existing endpoint for a wallet's cumulative trading volume, so these components take tier/cumulativeVolumeStroops as props rather than fetching them. Wiring the "fetch on wallet connect, cache for session" part is left for whoever adds that endpoint; these compose with it either way, including on the wallet profile page per the issue's scope.

#1103 - Creator social profile section on the key detail page

The key detail page already showed avatar, display name, and bio via CreatorProfileHeader, but never surfaced the creator's published social links or a way to reach their full public profile page - both already exist and are already used on the separate creator public profile page. Added CreatorSocialSection, reusing the existing resolveCreatorSocialLinks/CreatorProfileSocialLinks so the links stay consistent across both pages, plus a link to /creator/<address>/profile. Intentionally does not duplicate the avatar/name/bio the header already renders.

Test plan

  • vitest run on all new/touched test files - 118 passed, 1 pre-existing unrelated failure (confirmed via stash/diff against a clean dev checkout - same failure, same count, before and after this branch)
  • tsc -b --noEmit - clean
  • eslint - clean
  • prettier --check - clean
  • Cross-validated the bigint curve engine against the existing float implementation in the test suite
  • Confirmed no new test regressions in CreatorDetailPage.* suites after wiring in CreatorSocialSection (caught and fixed one real regression during development - an initial version duplicated the bio text already shown by the header, breaking an existing test's text-uniqueness assumption - before this PR)

Closes #755
Closes #1102
Closes #1103

Uche Okafor added 3 commits October 19, 2026 12:03
Adds computeBuyCostPreview/computeSellPayoutPreview, a bigint curve
engine cross-validated against the existing float curve
(computeBuyCost/computeSellRevenue), plus slippage classification and
a worst-case-buffer helper. PriceImpactSlider composes these into an
interactive quantity slider showing gross/net cost or payout, the
resulting price, a colour-coded slippage badge (green under 1%,
yellow 1-5%, red over 5%), and the worst-case XLM figure for buys.

Reduced scope from the full issue: the canvas sparkline chart and the
strict <16ms/1000-slider-move performance assertion are not included.
The curve engine, slider, and fee/slippage breakdown it was built to
drive are the parts this covers.

Closes accesslayerorg#755
Adds classifyVolumeDiscountTier (bronze/silver/gold, by cumulative
wallet volume), getTierDiscountBps, and computeTierProgress, plus two
presentational components: VolumeTierBadge (the badge itself, with a
tooltip showing volume needed for the next tier, rendering nothing
for a wallet with no tier) and TierFeeBreakdown (base fee / tier
discount / final fee for the trade confirmation screen).

Both take the wallet's tier and cumulative volume as props rather
than fetching them, since this repo has no existing endpoint for
wallet-level trading volume; wiring the fetch-on-connect + session
cache is left to whoever adds that endpoint, and these components
compose with it either way.

Closes accesslayerorg#1102
… page

The creator key detail page already showed avatar, display name, and
bio via CreatorProfileHeader, but never surfaced published social
links (Twitter, website, Discord) or a way to reach the creator's
full public profile page — both exist already, just not here.

Adds CreatorSocialSection, reusing the existing
resolveCreatorSocialLinks/CreatorProfileSocialLinks (the same ones
the public profile page already uses) so the links stay consistent
across both pages, plus a link to /creator/<address>/profile. Renders
nothing extra when the creator hasn't published any links.

Closes accesslayerorg#1103
@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@uche001-dev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Chucks1093
Chucks1093 merged commit 521f707 into accesslayerorg:dev Oct 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants