Skip to content

Fix: label the vault countdown "Unlocks Start In", then show "% Unlocked" - #122

Merged
aminsammara merged 2 commits into
mainfrom
amin/a-2456-unlocks-start-in-label
Oct 22, 2026
Merged

aminsammara merged 2 commits into
mainfrom
amin/a-2456-unlocks-start-in-label

Conversation

@aminsammara

@aminsammara aminsammara commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #121 (A-2456).

Since #121 the Token Vault countdown runs to the start of the unlock; after that, tokens release linearly every block. With the label still "Unlocks In", "21 days" read as the whole vault unlocking in 21 days, and once the unlock started the card said only "Available now".

Vault state Label Value
Before the unlock starts Unlocks Start In 21 days / 4 hours
Unlock started % Unlocked e.g. 27.39%
Unlock started, milestone not achieved % Unlocked e.g. 27.39%, with Milestone still locked underneath
No lock schedule, or NCATP Unlocks In (unchanged) existing values
  • How the share is computed: currentVestedAmount / allocation from useVestingCalculation, the same calculation the vesting chart uses, so the card and the chart can't disagree. It's rounded down to 0.01%, so no vault shows 100% before its last token unlocks.
  • Milestone vaults: they follow the same schedule but release nothing until the milestone is achieved, so the card shows the schedule's percentage with "Milestone still locked" underneath. The tooltip says the unlocked tokens can't be withdrawn yet.
  • Tooltip: reworded for each state.

Testing

  • yarn type-check passes.
  • eslint on the changed file passes.
  • yarn build passes with placeholder VITE_* values.
  • I haven't looked at it in a running app.

…gins

Since #121 the countdown runs to the start of the unlock, after which tokens release linearly every
block. Under the old "Unlocks In" label, "21 days" read as the whole vault unlocking in 21 days.

Show "Unlocks Start In" while that countdown is running. Once the unlock has started the value is
"Available now" (or "Milestone still locked" for a milestone vault), and the label goes back to
"Unlocks In": "Unlocks Start In: Available now" would read oddly. NCATP vaults count down to a full
unlock at their withdrawal timestamp, so they keep "Unlocks In".
@aminsammara
aminsammara requested a review from a team as a code owner October 22, 2026 18:52
After the unlock starts, the card showed "Unlocks In: Available now", which says nothing about how far
through the schedule the vault is. Show "% Unlocked" with the share of the allocation the schedule has
released instead, computed by useVestingCalculation so it matches the vesting chart in the details
modal. The share is rounded down to 0.01% so no vault reads 100% before its last token unlocks.

A milestone vault whose milestone is not achieved follows the same schedule but can release nothing,
so it shows the same percentage with "Milestone still locked" underneath, and the tooltip says the
unlocked tokens can't be withdrawn yet. Previously "Milestone still locked" replaced the value.

Vaults without a lock schedule, and NCATP vaults, keep "Unlocks In" and their existing values.
@aminsammara aminsammara changed the title Fix: label the vault countdown "Unlocks Start In" until the unlock begins Fix: label the vault countdown "Unlocks Start In", then show "% Unlocked" Oct 22, 2026
@aminsammara
aminsammara merged commit d4244f6 into main Oct 22, 2026
5 checks 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

Development

Successfully merging this pull request may close these issues.

1 participant