> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kuru.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Integration Troubleshooting

> Answers for raw units, slots, approvals, balance reconciliation, and transaction failures.

## How do raw price and size units work?

For a market:

```text theme={null}
displayPrice = rawPrice / pricePrecision
displayBaseQuantity = bookQuantity / sizePrecision
rawBaseAtoms = bookQuantity * baseSizeMultiplier
```

`rawPrice` must be divisible by `tickSize`. Packed trades, active orders, and L2 quantities use normalized `bookQuantity`; token transfers and passive-liquidity amounts use raw token atoms. Quote atoms are calculated deterministically from price and normalized size using the configured precisions. Rounding depends on direction: bids use two-stage floors, passive asks use two-stage ceilings, and active asks use incremental cumulative-ceiling accounting across the match. Do not use a universal floor formula to reconstruct fills. See [OrderBook](/contracts/order-book) for the formulas; validate limits and simulate the exact call.

Fee rates are PPS: `fee = amount * feePps / 10_000_000`, with the rounding boundary determined by the fee type.

## Why can free balance be lower than the wallet deposit history?

`getBalance` is free balance. Active orders move assets into aggregate `spotReservedBalance`; passive mints move assets into the orderbook's position ledger. Reconcile all three buckets.

## Why use both slot index and order ID?

A maker slot is reusable. The order ID changes whenever a replacement creates a new resting order. Bind asynchronous cancel and replace requests to the expected ID so a delayed action cannot affect a newer order in the same slot.

## Does a successful transaction imply the requested post-only order rested?

No. A crossing `POST_ONLY` order is skipped instead of reverting the batch. Confirm the resulting slot or consume `BookUpdatesPacked`.

## Why did a swap revert after an estimate succeeded?

Liquidity, balances, fee policy, RAB visibility, and hook behavior can change before execution. Stateful hooks are not simulated by `estimateSwap`. Always set `minAmountOut` and a deadline.

## Which approval is required?

* ERC-20 allowance authorizes the token transfer into AccountCore.
* AccountCore signer authorization controls actions on an account.
* Builder approval caps optional builder fees.
* Post-fill hook access is a separate protocol gate for maker callbacks.
* Relay JWTs are offchain service credentials and do not replace any onchain authorization.

## What confirmation policy should an application use?

Treat the transaction receipt as inclusion, then use the application's chosen chain-finality policy before exposing irreversible status. Order event reducers must be able to rewind blocks and replay by block, transaction index, and log index.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.