> ## Documentation Index
> Fetch the complete documentation index at: https://base-a060aa97-docs-sync-code-change-be6d045.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# IB20Asset.toRawBalance

> Deprecated alias for fromUIAmount. Converts a scaled (UI) balance back to its raw representation.

<Warning>
  `toRawBalance` is a deprecated alias retained in `IB20Asset` for backward compatibility. Prefer `fromUIAmount(uiAmount)` for new integrations.
</Warning>

## Signature

```solidity IB20Asset.sol theme={null}
function toRawBalance(uint256 scaledBalance) external view returns (uint256 rawBalance);
```

| Field               | Value                   |
| ------------------- | ----------------------- |
| Selector            | `0x0ca06c44`            |
| Canonical signature | `toRawBalance(uint256)` |

## Description

Converts a scaled (UI) balance back to its raw representation using the current multiplier:
`scaledBalance * WAD_PRECISION / multiplier`.

Integer division rounds toward zero. Conversions are not exactly reversible when `multiplier != WAD_PRECISION`: `toRawBalance(toScaledBalance(x))` may return a value slightly less than `x`.

The canonical replacement is `fromUIAmount(uiAmount)`, which applies the same division. Both round down, so the round-trip from raw → UI → raw can lose up to one ULP of the scaled amount only.

## Parameters

| Name            | Type      | Description                                      |
| --------------- | --------- | ------------------------------------------------ |
| `scaledBalance` | `uint256` | Scaled (UI) token amount to convert back to raw. |

## Returns

| Name         | Type      | Description                                          |
| ------------ | --------- | ---------------------------------------------------- |
| `rawBalance` | `uint256` | Raw balance at the current multiplier, rounded down. |

## Access Control

Read-only. No role required.

## Policy Interaction

No direct policy interaction.

## Example

```solidity Usage Example theme={null}
// Deprecated — prefer fromUIAmount
uint256 raw = IB20Asset(token).toRawBalance(scaledAmount);

// Preferred equivalent
uint256 raw = IB20Asset(token).fromUIAmount(scaledAmount);
```
