Skip to content

feat(avalanche): NETWORK_META + event_type labels for AVAX#28

Merged
simonmorley merged 1 commit into
mainfrom
avalanche-frontend
Apr 26, 2026
Merged

feat(avalanche): NETWORK_META + event_type labels for AVAX#28
simonmorley merged 1 commit into
mainfrom
avalanche-frontend

Conversation

@simonmorley
Copy link
Copy Markdown
Member

Frontend side of #4. Adds Avalanche to `NETWORK_META` and the new event type to the translation tables.

The chain stays hidden from the feed until the activation migration's `is_public` flag is flipped to `true` (gated by default per slashr-infra#23 + `OPERATOR_PLAYBOOK_CHAIN_SOAK.md`). When that happens, this is what renders the events.

What

  • `NETWORK_META.avalanche` — ticker `AVAX`, colour `#E84142` (Avalanche brand red), name `Avalanche`.
  • `NETWORK_ORDER` — appended.
  • `EventType` union — adds `avax_uptime_below_threshold`.
  • `EVENT_TYPE_LABELS` — feed sentence: "Uptime fell below the Avalanche reward threshold. Stakers earn nothing this period."
  • `EVENT_TYPE_DESCRIPTIONS` — long form for detail pages.

Test plan

  • `npm run build` clean (0 TS errors)
  • Land worker + migration siblings; verify rendering on dev frontend after flip

Frontend side of #4. Adds Avalanche to NETWORK_META (ticker AVAX,
official red #E84142) plus the avax_uptime_below_threshold event
type with feed-friendly translation strings.

The chain stays hidden from the feed until the network row's
is_public flag is flipped (gated by default per migration 058 +
OPERATOR_PLAYBOOK_CHAIN_SOAK.md). When that flip happens this
constants.ts entry is what the feed will use to render the events.

Sibling: slashr-worker#43 (collector + detector),
slashr-infra#23 (activation migration).
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request integrates Avalanche network support by updating constants and type definitions. It adds the Avalanche network metadata, ticker, and a new event type for uptime thresholds. The reviewer suggested re-aligning the values in the event type label and description objects to maintain the vertical formatting style used elsewhere in the file.

Comment thread src/lib/constants.ts
jito_opted_in: 'Opted back into Jito-Solana — delegators earn MEV tips again.',
tia_slashed_downtime: 'Offline too long on Celestia. Jailed.',
tia_slashed_double_sign: 'Signed conflicting blocks at the same height on Celestia. Tombstoned.',
avax_uptime_below_threshold: 'Uptime fell below the Avalanche reward threshold. Stakers earn nothing this period.',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The addition of avax_uptime_below_threshold breaks the vertical alignment of values in the EVENT_TYPE_LABELS object. While the new entry follows the pattern of having at least one space after the colon, the existing entries are aligned to a shorter column (previously determined by tia_slashed_double_sign). To maintain the clean formatting style established in this file (and applied to NETWORK_META in this same PR), you should consider re-aligning the entire block to the new longest key.

Comment thread src/lib/constants.ts
jito_opted_in: 'Validator resumed running jito-solana after a prior opt-out. MEV tip revenue flows to delegators again.',
tia_slashed_downtime: 'Validator missed too many blocks on Celestia and was jailed. Stake receives a minor slash; validator must manually unjail before they can rejoin consensus. Delegators earn no rewards while jailed.',
tia_slashed_double_sign: 'Validator signed two different blocks at the same height on Celestia. A slashing penalty is applied to all bonded stake — the validator\'s and all delegators\' proportionally. The validator is permanently tombstoned and cannot rejoin the active set.',
avax_uptime_below_threshold: 'Validator\'s uptime over its current validation period dropped below the threshold (Avalanche convention is 80%). Validators below the threshold at the end of the period forfeit ALL rewards — for themselves and their delegators — even if their stake remains untouched. Recovers if uptime climbs back above the threshold before the period ends.',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to EVENT_TYPE_LABELS, the addition of avax_uptime_below_threshold here breaks the vertical alignment of the EVENT_TYPE_DESCRIPTIONS object. Consider re-aligning the values in this block to match the new longest key for consistency.

@simonmorley simonmorley merged commit 49e7674 into main Apr 26, 2026
2 checks passed
@simonmorley simonmorley deleted the avalanche-frontend branch April 26, 2026 19:53
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