Skip to main content

Decimals & Conversion Helpers

Working with raw BigInt values is error-prone.

The following helpers cache vault decimals internally (faster) to handle conversions consistently:

ConversionHelper Method
Shares → human-readablevault.applyDecimals(bigint)
Human → shares BigIntvault.toBigInt("1.0")
Underlying → human-readablevault.toUnderlayingDecimals(bigint)
Human → underlying BigIntvault.toUnderlyingBigInt("1.0")