Skip to main content

Units and Errors

Numeric encodings​

FieldEncoding
Quote reserve, scale, amount, fee, allocation, pricePacked decimal Float, carried as ABI int256.
Settlement pay amountInteger token base units.
Settlement minimum receiveInteger token base units.
Settlement receive allocationSix decimals; 1_000_000 means 100%.
Client allocation WAD, when usedIntermediate 18-decimal fixed point, converted before use.

Float uses the protocol’s packed numeric encoding. Use the reference conversion helpers, the token’s actual decimals, and integer arithmetic for token-unit balances.

QuoteItem token buckets describe ledger movements. Their direction comes from pay, receive, or fee context; signed value flow is a different field.

Failure conditions​

Error or failureCheck
InvalidTradeEmpty sides, invalid amounts, or unsupported shape.
DuplicateTokenRepeated token within a side or across both sides.
InvalidAllocationsNonpositive allocations or an incorrect sum.
InvalidTokenWrong token role or LP target for the selected pool.
ZeroReserve / ZeroScaleIncomplete or invalid active state.
InvalidElasticityParameter outside 0 <= e_s < 1.
InvalidLiquidityActionNonproportional inputs or inadmissible LP action.
NoSolution / DidNotConvergeNumerical quote calculation failed.
Minimum receive failureCurrent output falls below the selected minimum.
Native value failureAttached value differs from the expected native pay amount.
IntentExpired / InvalidIntentNonceDeadline passed or submitted nonce differs from the current nonce.

Use revert data from the ABI installed on the Dispatcher. Surface invalid or unavailable quote values as errors.

Before submission​

Match the chain, Dispatcher, pool, token roles, decimals, ABI version, array ordering, allowances, native value, and receive minimums. Use current pool state and simulate the assembled call when available.