Skip to content

Latest commit

 

History

History
718 lines (597 loc) · 19.5 KB

IVaultDelegate.md

File metadata and controls

718 lines (597 loc) · 19.5 KB

IVaultDelegate.sol

View Source: contracts/interfaces/IVaultDelegate.sol

↗ Extends: IMember ↘ Derived Contracts: VaultDelegateBase

IVaultDelegate

Functions

preAddLiquidity

function preAddLiquidity(address caller, bytes32 coverKey, uint256 amount, uint256 npmStake) external nonpayable
returns(podsToMint uint256, previousNpmStake uint256)

Arguments

Name Type Description
caller address
coverKey bytes32
amount uint256
npmStake uint256
Source Code
function preAddLiquidity(
    address caller,
    bytes32 coverKey,
    uint256 amount,
    uint256 npmStake
  ) external returns (uint256 podsToMint, uint256 previousNpmStake);

postAddLiquidity

function postAddLiquidity(address caller, bytes32 coverKey, uint256 amount, uint256 npmStake) external nonpayable

Arguments

Name Type Description
caller address
coverKey bytes32
amount uint256
npmStake uint256
Source Code
function postAddLiquidity(
    address caller,
    bytes32 coverKey,
    uint256 amount,
    uint256 npmStake
  ) external;

accrueInterestImplementation

function accrueInterestImplementation(address caller, bytes32 coverKey) external nonpayable

Arguments

Name Type Description
caller address
coverKey bytes32
Source Code
function accrueInterestImplementation(address caller, bytes32 coverKey) external;

preRemoveLiquidity

function preRemoveLiquidity(address caller, bytes32 coverKey, uint256 amount, uint256 npmStake, bool exit) external nonpayable
returns(stablecoin address, stableCoinToRelease uint256)

Arguments

Name Type Description
caller address
coverKey bytes32
amount uint256
npmStake uint256
exit bool
Source Code
function preRemoveLiquidity(
    address caller,
    bytes32 coverKey,
    uint256 amount,
    uint256 npmStake,
    bool exit
  ) external returns (address stablecoin, uint256 stableCoinToRelease);

postRemoveLiquidity

function postRemoveLiquidity(address caller, bytes32 coverKey, uint256 amount, uint256 npmStake, bool exit) external nonpayable

Arguments

Name Type Description
caller address
coverKey bytes32
amount uint256
npmStake uint256
exit bool
Source Code
function postRemoveLiquidity(
    address caller,
    bytes32 coverKey,
    uint256 amount,
    uint256 npmStake,
    bool exit
  ) external;

preTransferGovernance

function preTransferGovernance(address caller, bytes32 coverKey, address to, uint256 amount) external nonpayable
returns(stablecoin address)

Arguments

Name Type Description
caller address
coverKey bytes32
to address
amount uint256
Source Code
function preTransferGovernance(
    address caller,
    bytes32 coverKey,
    address to,
    uint256 amount
  ) external returns (address stablecoin);

postTransferGovernance

function postTransferGovernance(address caller, bytes32 coverKey, address to, uint256 amount) external nonpayable

Arguments

Name Type Description
caller address
coverKey bytes32
to address
amount uint256
Source Code
function postTransferGovernance(
    address caller,
    bytes32 coverKey,
    address to,
    uint256 amount
  ) external;

preTransferToStrategy

function preTransferToStrategy(address caller, IERC20 token, bytes32 coverKey, bytes32 strategyName, uint256 amount) external nonpayable

Arguments

Name Type Description
caller address
token IERC20
coverKey bytes32
strategyName bytes32
amount uint256
Source Code
function preTransferToStrategy(
    address caller,
    IERC20 token,
    bytes32 coverKey,
    bytes32 strategyName,
    uint256 amount
  ) external;

postTransferToStrategy

function postTransferToStrategy(address caller, IERC20 token, bytes32 coverKey, bytes32 strategyName, uint256 amount) external nonpayable

Arguments

Name Type Description
caller address
token IERC20
coverKey bytes32
strategyName bytes32
amount uint256
Source Code
function postTransferToStrategy(
    address caller,
    IERC20 token,
    bytes32 coverKey,
    bytes32 strategyName,
    uint256 amount
  ) external;

preReceiveFromStrategy

function preReceiveFromStrategy(address caller, IERC20 token, bytes32 coverKey, bytes32 strategyName, uint256 amount) external nonpayable

Arguments

Name Type Description
caller address
token IERC20
coverKey bytes32
strategyName bytes32
amount uint256
Source Code
function preReceiveFromStrategy(
    address caller,
    IERC20 token,
    bytes32 coverKey,
    bytes32 strategyName,
    uint256 amount
  ) external;

postReceiveFromStrategy

function postReceiveFromStrategy(address caller, IERC20 token, bytes32 coverKey, bytes32 strategyName, uint256 amount) external nonpayable
returns(income uint256, loss uint256)

Arguments

Name Type Description
caller address
token IERC20
coverKey bytes32
strategyName bytes32
amount uint256
Source Code
function postReceiveFromStrategy(
    address caller,
    IERC20 token,
    bytes32 coverKey,
    bytes32 strategyName,
    uint256 amount
  ) external returns (uint256 income, uint256 loss);

preFlashLoan

function preFlashLoan(address caller, bytes32 coverKey, IERC3156FlashBorrower receiver, address token, uint256 amount, bytes data) external nonpayable
returns(stablecoin contract IERC20, fee uint256, protocolFee uint256)

Arguments

Name Type Description
caller address
coverKey bytes32
receiver IERC3156FlashBorrower
token address
amount uint256
data bytes
Source Code
function preFlashLoan(
    address caller,
    bytes32 coverKey,
    IERC3156FlashBorrower receiver,
    address token,
    uint256 amount,
    bytes calldata data
  )
    external
    returns (
      IERC20 stablecoin,
      uint256 fee,
      uint256 protocolFee
    );

postFlashLoan

function postFlashLoan(address caller, bytes32 coverKey, IERC3156FlashBorrower receiver, address token, uint256 amount, bytes data) external nonpayable

Arguments

Name Type Description
caller address
coverKey bytes32
receiver IERC3156FlashBorrower
token address
amount uint256
data bytes
Source Code
function postFlashLoan(
    address caller,
    bytes32 coverKey,
    IERC3156FlashBorrower receiver,
    address token,
    uint256 amount,
    bytes calldata data
  ) external;

calculatePodsImplementation

function calculatePodsImplementation(bytes32 coverKey, uint256 forStablecoinUnits) external view
returns(uint256)

Arguments

Name Type Description
coverKey bytes32
forStablecoinUnits uint256
Source Code
function calculatePodsImplementation(bytes32 coverKey, uint256 forStablecoinUnits) external view returns (uint256);

calculateLiquidityImplementation

function calculateLiquidityImplementation(bytes32 coverKey, uint256 podsToBurn) external view
returns(uint256)

Arguments

Name Type Description
coverKey bytes32
podsToBurn uint256
Source Code
function calculateLiquidityImplementation(bytes32 coverKey, uint256 podsToBurn) external view returns (uint256);

getInfoImplementation

function getInfoImplementation(bytes32 coverKey, address forAccount) external view
returns(struct IVault.VaultInfoType)

Arguments

Name Type Description
coverKey bytes32
forAccount address
Source Code
function getInfoImplementation(bytes32 coverKey, address forAccount) external view returns (IVault.VaultInfoType memory);

getStablecoinBalanceOfImplementation

function getStablecoinBalanceOfImplementation(bytes32 coverKey) external view
returns(uint256)

Arguments

Name Type Description
coverKey bytes32
Source Code
function getStablecoinBalanceOfImplementation(bytes32 coverKey) external view returns (uint256);

getFlashFee

function getFlashFee(address caller, bytes32 coverKey, address token, uint256 amount) external view
returns(uint256)

Arguments

Name Type Description
caller address
coverKey bytes32
token address
amount uint256
Source Code
function getFlashFee(
    address caller,
    bytes32 coverKey,
    address token,
    uint256 amount
  ) external view returns (uint256);

getMaxFlashLoan

function getMaxFlashLoan(address caller, bytes32 coverKey, address token) external view
returns(uint256)

Arguments

Name Type Description
caller address
coverKey bytes32
token address
Source Code
function getMaxFlashLoan(
    address caller,
    bytes32 coverKey,
    address token
  ) external view returns (uint256);

Contracts