RiskFund

RiskFundV2

Contract with basic features to track/hold different assets for different Comptrollers.

Solidity API

sweepToken

Function to sweep baseAsset for pool; Tokens are sent to address(to)

function sweepToken(address tokenAddress, address to, uint256 amount) external

Parameters

📅 Events

  • Emits SweepToken event on success

⛔️ Access Requirements

  • Only Governance

❌ Errors

  • ZeroAddressNotAllowed is thrown when tokenAddress/to address is zero

  • ZeroValueNotAllowed is thrown when amount is zero


sweepTokenFromPool

Function to sweep token from pool

function sweepTokenFromPool(address tokenAddress, address comptroller, uint256 amount) external

Parameters

📅 Events

  • Emits sweepTokenFromPool event on success

⛔️ Access Requirements

  • Only Governance

❌ Errors

  • ZeroAddressNotAllowed is thrown when tokenAddress/comptroller address is zero

  • ZeroValueNotAllowed is thrown when amount is zero


getPoolsBaseAssetReserves

Get the Amount of the Base asset in the risk fund for the specific pool.

function getPoolsBaseAssetReserves(address comptroller) external view returns (uint256)

Parameters

Return Values


Last updated