Skip to content

Latest commit

 

History

History
341 lines (287 loc) · 9.58 KB

ILendingStrategy.md

File metadata and controls

341 lines (287 loc) · 9.58 KB

ILendingStrategy.sol

View Source: contracts/interfaces/ILendingStrategy.sol

↗ Extends: IMember ↘ Derived Contracts: AaveStrategy, CompoundStrategy

ILendingStrategy

Structs

LendingStrategyInfoType

struct LendingStrategyInfoType {
 uint256 deposits,
 uint256 withdrawals
}

Events

event LogDeposit(bytes32 indexed name, uint256  counter, uint256  amount, uint256  certificateReceived, uint256  depositTotal, uint256  withdrawalTotal);
event Deposited(bytes32 indexed key, address indexed onBehalfOf, uint256  stablecoinDeposited, uint256  certificateTokenIssued);
event LogWithdrawal(bytes32 indexed name, uint256  counter, uint256  stablecoinWithdrawn, uint256  certificateRedeemed, uint256  depositTotal, uint256  withdrawalTotal);
event Withdrawn(bytes32 indexed key, address indexed sendTo, uint256  stablecoinWithdrawn, uint256  certificateTokenRedeemed);
event Drained(IERC20 indexed asset, uint256  amount);

Functions

getKey

function getKey() external pure
returns(bytes32)

Arguments

Name Type Description
Source Code
function getKey() external pure returns (bytes32);

getWeight

function getWeight() external pure
returns(uint256)

Arguments

Name Type Description
Source Code
function getWeight() external pure returns (uint256);

getDepositAsset

function getDepositAsset() external view
returns(contract IERC20)

Arguments

Name Type Description
Source Code
function getDepositAsset() external view returns (IERC20);

getDepositCertificate

function getDepositCertificate() external view
returns(contract IERC20)

Arguments

Name Type Description
Source Code
function getDepositCertificate() external view returns (IERC20);

getInfo

Gets info of this strategy by cover key

function getInfo(bytes32 coverKey) external view
returns(info struct ILendingStrategy.LendingStrategyInfoType)

Arguments

Name Type Description
coverKey bytes32 Enter the cover key
Source Code
function getInfo(bytes32 coverKey) external view returns (LendingStrategyInfoType memory info);

deposit

function deposit(bytes32 coverKey, uint256 amount) external nonpayable
returns(certificateReceived uint256)

Arguments

Name Type Description
coverKey bytes32
amount uint256
Source Code
function deposit(bytes32 coverKey, uint256 amount) external returns (uint256 certificateReceived);

withdraw

function withdraw(bytes32 coverKey) external nonpayable
returns(stablecoinWithdrawn uint256)

Arguments

Name Type Description
coverKey bytes32
Source Code
function withdraw(bytes32 coverKey) external returns (uint256 stablecoinWithdrawn);

Contracts