Comment on page
ProtocolShareReserve
Contract used to store and distribute the reserves generated in the markets, applying the tokenomics rules.
Initializes the deployer to owner.
function initialize(address protocolIncome_, address riskFund_) external
Parameters
Name | Type | Description |
---|---|---|
protocolIncome_ | address | The address protocol income will be sent to |
riskFund_ | address | Risk fund address |
❌ Errors
- ZeroAddressNotAllowed is thrown when protocol income address is zero
- ZeroAddressNotAllowed is thrown when risk fund address is zero
Pool registry setter.
function setPoolRegistry(address poolRegistry_) external
Parameters
Name | Type | Description |
---|---|---|
poolRegistry_ | address | Address of the pool registry |
❌ Errors
- ZeroAddressNotAllowed is thrown when pool registry address is zero
Release funds
function releaseFunds(address comptroller, address asset, uint256 amount) external returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
comptroller | address | Pool's Comptroller |
asset | address | Asset to be released |
amount | uint256 | Amount to release |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | Number of total released tokens |
❌ Errors
- ZeroAddressNotAllowed is thrown when asset address is zero
Update the reserve of the asset for the specific pool after transferring to the protocol share reserve.
function updateAssetsState(address comptroller, address asset) public
Parameters
Name | Type | Description |
---|---|---|
comptroller | address | Comptroller address(pool) |
asset | address | Asset address. |
Last modified 2mo ago