Signature
IB20Asset.sol
Description
ConvertsrawAmount to its UI representation at the effective multiplier. The formula is rawAmount * uiMultiplier() / WAD_PRECISION, where WAD_PRECISION is 1e18. 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 the multiplier differs from WAD_PRECISION.
The effective multiplier is time-dependent. If a pending update has been scheduled via updateUIMultiplier and block.timestamp >= effectiveAt, the new multiplier is used even though no event fires at that moment. Call uiMultiplier() to inspect the value this function applies.
toScaledBalance is a deprecated alias of this function. Prefer toUIAmount.
- This function is Asset-only. Stablecoin has no multiplier.
- A multiplier of
1e18means UI equals raw. - A 2-for-1 split sets the multiplier to
2e18; a 1-for-2 reverse split sets it to5e17. - The multiplier is an absolute value, not a ratio applied to the current one.