Fintroller

Introduction

The Fintroller is the administrator of the Hifi protocol. It can set the value of important variables like the liquidation incentive and can toggle on and off the operations that are allowed to be performed on fyTokens.

Gas Costs

Action

Typical Gas Cost

List Bond

<80K

Set Bond Collateralization Ratio

<40K

Set Bond Debt Ceiling

<50K

Set Borrow Allowed

<30K

Set Liquidate Borrow Allowed

<30K

Set Liquidation Incentive

<30K

Set Oracle

<50K

Set Redeem FyTokens Allowed

<30K

Set Repay Borrow Allowed

<30K

Set Supply Underlying Allowed

<30K

Storage Properties

Liquidation Incentive Mantissa

Multiplier representing the discount on collateral that a liquidator receives.

Oracle

The contract that provides price data for the collateral and the underlying asset.

Oracle Price Precision Scalar

The ratio between mantissa precision (1e18) and the oracle price precision (1e6).

Constant Functions

Get Bond

Reads all the storage properties of a bond struct.

  • fyToken: The address of the bond contract.

Solidity

Ethers.js

Get Bond Collateralization Ratio

Reads the collateralization ratio of the given bond.

  • fyToken: The address of the bond contract.

Solidity

Ethers.js

Get Bond Debt Ceiling

Reads the debt ceiling of the given bond.

  • fyToken: The address of the bond contract.

Solidity

Ethers.js

Get Borrow Allowed

Checks if the account should be allowed to borrow fyTokens.

  • fyToken: The bond to make the check against.

Solidity

Ethers.js

Get Deposit Collateral Allowed

Checks if the account should be allowed to deposit collateral.

  • fyToken: The bond to make the check against.

Solidity

Ethers.js

Get Liquidate Borrow Allowed

Checks if the account should be allowed to liquidate fyToken borrows.

  • fyToken: The bond to make the check against.

Solidity

Ethers.js

Get Redeem FyTokens Allowed

Checks if the account should be allowed to redeem the underlying asset from the RedemptionPool.

  • fyToken: The bond to make the check against.

Solidity

Ethers.js

Get Repay Borrow Allowed

Checks if the account should be allowed to repay borrows.

  • fyToken: The bond to make the check against.

Solidity

Ethers.js

Get Supply Underlying Allowed

Checks if the account should be allowed to the supply underlying asset to the RedemptionPool.

  • fyToken: The bond to make the check against.

Solidity

Ethers.js

Non-Constant Functions

List Bond

Marks the bond as listed in this Fintroller's registry. Emits a "ListBond" event.

  • fyToken: The fyToken contract to list.

  • RETURN: true = success, otherwise it reverts.

Set Bond Collateralization Ratio

Updates the bond's collateralization ratio. Emits a "SeBondCollateralizationRatio" event.

  • fyToken: The bond for which to update the collateralization ratio.

  • newCollateralizationRatioMantissa: The new collateralization ratio as a mantissa.

  • RETURN: true = success, otherwise it reverts.

Set Bond Debt Ceiling

Updates the debt ceiling, which limits how much debt can be created in the bond market. Emits a "SetBondDebtCeiling" event.

  • fyToken: The bond for which to update the debt ceiling.

  • newDebtCeiling: The uint256 value of the new debt ceiling, specified in the bond's decimal system.

  • RETURN: true = success, otherwise it reverts.

Set Borrow Allowed

Updates the state of the permission accessed by the fyToken before a borrow. Emits a "SetBorrowAllowed" event.

  • fyToken: The fyToken contract to update the permission for.

  • state: The new state to put in storage.

  • RETURN: true = success, otherwise it reverts.

Set Deposit Collateral Allowed

Updates the state of the permission accessed by the fyToken before a collateral deposit. Emits a "SetDepositCollateralAllowed" event.

  • fyToken: The fyToken contract to update the permission for.

  • state: The new state to put in storage.

  • RETURN: true = success, otherwise it reverts.

Set Liquidate Borrow Allowed

Updates the state of the permission accessed by the fyToken before a liquidate borrow. Emits a "SetLiquidateBorrowAllowed" event.

  • fyToken: The fyToken contract to update the permission for.

  • state: The new state to put in storage.

  • RETURN: true = success, otherwise it reverts.

Set Liquidation Incentive

Sets a new value for the liquidation incentive, which is applicable to all listed bonds. Emits a "SetLiquidationIncentive" event.

  • newLiquidationIncentiveMantissa: The new liquidation incentive as a mantissa.

  • RETURN: true = success, otherwise it reverts.

Set Oracle

Updates the oracle contract's address saved in storage. Emits a "SetOracle" event.

  • newOracle: The new oracle contract.

  • RETURN: true = success, otherwise it reverts.

Set Redeem FyTokens Allowed

Updates the state of the permission accessed by the RedemptionPool before a redemption of underlying. Emits a "SetRedeemFyTokensAllowed" event.

  • fyToken: The fyToken contract to update the permission for.

  • state: The new state to put in storage.

  • RETURN: true = success, otherwise it reverts.

Set Repay Borrow Allowed

Updates the state of the permission accessed by the fyToken before a repay borrow. Emits a "SetRepayBorrowAllowed" event.

  • fyToken: The fyToken contract to update the permission for.

  • state: The new state to put in storage.

  • RETURN: true = success, otherwise it reverts.

Set Supply Underlying Allowed

Updates the state of the permission accessed by the "RedemptionPool" before a supply of underlying. Emits a "SetSupplyUnderlyingAllowed" event.

  • fyToken: The fyToken contract to update the permission for.

  • state: The new state to put in storage.

  • RETURN: true = success, otherwise it reverts.

Last updated

Was this helpful?