Skip to content

fix(client): align maxSpend fee estimation with backend rounding - #306

Draft
cesarenaldi wants to merge 1 commit into
mainfrom
codex/dev-522
Draft

fix(client): align maxSpend fee estimation with backend rounding#306
cesarenaldi wants to merge 1 commit into
mainfrom
codex/dev-522

Conversation

@cesarenaldi

Copy link
Copy Markdown
Collaborator

Summary

  • calculate integer-exponent platform fee factors with exact ratios
  • round platform and builder fee reservations at the final five-decimal collateral boundary
  • retain an isolated, non-throwing compatibility fallback for fractional exponents
  • keep fee-adjusted amounts scaled through market-order amount computation

Stacking

This draft is stacked on the fixed-point order-math branch so the fee work can be reviewed and evolved independently. It should be retargeted to main after the base PR merges.

Verification

  • pnpm lint
  • pnpm typecheck
  • pnpm test:client
  • targeted fixed-point and fee tests

Base automatically changed from codex/dev-576 to main August 25, 2026 20:19
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