CelsiusX
Search…
Overview
The collateral manager is a smart contract that interfaces between the Chainlink oracle and Enzyme vault. It reports the collateralization of assets on the native chain for the CelsiusX isomorphic proof of reserve.
The total token quantity in the reserve vaults is calculated with the following function within Collateral Manager, which takes in a reserve ID to the set of vaults that will be used in calculating the value and returns the sum.
1
function getReserveValue(bytes32 reserveId) public returns (uint256 value)
Copied!
reserveID: ID to the set of vaults that will be used in calculating the total reserve value
RETURN: the accumulated value in all vaults within the queried reserve
In addition, the Collateral Manager includes functions that enable
The creation of a new reserve:
1
function createReserve(string memory name, string memory description)
Copied!
name: the shortened string name identifying the reserve
description: text providing basic information on the reserve
The addition of vaults to an existing reserve:
1
function addReserveVault(bytes32 reserveId, Vault memory vault)
Copied!
reserveID: ID to the set of vaults that will be used in calculating the total reserve value
vault: data contained to calculate value of collateral
Copy link