CollateralManager
Inherits: ICollateralManager, Ownable
Author: Sperax Foundation
This contract manages the addition and removal of collateral, configuration of collateral strategies, and allocation percentages.
Collateral Manager interacts with the Vault and various strategies for collateral management.
State Variables
collateralCompositionUsed
VAULT
collaterals
collateralInfo
collateralStrategyInfo
collateralStrategies
Functions
constructor
Constructor to initialize the Collateral Manager
Parameters
addCollateral
Register a collateral for mint & redeem in USDs
Parameters
updateCollateralData
Update existing collateral configuration
Parameters
removeCollateral
Un-list a collateral
Parameters
addCollateralStrategy
Add a new strategy to collateral
Parameters
updateCollateralStrategy
Update existing strategy for collateral
Parameters
removeCollateralStrategy
Remove an existing strategy from collateral
Ensure all the collateral is removed from the strategy before calling this Otherwise it will create error in collateral accounting
Parameters
updateCollateralDefaultStrategy
validateAllocation
Validate allocation for a collateral
Parameters
Returns
getFeeCalibrationData
Get the required data for mint
Parameters
Returns
getMintParams
Get the required data for mint
Parameters
Returns
getRedeemParams
Get the required data for USDs redemption
Parameters
Returns
getAllCollaterals
Gets a list of all listed collaterals
Returns
getCollateralStrategies
Gets a list of all strategies linked to a collateral
Parameters
Returns
isValidStrategy
Verifies if a strategy is linked to a collateral
Parameters
Returns
getCollateralInStrategies
Get the amount of collateral in all Strategies
Parameters
Returns
getCollateralInVault
Get the amount of collateral in vault
Parameters
Returns
getCollateralInAStrategy
Get the amount of collateral allocated in a strategy
Parameters
Returns
Events
CollateralAdded
CollateralRemoved
CollateralInfoUpdated
CollateralStrategyAdded
CollateralStrategyUpdated
CollateralStrategyRemoved
Errors
CollateralExists
CollateralDoesNotExist
CollateralStrategyExists
CollateralStrategyMapped
CollateralStrategyNotMapped
CollateralNotSupportedByStrategy
CollateralAllocationPaused
CollateralStrategyInUse
AllocationPercentageLowerThanAllocatedAmt
IsDefaultStrategy
Structs
CollateralData
StrategyData
Last updated