PoolManager
Functions
HUNDRED_PERCENT
HUNDRED_PERCENT function HUNDRED_PERCENT()
view
returns (
uint256
);Return Values:
0
uint256
uint256
acceptPoolDelegate
acceptPoolDelegateAccepts the role of pool delegate.
function acceptPoolDelegate()
nonpayable;active
activeReturns whether or not a pool is active.
Return Values:
0
bool
bool
addStrategy
addStrategyAdds a new strategy. NOTE: The PoolManager address is encoded and prepended to the extraDeploymentData.
Parameters:
0
strategyFactory_
address
address
The address of the strategy factory to use.
1
extraDeploymentData_
bytes
bytes
The data to construct the strategy.
Return Values:
0
strategy_
address
address
The address of the new strategy.
asset
assetGets the address of the funds asset.
Return Values:
0
address
address
canCall
canCallChecks if a scheduled call can be executed.
Parameters:
0
functionId_
bytes32
bytes32
The function to check.
1
caller_
address
address
The address of the caller.
2
data_
bytes
bytes
The data of the call.
Return Values:
0
canCall_
bool
bool
True if the call can be executed, false otherwise.
1
errorMessage_
string
string
The error message if the call cannot be executed.
completeConfiguration
completeConfigurationComplete the configuration.
configured
configuredReturns whether or not a pool is configured.
Return Values:
0
bool
bool
convertToExitShares
convertToExitSharesReturns the amount of exit shares for the input amount.
Parameters:
0
assets_
uint256
uint256
Return Values:
0
shares_
uint256
uint256
Amount of shares able to be exited.
delegateManagementFeeRate
delegateManagementFeeRateGets the delegate management fee rate.
Return Values:
0
uint256
uint256
depositCover
depositCoverDeposits cover into the pool.
Parameters:
0
amount_
uint256
uint256
The amount of cover to deposit.
factory
factoryThe address of the proxy factory.
Return Values:
0
factory_
address
address
finishCollateralLiquidation
finishCollateralLiquidationFinishes the collateral liquidation
Parameters:
0
loan_
address
address
Loan that had its collateral liquidated.
getEscrowParams
getEscrowParamsGets the information of escrowed shares.
Parameters:
0
``
address
address
1
shares_
uint256
uint256
The amount of shares to get the information of.
Return Values:
0
escrowShares_
uint256
uint256
The amount of escrowed shares.
1
destination_
address
address
The address of the destination.
globals
globalsGets the address of the globals.
Return Values:
0
globals_
address
address
The address of the globals.
governor
governorGets the address of the governor.
Return Values:
0
governor_
address
address
The address of the governor.
hasSufficientCover
hasSufficientCoverReturns if pool has sufficient cover.
Return Values:
0
hasSufficientCover_
bool
bool
True if pool has sufficient cover.
implementation
implementationThe address of the implementation contract being proxied.
Return Values:
0
implementation_
address
address
isStrategy
isStrategyReturns whether or not the given address is a strategy.
Parameters:
0
``
address
address
Return Values:
0
bool
bool
liquidityCap
liquidityCapGets the liquidity cap for the pool.
Return Values:
0
uint256
uint256
maxDeposit
maxDepositGets the amount of assets that can be deposited.
Parameters:
0
receiver_
address
address
The address to check the deposit for.
Return Values:
0
maxAssets_
uint256
uint256
maxMint
maxMintGets the amount of shares that can be minted.
Parameters:
0
receiver_
address
address
The address to check the mint for.
Return Values:
0
maxShares_
uint256
uint256
maxRedeem
maxRedeemGets the amount of shares that can be redeemed.
Parameters:
0
owner_
address
address
The address to check the redemption for.
Return Values:
0
maxShares_
uint256
uint256
maxWithdraw
maxWithdrawGets the amount of assets that can be withdrawn.
Parameters:
0
owner_
address
address
The address to check the withdraw for.
Return Values:
0
maxAssets_
uint256
uint256
migrate
migrateModifies the proxy's storage by delegate-calling a migrator contract with some arguments. Access control logic critical since caller can force a selfdestruct via a malicious `migrator_` which is delegatecalled.
Parameters:
0
migrator_
address
address
The address of a migrator contract.
1
arguments_
bytes
bytes
Some encoded arguments to use for the migration.
pendingPoolDelegate
pendingPoolDelegateGets the address of the pending pool delegate.
Return Values:
0
address
address
pool
poolGets the address of the pool.
Return Values:
0
address
address
poolDelegate
poolDelegateGets the address of the pool delegate.
Return Values:
0
address
address
poolDelegateCover
poolDelegateCoverGets the address of the pool delegate cover.
Return Values:
0
address
address
poolPermissionManager
poolPermissionManagerGets the address of the pool delegate cover.
Return Values:
0
address
address
previewRedeem
previewRedeemGets the amount of shares that can be redeemed.
Parameters:
0
owner_
address
address
The address to check the redemption for.
1
shares_
uint256
uint256
The amount of requested shares to redeem.
Return Values:
0
assets_
uint256
uint256
The amount of assets that will be returned for `shares_`.
previewWithdraw
previewWithdrawGets the amount of assets that can be redeemed.
Parameters:
0
owner_
address
address
The address to check the redemption for.
1
assets_
uint256
uint256
The amount of requested shares to redeem.
Return Values:
0
shares_
uint256
uint256
The amount of assets that will be returned for `assets_`.
processRedeem
processRedeemProcesses a redemptions of shares for assets from the pool.
Parameters:
0
shares_
uint256
uint256
The amount of shares to redeem.
1
owner_
address
address
The address of the owner of the shares.
2
sender_
address
address
The address of the sender of the redeem call.
Return Values:
0
redeemableShares_
uint256
uint256
The amount of shares redeemed.
1
resultingAssets_
uint256
uint256
The amount of assets withdrawn.
processWithdraw
processWithdrawProcesses a redemptions of shares for assets from the pool.
Parameters:
0
assets_
uint256
uint256
The amount of assets to withdraw.
1
owner_
address
address
The address of the owner of the shares.
2
sender_
address
address
The address of the sender of the withdraw call.
Return Values:
0
redeemableShares_
uint256
uint256
The amount of shares redeemed.
1
resultingAssets_
uint256
uint256
The amount of assets withdrawn.
removeShares
removeSharesRequests a redemption of shares from the pool.
Parameters:
0
shares_
uint256
uint256
The amount of shares to redeem.
1
owner_
address
address
The address of the owner of the shares.
Return Values:
0
sharesReturned_
uint256
uint256
The amount of shares withdrawn.
requestFunds
requestFundsStrategy can request funds from the pool via the poolManager.
Parameters:
0
destination_
address
address
The address to send the funds to.
1
principal_
uint256
uint256
The principal amount to fund the strategy with.
requestRedeem
requestRedeemRequests a redemption of shares from the pool.
Parameters:
0
shares_
uint256
uint256
The amount of shares to redeem.
1
owner_
address
address
The address of the owner of the shares.
2
sender_
address
address
The address of the sender of the shares.
requestWithdraw
requestWithdrawRequests a withdrawal of assets from the pool.
Parameters:
0
shares_
uint256
uint256
The amount of shares to redeem.
1
assets_
uint256
uint256
The amount of assets to withdraw.
2
owner_
address
address
The address of the owner of the shares.
3
sender_
address
address
The address of the sender of the shares.
setActive
setActiveSets a the pool to be active or inactive.
Parameters:
0
active_
bool
bool
Whether the pool is active.
setDelegateManagementFeeRate
setDelegateManagementFeeRateSets the value for the delegate management fee rate.
Parameters:
0
delegateManagementFeeRate_
uint256
uint256
The value for the delegate management fee rate.
setImplementation
setImplementationModifies the proxy's implementation address.
Parameters:
0
implementation_
address
address
setIsStrategy
setIsStrategySets if the strategy is valid in the isStrategy mapping.
Parameters:
0
strategy_
address
address
The address of the strategy
1
isStrategy_
bool
bool
Whether the strategy is valid.
setLiquidityCap
setLiquidityCapSets the value for liquidity cap.
Parameters:
0
liquidityCap_
uint256
uint256
The value for liquidity cap.
setPendingPoolDelegate
setPendingPoolDelegateSets an address as the pending pool delegate.
Parameters:
0
pendingPoolDelegate_
address
address
The address of the new pool delegate.
setPoolPermissionManager
setPoolPermissionManagerSets the address of the pool permission manager.
Parameters:
0
poolPermissionManager_
address
address
setWithdrawalManager
setWithdrawalManagerSets the address of the withdrawal manager.
Parameters:
0
withdrawalManager_
address
address
The address of the withdrawal manager.
strategyList
strategyListGets the address of the strategy in the list.
Parameters:
0
``
uint256
uint256
Return Values:
0
address
address
strategyListLength
strategyListLengthReturns the length of the `strategyList`.
Return Values:
0
strategyListLength_
uint256
uint256
The length of the `strategyList`.
totalAssets
totalAssetsReturns the amount of total assets.
Return Values:
0
totalAssets_
uint256
uint256
Amount of of total assets.
triggerDefault
triggerDefaultTriggers the default of a loan.
Parameters:
0
loan_
address
address
Loan to trigger the default.
1
liquidatorFactory_
address
address
Factory used to deploy the liquidator.
unrealizedLosses
unrealizedLossesReturns the amount unrealized losses.
Return Values:
0
unrealizedLosses_
uint256
uint256
Amount of unrealized losses.
upgrade
upgradeUpgrades a contract implementation to a specific version. Access control logic critical since caller can force a selfdestruct via a malicious `migrator_` which is delegatecalled.
Parameters:
0
version_
uint256
uint256
1
arguments_
bytes
bytes
Some encoded arguments to use for the upgrade.
withdrawalManager
withdrawalManagerGets the address of the withdrawal manager.
Return Values:
0
address
address
withdrawCover
withdrawCoverWithdraws cover from the pool.
Parameters:
0
amount_
uint256
uint256
The amount of cover to withdraw.
1
recipient_
address
address
The address of the recipient.
Events
CollateralLiquidationFinished
CollateralLiquidationFinishedEmitted when a collateral liquidations is finished.
Parameters:
0
loan_
address
address
The address of the loan.
1
unrealizedLosses_
uint256
uint256
The amount of unrealized losses.
CollateralLiquidationTriggered
CollateralLiquidationTriggeredEmitted when a collateral liquidations is triggered.
Parameters:
0
loan_
address
address
The address of the loan.
CoverDeposited
CoverDepositedEmitted when cover is deposited.
Parameters:
0
amount_
uint256
uint256
The amount of cover deposited.
CoverLiquidated
CoverLiquidatedEmitted when cover is liquidated in the case of a loan defaulting.
Parameters:
0
toTreasury_
uint256
uint256
The amount of cover sent to the Treasury.
1
toPool_
uint256
uint256
The amount of cover sent to the Pool.
CoverWithdrawn
CoverWithdrawnEmitted when cover is withdrawn.
Parameters:
0
amount_
uint256
uint256
The amount of cover withdrawn.
DelegateManagementFeeRateSet
DelegateManagementFeeRateSetEmitted when a new management fee rate is set.
Parameters:
0
managementFeeRate_
uint256
uint256
The amount of management fee rate.
IsStrategySet
IsStrategySetEmitted when a strategy is set as valid.
Parameters:
0
strategy_
address
address
The address of the strategy.
1
isStrategy_
bool
bool
Whether the strategy is valid.
LiquidityCapSet
LiquidityCapSetEmitted when a new liquidity cap is set.
Parameters:
0
liquidityCap_
uint256
uint256
The value of liquidity cap.
PendingDelegateAccepted
PendingDelegateAcceptedEmitted when the pending pool delegate accepts the ownership transfer.
Parameters:
0
previousDelegate_
address
address
The address of the previous delegate.
1
newDelegate_
address
address
The address of the new delegate.
PendingDelegateSet
PendingDelegateSetEmitted when the pending pool delegate is set.
Parameters:
0
previousDelegate_
address
address
The address of the previous delegate.
1
newDelegate_
address
address
The address of the new delegate.
PoolConfigurationComplete
PoolConfigurationCompleteEmitted when the pool configuration is marked as complete.
PoolPermissionManagerSet
PoolPermissionManagerSetEmitted when the pool permission manager is set.
Parameters:
0
poolPermissionManager_
address
address
The address of the pool permission manager.
RedeemProcessed
RedeemProcessedEmitted when a redemption of shares from the pool is processed.
Parameters:
0
owner_
address
address
The owner of the shares.
1
redeemableShares_
uint256
uint256
The amount of redeemable shares.
2
resultingAssets_
uint256
uint256
The amount of assets redeemed.
RedeemRequested
RedeemRequestedEmitted when a redemption of shares from the pool is requested.
Parameters:
0
owner_
address
address
The owner of the shares.
1
shares_
uint256
uint256
The amount of redeemable shares.
SetAsActive
SetAsActiveEmitted when a pool is sets to be active or inactive.
Parameters:
0
active_
bool
bool
Whether the pool is active.
SharesRemoved
SharesRemovedEmitted when shares are removed from the pool.
Parameters:
0
owner_
address
address
The address of the owner of the shares.
1
shares_
uint256
uint256
The amount of shares removed.
StrategyAdded
StrategyAddedEmitted when a new strategy is added.
Parameters:
0
strategy_
address
address
The address of the new strategy.
Upgraded
UpgradedThe instance was upgraded.
Parameters:
0
toVersion_
uint256
uint256
The new version of the loan.
1
arguments_
bytes
bytes
The upgrade arguments, if any.
WithdrawalManagerSet
WithdrawalManagerSetEmitted when the withdrawal manager is set.
Parameters:
0
withdrawalManager_
address
address
The address of the withdrawal manager.
WithdrawalProcessed
WithdrawalProcessedEmitted when withdrawal of assets from the pool is processed.
Parameters:
0
owner_
address
address
The owner of the assets.
1
redeemableShares_
uint256
uint256
The amount of redeemable shares.
2
resultingAssets_
uint256
uint256
The amount of assets redeemed.
Last updated