MoneyMarketAdapter

Work with AssetManager to support external money markets, like Compound or AAVE.

Functions:

getRate(address tokenAddress) → uint256

Returns the interest rate per block for the given token.

deposit(address tokenAddress)

Deposits the given amount of tokens in the underlying money market.

withdraw(address tokenAddress, address recipient, uint256 amount)

Withdraws the given amount of tokens from the underlying money market and transfers them to recipient.

withdrawAll(address tokenAddress, address recipient)

Withdraws all the tokens from the underlying money market and transfers them to recipient.

claimTokens(address tokenAddress, address recipient)

No description

getSupply(address tokenAddress) → uint256

Returns the supply for the given token, including accrued interest. This function can have side effects.

getSupplyView(address tokenAddress) → uint256

Returns the supply for the given token; it might not include accrued interest. This function cannot have side effects.

supportsToken(address tokenAddress) → bool

Indicates if the adapter supports the token with the given address.

floorMap(address tokenAddress) → uint256

The minimum amount that should be deposited in money market before moving to next priority market

Parameters:

  • tokenAddress: The address of token whose floor is being fetched

ceilingMap(address tokenAddress) → uint256

The maximum amount that should be deposited in money market

Parameters:

  • tokenAddress: The address of token whose ceiling is being fetched