Skip to main content
toScaledBalance is a deprecated alias of toUIAmount. Prefer toUIAmount(raw) for new integrations.

Signature

IB20Asset.sol

Description

Converts a raw balance to its UI (scaled) view: rawBalance * uiMultiplier() / WAD_PRECISION. This is a deprecated alias of toUIAmount. The two functions are equivalent. Use toUIAmount in new code. The result is the amount that wallets and indexers display as a share count after a stock split. Raw ERC-20 balances, transfer amounts, totalSupply, and allowances are unaffected by the multiplier and remain raw. Integer division rounds down. Rounding loss is confined to the scaled view and is at most one unit of the scaled amount; a round trip back through fromUIAmount may return slightly less than the original raw amount when uiMultiplier() != WAD_PRECISION. Multipliers are Asset-only. Stablecoin has no multiplier.

Parameters

Returns

Access Control

Read-only. No role required.

Policy Interaction

No direct policy interaction.

Example

Usage Example