Bondtroller

Bonded

Remastered from Compound's Bondtroller Contract

Methods

_borrowGuardianPaused

function _borrowGuardianPaused() external view returns (bool)

Returns

_mintGuardianPaused

function _mintGuardianPaused() external view returns (bool)

Returns

accountAssets

function accountAssets(address, uint256) external view returns (contract BToken)

Per-account mapping of "assets you are in", capped by maxAssets

Parameters

Returns

accountMembership

function accountMembership(address, address) external view returns (bool)

Per-market mapping of "accounts in this asset"

Parameters

Returns

admin

function admin() external view returns (address)

Administrator for this contract

Returns

allMarkets

function allMarkets(uint256) external view returns (contract BToken)

A list of all markets

Parameters

Returns

borrowAllowed

function borrowAllowed(address bToken, address borrower, uint256 borrowAmount) external nonpayable returns (uint256)

Checks if the account should be allowed to borrow the underlying asset of the given market

Parameters

Returns

borrowCapGuardian

function borrowCapGuardian() external view returns (address)

Returns

borrowCaps

function borrowCaps(address) external view returns (uint256)

Parameters

Returns

borrowGuardianPaused

function borrowGuardianPaused(address) external view returns (bool)

Parameters

Returns

borrowVerify

function borrowVerify(address bToken, address borrower, uint256 borrowAmount) external nonpayable

Validates borrow and reverts on rejection. May emit logs.

Parameters

checkMembership

function checkMembership(address account, contract BToken bToken) external view returns (bool)

Returns whether the given account is entered in the given asset

Parameters

Returns

closeFactorMantissa

function closeFactorMantissa() external view returns (uint256)

Multiplier used to calculate the maximum repayAmount when liquidating a borrow

Returns

compAccrued

function compAccrued(address) external view returns (uint256)

The COMP accrued but not yet transferred to each user

Parameters

Returns

compBorrowState

function compBorrowState(address) external view returns (uint224 index, uint32 block)

The COMP market borrow state for each market

Parameters

Returns

compBorrowerIndex

function compBorrowerIndex(address, address) external view returns (uint256)

The COMP borrow index for each market for each borrower as of the last time they accrued COMP

Parameters

Returns

compContributorSpeeds

function compContributorSpeeds(address) external view returns (uint256)

The portion of COMP that each contributor receives per block

Parameters

Returns

compRate

function compRate() external view returns (uint256)

The rate at which the flywheel distributes COMP, per block

Returns

compSpeeds

function compSpeeds(address) external view returns (uint256)

The portion of compRate that each market currently receives

Parameters

Returns

compSupplierIndex

function compSupplierIndex(address, address) external view returns (uint256)

The COMP borrow index for each market for each supplier as of the last time they accrued COMP

Parameters

Returns

compSupplyState

function compSupplyState(address) external view returns (uint224 index, uint32 block)

The COMP market supply state for each market

Parameters

Returns

enterMarket

function enterMarket(address bToken, address borrower) external nonpayable returns (enum BondtrollerErrorReporter.Error)

Add asset to be included in account liquidity calculation

Parameters

Returns

enterMarkets

function enterMarkets(address[] bTokens) external nonpayable returns (uint256[])

Add assets to be included in account liquidity calculation

Parameters

Returns

exitMarket

function exitMarket(address cTokenAddress) external nonpayable returns (uint256)

Removes asset from sender's account liquidity calculation

Sender must not have an outstanding borrow balance in the asset, or be providing necessary collateral for an outstanding borrow.

Parameters

Returns

getAllMarkets

function getAllMarkets() external view returns (contract BToken[])

Return all of the markets

The automatic getter may be used to access an individual market.

Returns

getAssetsIn

function getAssetsIn(address account) external view returns (contract BToken[])

Returns the assets an account has entered

Parameters

Returns

getBlockNumber

function getBlockNumber() external view returns (uint256)

Returns

getPrimaryIndexTokenAddress

function getPrimaryIndexTokenAddress() external view returns (address)

Returns

init

function init() external nonpayable

isBondtroller

function isBondtroller() external view returns (bool)

watermark that says that this is Bondtroller

Returns

isDeprecated

function isDeprecated(contract BToken bToken) external view returns (bool)

Returns true if the given bToken market has been deprecated

All borrows in a deprecated bToken market can be immediately liquidated

Parameters

Returns

lastContributorBlock

function lastContributorBlock(address) external view returns (uint256)

Last block at which a contributor's COMP rewards have been allocated

Parameters

Returns

liquidationIncentiveMantissa

function liquidationIncentiveMantissa() external view returns (uint256)

Multiplier representing the discount on collateral that a liquidator receives

Returns

markets

function markets(address) external view returns (bool isListed, uint256 collateralFactorMantissa, bool isComped)

Official mapping of BTokens -> Market metadata

Parameters

Returns

maxAssets

function maxAssets() external view returns (uint256)

Max number of assets a single account can participate in (borrow or use as collateral)

Returns

mintAllowed

function mintAllowed(address bToken, address minter, uint256 mintAmount) external view returns (uint256)

Checks if the account should be allowed to mint tokens in the given market

Parameters

Returns

mintGuardianPaused

function mintGuardianPaused(address) external view returns (bool)

Parameters

Returns

mintVerify

function mintVerify(address bToken, address minter, uint256 actualMintAmount, uint256 mintTokens) external nonpayable

Validates mint and reverts on rejection. May emit logs.

Parameters

oracle

function oracle() external view returns (address)

Oracle which gives the price of any given asset

Returns

pauseGuardian

function pauseGuardian() external view returns (address)

The Pause Guardian can pause certain actions as a safety mechanism. Actions which allow users to remove their own assets cannot be paused. Liquidation / seizing / transfer can only be paused globally, not by market.

Returns

primaryIndexToken

function primaryIndexToken() external view returns (address)

the address of primary index token

Returns

redeemAllowed

function redeemAllowed(address bToken, address redeemer, uint256 redeemTokens) external view returns (uint256)

Checks if the account should be allowed to redeem tokens in the given market

Parameters

Returns

redeemVerify

function redeemVerify(address bToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens) external pure

Validates redeem and reverts on rejection. May emit logs.

Parameters

repayBorrowAllowed

function repayBorrowAllowed(address bToken, address payer, address borrower, uint256 repayAmount) external view returns (uint256)

Checks if the account should be allowed to repay a borrow in the given market

Parameters

Returns

repayBorrowVerify

function repayBorrowVerify(address bToken, address payer, address borrower, uint256 actualRepayAmount, uint256 borrowerIndex) external nonpayable

Validates repayBorrow and reverts on rejection. May emit logs.

Parameters

seizeGuardianPaused

function seizeGuardianPaused() external view returns (bool)

Returns

setBorrowCapGuardian

function setBorrowCapGuardian(address newBorrowCapGuardian) external nonpayable

Admin function to change the Borrow Cap Guardian

Parameters

setBorrowPaused

function setBorrowPaused(contract BToken bToken, bool state) external nonpayable returns (bool)

Parameters

Returns

setMarketBorrowCaps

function setMarketBorrowCaps(contract BToken[] bTokens, uint256[] newBorrowCaps) external nonpayable

Set the given borrow caps for the given bToken markets. Borrowing that brings total borrows to or above borrow cap will revert.

Admin or borrowCapGuardian function to set the borrow caps. A borrow cap of 0 corresponds to unlimited borrowing.

Parameters

setMintPaused

function setMintPaused(contract BToken bToken, bool state) external nonpayable returns (bool)

Parameters

Returns

setPauseGuardian

function setPauseGuardian(address newPauseGuardian) external nonpayable returns (uint256)

Admin function to change the Pause Guardian

Parameters

Returns

setPriceOracle

function setPriceOracle(address newOracle) external nonpayable returns (uint256)

Sets a new price oracle for the bondtroller

Admin function to set a new price oracle

Parameters

Returns

setPrimaryIndexTokenAddress

function setPrimaryIndexTokenAddress(address _newPrimaryIndexToken) external nonpayable returns (uint256)

Parameters

Returns

setSeizePaused

function setSeizePaused(bool state) external nonpayable returns (bool)

Parameters

Returns

setTransferPaused

function setTransferPaused(bool state) external nonpayable returns (bool)

Parameters

Returns

supportMarket

function supportMarket(contract BToken bToken) external nonpayable returns (uint256)

Add the market to the markets mapping and set it as listed

Admin function to set isListed and add support for the market

Parameters

Returns

transferAllowed

function transferAllowed(address bToken, address src, address dst, uint256 transferTokens) external nonpayable returns (uint256)

Checks if the account should be allowed to transfer tokens in the given market

Parameters

Returns

transferGuardianPaused

function transferGuardianPaused() external view returns (bool)

Returns

transferVerify

function transferVerify(address bToken, address src, address dst, uint256 transferTokens) external nonpayable

Validates transfer and reverts on rejection. May emit logs.

Parameters

Events

ActionPaused

event ActionPaused(contract BToken bToken, string action, bool pauseState)

Emitted when an action is paused globally

Parameters

CompGranted

event CompGranted(address recipient, uint256 amount)

Emitted when COMP is granted by admin

Parameters

Failure

event Failure(uint256 error, uint256 info, uint256 detail)

Parameters

MarketEntered

event MarketEntered(contract BToken bToken, address account)

Emitted when an account enters a market

Parameters

MarketExited

event MarketExited(contract BToken bToken, address account)

Emitted when an account exits a market

Parameters

MarketListed

event MarketListed(contract BToken bToken)

Emitted when an admin supports a market

Parameters

NewBorrowCap

event NewBorrowCap(contract BToken indexed bToken, uint256 newBorrowCap)

Emitted when borrow cap for a bToken is changed

Parameters

NewBorrowCapGuardian

event NewBorrowCapGuardian(address oldBorrowCapGuardian, address newBorrowCapGuardian)

Emitted when borrow cap guardian is changed

Parameters

NewPauseGuardian

event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian)

Emitted when pause guardian is changed

Parameters

NewPriceOracle

event NewPriceOracle(address oldPriceOracle, address newPriceOracle)

Emitted when price oracle is changed

Parameters

NewPrimaryIndexToken

event NewPrimaryIndexToken(address oldPrimaryIndexToken, address newPrimaryIndexToken)

Parameters

Last updated