WildcatMarketController.sol

A WildcatMarketController contract deploys markets and manages their configurable parameters (APR, reserve ratio) and maintains set of approved lenders.

archController

 IWildcatArchController public immutable archController;

controllerFactory

 IWildcatMarketControllerFactory public immutable controllerFactory;

borrower

 address public immutable borrower;

sentinel

 address public immutable sentinel;

marketInitCodeStorage

 address public immutable marketInitCodeStorage;

marketInitCodeHash

 uint256 public immutable marketInitCodeHash;

temporaryExcessReserveRatio

 mapping(address => TemporaryReserveRatio) public temporaryExcessReserveRatio;

getAuthorizedLenders

 function getAuthorizedLenders()
   external view returns (address[] memory);
   
 function getAuthorizedLenders(
    uint256 start,
    uint256 end
  ) external view returns (address[] memory arr);

getAuthorizedLendersCount

 function getAuthorizedLendersCount()
   external view returns (uint256);

isAuthorizedLender

 function isAuthorizedLender(address lender)
   external view virtual returns (bool);

authorizeLenders

 function authorizeLenders(address[] memory lenders)
   external onlyBorrower;

deauthorizeLenders

 function deauthorizeLenders(address[] memory lenders)
   external onlyBorrower;

updateLenderAuthorization

   function updateLenderAuthorization(address lender, address[] memory markets)
     external;

isControlledMarket

 function isControlledMarket(address market)
   external view returns (bool);

getControlledMarkets

 function getControlledMarkets()
   external view returns (address[] memory);
   
 function getControlledMarkets(
    uint256 start,
    uint256 end
  ) external view returns (address[] memory arr);

getControlledMarketsCount

 function getControlledMarketsCount()
   external view returns (uint256);

computeMarketAddress

 function computeMarketAddress(
    address asset,
    string memory namePrefix,
    string memory symbolPrefix
  ) external view returns (address);

getMarketParameters

 function getMarketParameters()
   external view returns (MarketParameters memory parameters);

deployMarket

 function deployMarket(
    address asset,
    string memory namePrefix,
    string memory symbolPrefix,
    uint128 maxTotalSupply,
    uint16 annualInterestBips,
    uint16 delinquencyFeeBips,
    uint32 withdrawalBatchDuration,
    uint16 reserveRatioBips,
    uint32 delinquencyGracePeriod
  ) external returns (address market);

getParameterConstraints

 function getParameterConstraints()
   external view returns (MarketParameterConstraints memory constraints);

setAnnualInterestBips

 function setAnnualInterestBips(
    address market,
    uint16 annualInterestBips
  ) external virtual onlyBorrower onlyControlledMarket(market);

resetReserveRatio

 function resetReserveRatio(address market)
   external virtual;

Last updated