Skip to main content

Decimals & Conversion Helpers

Working with raw BigInt values is error-prone.

The following helpers cache vault decimals internally and handle conversions consistently:

ConversionHelper
Shares to human-readablevault.applyDecimals(bigint)
Human to shares BigIntvault.toBigInt("1.0")
Underlying to human-readablevault.toUnderlyingDecimals(bigint)
Human to underlying BigIntvault.toUnderlyingBigInt("1.0")