Skip to content

Bridge verified BNB dividends into Earn accounting - #274

Merged
Pigbibi merged 1 commit into
mainfrom
fix/binance-dividend-bridge-20260913
Sep 13, 2026
Merged

Pigbibi merged 1 commit into
mainfrom
fix/binance-dividend-bridge-20260913

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

Problem

Binance Earn forward conservation rejected a verified positive BNB balance delta because the existing accounting only accepted realtime rewards, known fills, and USDT deposits. The wallet diagnosis could show the dividend row, but no production consumer could safely consume it.

Change

  • Add a bounded, read-only asset/assetDividend adapter for BNB rows in (start, end].
  • Require exact BNB asset, positive Decimal amount, integer direction == 1, valid id/tranId/time, no duplicate identity, and a complete non-full page.
  • Bridge the verified quantity through the existing Earn conservation path in portfolio preparation, prospective recovery's two samples, and funding cash review. The funding review leaves the checkpoint unchanged; formal preparation consumes the quantity once through the existing owner writer.
  • Keep the dividend out of daily_external_principal_usdt and extra PnL. Preserve the diagnostic distinction between an empty missing-total dust response and non-empty/incomplete dust data.

Validation

  • PYTHONPATH=. uv run --no-sync pytest -q — 884 passed, 91 subtests passed.
  • uv run --no-sync ruff check ... — passed.
  • git diff --check — passed.

No live account read, order, Earn subscription/redemption, runtime enablement, or production state mutation was performed.

Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi
Pigbibi force-pushed the fix/binance-dividend-bridge-20260913 branch from 9dad1d0 to 95992da Compare September 13, 2026 12:11
@Pigbibi
Pigbibi merged commit 08ef19c into main Sep 13, 2026
1 check passed
@Pigbibi
Pigbibi deleted the fix/binance-dividend-bridge-20260913 branch September 13, 2026 12:16
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