MorphoSetters
Inherits: IMorphoSetters, MorphoInternal
Author: Morpho Labs
Abstract contract exposing all setters and governance-related functions.
Functions
isMarketCreated
Prevents to update a market not created yet.
modifier isMarketCreated(address underlying);
Parameters
Name | Type | Description |
---|---|---|
underlying | address | The address of the underlying market. |
createMarket
Creates a new market for the underlying
token with a given reserveFactor
(in bps) and a given p2pIndexCursor
(in bps).
function createMarket(address underlying, uint16 reserveFactor, uint16 p2pIndexCursor) external onlyOwner;
claimToTreasury
Claims the fee for the underlyings
and send it to the _treasuryVault
.
Claiming on a market where there are some rewards might steal users' rewards.
function claimToTreasury(address[] calldata underlyings, uint256[] calldata amounts) external onlyOwner;
increaseP2PDeltas
Increases the peer-to-peer delta of amount
on the underlying
market.
function increaseP2PDeltas(address underlying, uint256 amount) external onlyOwner isMarketCreated(underlying);
setDefaultIterations
Sets _defaultIterations
to defaultIterations
.
function setDefaultIterations(Types.Iterations calldata defaultIterations) external onlyOwner;
setPositionsManager
Sets _positionsManager
to positionsManager
.
function setPositionsManager(address positionsManager) external onlyOwner;
setRewardsManager
Sets _rewardsManager
to rewardsManager
.
Note that it is possible to set the address zero. In this case, the pool rewards are not accounted.
function setRewardsManager(address rewardsManager) external onlyOwner;
setTreasuryVault
Sets _treasuryVault
to treasuryVault
.
Note that it is possible to set the address zero. In this case, it is not possible to claim the fee.
function setTreasuryVault(address treasuryVault) external onlyOwner;
setAssetIsCollateralOnPool
Sets the underlying
asset as isCollateral
on the pool.
The following invariant must hold: is collateral on Morpho => is collateral on pool.
Note that it is possible to set an asset as non-collateral even if the market is not created yet on Morpho. This is needed because an aToken with LTV = 0 can be sent to Morpho and would be set as collateral by default, thus blocking withdrawals from the pool. However, it's not possible to set an asset as collateral on pool while the market is not created on Morpho.
function setAssetIsCollateralOnPool(address underlying, bool isCollateral) external onlyOwner;
setAssetIsCollateral
Sets the underlying
asset as isCollateral
on Morpho.
The following invariant must hold: is collateral on Morpho => is collateral on pool.
function setAssetIsCollateral(address underlying, bool isCollateral) external onlyOwner isMarketCreated(underlying);
setReserveFactor
Sets the underlying
's reserve factor to newReserveFactor
(in bps).
function setReserveFactor(address underlying, uint16 newReserveFactor) external onlyOwner isMarketCreated(underlying);
setP2PIndexCursor
Sets the underlying
's peer-to-peer index cursor to p2pIndexCursor
(in bps).
function setP2PIndexCursor(address underlying, uint16 p2pIndexCursor) external onlyOwner isMarketCreated(underlying);
setIsClaimRewardsPaused
Sets the claim rewards pause status to isPaused
.
function setIsClaimRewardsPaused(bool isPaused) external onlyOwner;
setIsSupplyPaused
Sets the supply pause status to isPaused
on the underlying
market.
function setIsSupplyPaused(address underlying, bool isPaused) external onlyOwner isMarketCreated(underlying);
setIsSupplyCollateralPaused
Sets the supply collateral pause status to isPaused
on the underlying
market.
function setIsSupplyCollateralPaused(address underlying, bool isPaused)
external
onlyOwner
isMarketCreated(underlying);
setIsBorrowPaused
Sets the borrow pause status to isPaused
on the underlying
market.
function setIsBorrowPaused(address underlying, bool isPaused) external onlyOwner isMarketCreated(underlying);
setIsRepayPaused
Sets the repay pause status to isPaused
on the underlying
market.
function setIsRepayPaused(address underlying, bool isPaused) external onlyOwner isMarketCreated(underlying);
setIsWithdrawPaused
Sets the withdraw pause status to isPaused
on the underlying
market.
function setIsWithdrawPaused(address underlying, bool isPaused) external onlyOwner isMarketCreated(underlying);
setIsWithdrawCollateralPaused
Sets the withdraw collateral pause status to isPaused
on the underlying
market.
function setIsWithdrawCollateralPaused(address underlying, bool isPaused)
external
onlyOwner
isMarketCreated(underlying);
setIsLiquidateCollateralPaused
Sets the liquidate collateral pause status to isPaused
on the underlying
market.
function setIsLiquidateCollateralPaused(address underlying, bool isPaused)
external
onlyOwner
isMarketCreated(underlying);
setIsLiquidateBorrowPaused
Sets the liquidate borrow pause status to isPaused
on the underlying
market.
function setIsLiquidateBorrowPaused(address underlying, bool isPaused) external onlyOwner isMarketCreated(underlying);
setIsPaused
Sets globally the pause status to isPaused
on the underlying
market.
function setIsPaused(address underlying, bool isPaused) external onlyOwner isMarketCreated(underlying);
setIsPausedForAllMarkets
Sets the global pause status to isPaused
on all markets.
function setIsPausedForAllMarkets(bool isPaused) external onlyOwner;
setIsP2PDisabled
Sets the peer-to-peer disable status to isP2PDisabled
on the underlying
market.
function setIsP2PDisabled(address underlying, bool isP2PDisabled) external onlyOwner isMarketCreated(underlying);
setIsDeprecated
Sets the deprecation status to isDeprecated
on the underlying
market.
function setIsDeprecated(address underlying, bool isDeprecated) external onlyOwner isMarketCreated(underlying);