👋
Overview Lender V2
  • Overview
  • The Basics
    • Glossary of Key Words
    • Basic lending pool operations
    • Connect and Deposit
    • Reward Manager
    • Verification Manager
    • Strategy Manager
    • Governance: Yet to be built
    • Conclusion
  • LenderPool
    • ILenderPool
  • RedeemPool
    • IRedeemPool
  • Reward
    • IReward
  • RewardManager
    • IRewardManager
  • Token
    • IToken
  • Verification
    • IVerification
Powered by GitBook
On this page
  • deposit
  • Requirements
  • withdrawAllDeposit
  • withdrawDeposit
  • Requirements
  • redeemAll
  • Requirements
  • switchRewardManager
  • switchVerification
  • switchStrategy
  • claimReward
  • rewardOf
  • getStrategyBalance
  • getDeposit

LenderPool

deposit

function deposit(uint amount) external;

Is used by lenders to deposit stable tokens to the smart contracts.

Parameter Name
Type
Description

amount

uint

is used by lenders to deposit stable token to smart contract.

Requirements

Type
Description

amount

should be greater than zero. must be approved from the stable token contract for the LenderPool. should be less than the validation limit or KYC needs to be completed.

withdrawAllDeposit

function withdrawAllDeposit() external;

Send lender T-Stable equivalent to stable deposited.

withdrawDeposit

function withdrawDeposit(uint amount) external;

Send lender T-Stable equivalent to stable requested.

Parameter Name
Type
Description

amount

uint

Total token requested by lender.

Requirements

Type
Description

amount

should be greater than 0. should be not greater than deposited.

redeemAll

Call transfers all rewards and deposited amount in the stable token.

function redeemAll() external;

Requirements

Type
Description

RedeemPool

should have stable tokens more than lender deposited.

switchRewardManager

Is used to switch reward managers.

    function switchRewardManager(address newRewardManager) external;
Parameter Name
Type
Description

newRewardManager

address

newRewardManager, Address of the new RewardManager.

switchVerification

Updates the Verification contract address.

function switchVerification(address newVerification) external;
Parameter Name
Type
Description

switchVerification

address

Updates the Verification contract address.

switchStrategy

Is used for switching the strategy.

function switchStrategy(address newStrategy) external;
Parameter Name
Type
Description

newStrategy

address

address of the new staking strategy.

claimReward

Transfer all the token reward to msg.sender

function claimReward(address token) external;
Parameter Name
Type
Description

token

address

address of the token.

rewardOf

Returns the total reward of the lender

function rewardOf(address lender, address token) external returns (uint);
Parameter Name
Type
Description

lender

address

address

token

address

Returns the total pending reward

uint

return

Returns the total pending reward

getStrategyBalance

Returns total balance allocated by LenderPool in the Strategy (external protocol)

function getStrategyBalance() external view returns (uint);
Parameter Name
Type
Description

unit

return

Returns total balance allocated by LenderPool in the Strategy external protocol

getDeposit

Returns total amount deposited by the lender.

function getDeposit(address lender) external view returns (uint);
Parameter Name
Type
Description

lender

address

address of the lender

uint

returns

returns amount of stable token deposited by the lender

PreviousConclusionNextILenderPool

Last updated 2 years ago