Make Investments
Learn how to make investments via the protocol
1. Make Investments
To make an investment, you must first call the function to create a spending allowance. This is the amount the the caller is authorising the pool contract to spend.
function safeApprove(IERC20Upgradeable token, address spender, uint256 amount)
...where amount is the number of assets you'd like to approve to be deposited and address is the wallet address of the lender. It will return a boolean, true if the request succesful, false if the request failed.
Once the allowance is approved, you will then need to call the function
function deposit(
uint256 assets,
address lender
) returns (uint256 shares) ;
where assets is the number of assets you'd like to deposit and lender is the wallet address of the lender making the deposit.
To see a demo of this working in action, you can visit our product documentation here.
Last updated