Arcadia Finance
Search
K
Comment on page

Risk Module

The Risk Module manages the supported asset related risks, collateral factor, liquidity threshold
No end-user should directly interact with the Risk Module

Functions

calculateCollateralValue

Calculate the weighted collateral value given a combination of asset values and corresponding collateral factors.
function calculateCollateralValue(AssetValueAndRiskVariables[] memory valuesAndRiskVarPerAsset)
public
pure
returns (uint256 collateralValue);
Parameters
Name
Type
Description
valuesAndRiskVarPerAsset
AssetValueAndRiskVariables[]
List of asset values and corresponding collateral factors.
Returns
Name
Type
Description
collateralValue
uint256
The collateral value of the given assets

calculateLiquidationValue

Calculate the weighted liquidation value given a combination of asset values and corresponding collateral factors.
function calculateLiquidationValue(AssetValueAndRiskVariables[] memory valuesAndRiskVarPerAsset)
public
pure
returns (uint256 liquidationValue);
Parameters
Name
Type
Description
valuesAndRiskVarPerAsset
AssetValueAndRiskVariables[]
List of asset values and corresponding collateral factors.
Returns
Name
Type
Description
liquidationValue
uint256
The value of a combination of assets, each discounted with a liquidation factor

Structs

AssetValueAndRiskVariables

struct AssetValueAndRiskVariables {
uint256 valueInBaseCurrency;
uint256 collateralFactor;
uint256 liquidationFactor;
}
Last modified 8mo ago