> For the complete documentation index, see [llms.txt](https://docs.brila.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.brila.finance/brila-dat/how-to/read-your-rebasing-balance.md).

# Read your rebasing balance

Goal: know your true position when the displayed balance moves every rebase. This assumes you already hold DAT.

## See your two balances

```bash
# display balance (fragments, 18 dec) — changes every rebase
cast call $DAT "balanceOf(address)(uint256)" $YOU --rpc-url https://rpc.hyperliquid.xyz/evm

# internal balance (1e24 precision) — unchanged by scaling-factor rebases
cast call $DAT "balanceOfInternal(address)(uint256)" $YOU --rpc-url https://rpc.hyperliquid.xyz/evm

# total internal supply
cast call $DAT "initSupply()(uint256)" --rpc-url https://rpc.hyperliquid.xyz/evm
```

* **`balanceOf`** is what wallets and the app show. It is `underlying × brilaDatScalingFactor / 1e24`.
* **`balanceOfInternal`** isolates transfers and rewards from scaling-factor changes.
* Your ownership fraction is approximately `balanceOfInternal(you) / initSupply`. A treasury mint increases `initSupply` and can dilute that fraction even though your internal balance is unchanged.

## Check whether your share actually grew

To verify that a transfer or farm claim increased your position, compare `balanceOfInternal` before and after it. A scaling-factor-only rebase leaves this value unchanged.

## Estimate USD value

In USD mode the protocol targets **$1.00 per DAT**, so a quick estimate is:

```
USD value ≈ balanceOf(you) / 1e18   ×   $1.00
```

For the rebaser's current TWAP-based signal, call `getCurrentExchangeRate()` and divide by `1e18` for USD per DAT:

```bash
cast call $REBASER "getCurrentExchangeRate()(uint256)" --rpc-url https://rpc.hyperliquid.xyz/evm
```

This is not a spot-market quote. The view uses the primary reserve/USD feed and can return zero when no time has elapsed since the last TWAP sample. The actual USD-mode rebase path additionally checks the mandatory secondary reserve/USD feed.

## See rebase history

Each rebase increments `epoch` and emits `RebaseExecuted(epoch, exchangeRate, targetRate, supplyDelta, timestampSec)` (USD mode also emits `UsdPegPriceComputed`). Query those events, or read the current `epoch` and `brilaDatScalingFactor`:

```bash
cast call $REBASER "epoch()(uint256)" --rpc-url https://rpc.hyperliquid.xyz/evm
cast call $DAT     "brilaDatScalingFactor()(uint256)" --rpc-url https://rpc.hyperliquid.xyz/evm
```
