IOperatorDefender

Git Source

Functions

beforeRebalancing

Checks if the account should be allowed to rebalance tokens

function beforeRebalancing(address mToken) external;

Parameters

NameTypeDescription
mTokenaddressThe market to verify the transfer against

beforeMTokenTransfer

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

function beforeMTokenTransfer(address mToken, address src, address dst, uint256 transferTokens) external;

Parameters

NameTypeDescription
mTokenaddressThe market to verify the transfer against
srcaddressThe account which sources the tokens
dstaddressThe account which receives the tokens
transferTokensuint256The number of mTokens to transfer

beforeMTokenMint

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

function beforeMTokenMint(address mToken, address minter) external;

Parameters

NameTypeDescription
mTokenaddressThe market to verify the mint against
minteraddressThe account which would get the minted tokens

afterMTokenMint

Validates mint and reverts on rejection. May emit logs.

function afterMTokenMint(address mToken) external view;

Parameters

NameTypeDescription
mTokenaddressAsset being minted

beforeMTokenRedeem

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

function beforeMTokenRedeem(address mToken, address redeemer, uint256 redeemTokens) external;

Parameters

NameTypeDescription
mTokenaddressThe market to verify the redeem against
redeemeraddressThe account which would redeem the tokens
redeemTokensuint256The number of mTokens to exchange for the underlying asset in the market

beforeMTokenBorrow

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

function beforeMTokenBorrow(address mToken, address borrower, uint256 borrowAmount) external;

Parameters

NameTypeDescription
mTokenaddressThe market to verify the borrow against
borroweraddressThe account which would borrow the asset
borrowAmountuint256The amount of underlying the account would borrow

beforeMTokenRepay

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

function beforeMTokenRepay(address mToken, address borrower) external;

Parameters

NameTypeDescription
mTokenaddressThe market to verify the repay against
borroweraddressThe account which would borrowed the asset

beforeMTokenLiquidate

Checks if the liquidation should be allowed to occur

function beforeMTokenLiquidate(address mTokenBorrowed, address mTokenCollateral, address borrower, uint256 repayAmount)
    external
    view;

Parameters

NameTypeDescription
mTokenBorrowedaddressAsset which was borrowed by the borrower
mTokenCollateraladdressAsset which was used as collateral and will be seized
borroweraddressThe address of the borrower
repayAmountuint256The amount of underlying being repaid

beforeMTokenSeize

Checks if the seizing of assets should be allowed to occur

function beforeMTokenSeize(address mTokenCollateral, address mTokenBorrowed, address liquidator, address borrower)
    external;

Parameters

NameTypeDescription
mTokenCollateraladdressAsset which was used as collateral and will be seized
mTokenBorrowedaddressAsset which was borrowed by the borrower
liquidatoraddressThe address repaying the borrow and seizing the collateral
borroweraddressThe address of the borrower

checkOutflowVolumeLimit

Checks if new used amount is within the limits of the outflow volume limit

Sender must be a listed market

function checkOutflowVolumeLimit(uint256 amount) external;

Parameters

NameTypeDescription
amountuint256New amount

beforeWithdrawOnExtension

Checks whitelist status on withdrawOnExtension

function beforeWithdrawOnExtension(address user) external view;

Parameters

NameTypeDescription
useraddressThe user to check

beforeBorrowOnExtension

Checks whitelist status on borrowOnExtension

function beforeBorrowOnExtension(address user) external view;

Parameters

NameTypeDescription
useraddressThe user to check