Skip to content

feat: render treasury cut in OrchestratorList#498

Merged
ECWireless merged 3 commits intomainfrom
308-display-treasury-cut-in-the-widget
Jan 16, 2026
Merged

feat: render treasury cut in OrchestratorList#498
ECWireless merged 3 commits intomainfrom
308-display-treasury-cut-in-the-widget

Conversation

@ECWireless
Copy link
Collaborator

@ECWireless ECWireless commented Jan 16, 2026

This pull request enhances the display and calculation of the "Treasury cut" in the OrchestratorList component, ensuring it is accurately computed, formatted, and surfaced in the UI. The changes focus on improving the correctness of the treasury cut calculation and making this protocol data visible to users.

Screenshot 2026-01-16 at 8 19 11 AM

Treasury cut calculation and formatting improvements:

  • Updated the calculation of treasuryRewardCut to use Number(formatUnits(treasuryRewardCutRate, 27));, ensuring correct handling of BigInt division and scaling.
  • Added a formatted version of the treasury cut (formattedTreasuryCut) using the numbro library for percentage display.
  • Included the formatted treasury cut in the row data returned by the list mapping logic.

UI enhancements for protocol data:

  • Passed the formatted treasury cut value through the table row rendering logic for display.
  • Added a new "Protocol Data" section to the UI, displaying the "Treasury cut" value for each orchestrator in a clearly separated and styled box.

Copilot AI review requested due to automatic review settings January 16, 2026 15:19
@ECWireless ECWireless linked an issue Jan 16, 2026 that may be closed by this pull request
@vercel
Copy link
Contributor

vercel bot commented Jan 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
explorer-arbitrum-one Ready Ready Preview, Comment Jan 16, 2026 3:39pm

Request Review

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request enhances the OrchestratorList component to display and calculate the treasury reward cut, a protocol-level parameter that affects reward calculations. The changes improve the accuracy of the treasury cut calculation by using BigInt literal syntax and add a new "Protocol Data" section to the UI to surface this information to users.

Changes:

  • Updated treasury cut calculation to use 10n ** 18n instead of BigInt(1e18) for better BigInt handling
  • Added formatted treasury cut display using numbro library with percentage formatting
  • Added new "Protocol Data" UI section showing the treasury cut value for each orchestrator
Comments suppressed due to low confidence (1)

components/OrchestratorList/index.tsx:114

  • The default value uses BigInt(0.0) which passes a floating-point number to BigInt. This should be BigInt(0) or 0n to use an integer value, as BigInt requires integer inputs.
  const { data: treasuryRewardCutRate = BigInt(0.0) } = useReadContract({

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-project-automation github-project-automation bot moved this from In Review to Todo in Explorer Revamp Jan 16, 2026
@ECWireless ECWireless merged commit 4f56c2a into main Jan 16, 2026
6 checks passed
@ECWireless ECWireless deleted the 308-display-treasury-cut-in-the-widget branch January 16, 2026 15:48
@github-project-automation github-project-automation bot moved this from Todo to Done in Explorer Revamp Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

Display treasury cut in the widget

3 participants