Skip to content

Add ufixed18 to BigDecimal conversion for Balancer V2 weights - #4813

Draft
AryanGodara wants to merge 1 commit into
aryan/balancer-v2-migrationsfrom
aryan/balancer-v2-conversions
Draft

Add ufixed18 to BigDecimal conversion for Balancer V2 weights#4813
AryanGodara wants to merge 1 commit into
aryan/balancer-v2-migrationsfrom
aryan/balancer-v2-conversions

Conversation

@AryanGodara

Copy link
Copy Markdown
Member

Description

Small numeric helper for the next PRs. Balancer normalized weights are 1e18 fixed-point (Bfp); the indexer stores them as a plain NUMERIC, so it needs this converter.

Changes

  • Add ufixed18_to_big_decimal to the number crate: 500000000000000000 -> 0.5.

How to test

  • cargo nextest run -p number.

@AryanGodara AryanGodara self-assigned this Aug 28, 2026
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

This pull request has been marked as stale because it has been inactive a while. Please update this pull request or it will be automatically closed.

@github-actions github-actions Bot added the stale label Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant