Skip to content

fix/Show an LP executor's earned fees in its detail view instead of the transaction fee - #263

Open
lgrawet wants to merge 3 commits into
hummingbot:mainfrom
lgrawet:fix/lp-cumulative-fees-display
Open

lgrawet wants to merge 3 commits into
hummingbot:mainfrom
lgrawet:fix/lp-cumulative-fees-display

Conversation

@lgrawet

@lgrawet lgrawet commented Oct 1, 2026

Copy link
Copy Markdown

Show an LP executor's earned fees in its detail view instead of the transaction fee fee: the connector fills cum_fees_quote with what the open and close cost on-chain and puts the fee income in custom_info.fees_earned_quote, so the one number that says whether a band is worth keeping read three orders of magnitude low — a live DJT-USDC band showed $0.000023 against $0.074624 actually earned; the formatter now prefers fees_earned_quote when the executor carries it and falls back to cum_fees_quote for executors that have no custom_info twin

…ransaction fee: the connector fills cum_fees_quote with what the open and close cost on-chain and puts the fee income in custom_info.fees_earned_quote, so the one number that says whether a band is worth keeping read three orders of magnitude low — a live DJT-USDC band showed $0.000023 against $0.074624 actually earned; the formatter now prefers fees_earned_quote when the executor carries it and falls back to cum_fees_quote for executors that have no custom_info twin
@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

[Medium risk] Changes which fee metric displays for liquidity pool executors.

The PR is not safe to merge until the detail view recognizes LP executors whose type is in config.

Findings

  1. P1 Nested LP type is missed ▶

Summary

The PR changes executor detail output to show LP fee income separately from fees paid by other executors and adds formatter tests. The new type check does not cover LP payloads whose type is nested in config.

Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Raw executor detail] --> B{Top-level type is lp_executor?}
  B -- Yes --> C[Show custom_info fees_earned_quote]
  B -- No --> D[Show cum_fees_quote as Fees Paid]
  E[LP with config.type only] --> B
Loading

Reviews (3) · Last reviewed commit: "Merge remote-tracking branch 'upstream/m..."

Comment thread mcp_servers/hummingbot_api/formatters/executors.py Outdated
Comment thread mcp_servers/hummingbot_api/formatters/executors.py Outdated
…e direction

An LP executor without custom_info.fees_earned_quote fell back to
cum_fees_quote, which for an LP is the on-chain transaction cost — so the
detail view could still show a cost as fee income, the confusion this branch
exists to fix. LP now reads fees_earned_quote only; when the field is absent
the income is unknown and no fee line is printed. Non-LP executors keep their
cum_fees_quote, labelled "Fees Paid" so a client cannot read a paid fee as
income against the LP's "Fees Earned".
@lgrawet lgrawet changed the title Bug/Show an LP executor's earned fees in its detail view instead of the transaction fee fix/Show an LP executor's earned fees in its detail view instead of the transaction fee Oct 1, 2026
Comment on lines +214 to +215
executor_type = get_field(executor, "type", "executor_type", default="unknown")
if executor_type == "lp_executor":

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Nested LP type is missed

If an LP executor stores its type in config.type, this check reads only top-level fields and treats it as a non-LP executor. The detail view then hides its earned fees and shows its on-chain transaction cost as “Fees Paid.” Resolve the type from the config too, and test that payload shape.

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