Skip to content

API ReferenceVaults, collateral, and riskFunction

getRequiredCollateralForStaticLOC()

function getRequiredCollateralForStaticLOC(ctx, params): Promise<bigint>;

Calculates the minimum collateral required for a static LOC with the provided GetRequiredCollateralForStaticLOCParams. Note: this will largely depend on the withdrawal fee within the CollateralVault contract.

Parameters

ParameterTypeDescription
ctxSDKContextThe SDK context.
paramsGetRequiredCollateralForStaticLOCParamsThe parameters for collateral calculation.

Returns

Promise<bigint>

The required collateral.