PERC20
The PERC20 contract represents interest-bearing ERC20 tokens users receive when supplying assets to Peridot Protocol.
🛠️ Key Functions & Parameters
✅ mint(uint mintAmount)
mint(uint mintAmount)
Deposit underlying ERC20 tokens into the protocol to receive PERC20 tokens.
Parameters:
mintAmount
: Amount of underlying asset tokens to deposit.
✅ redeem(uint redeemTokens)
redeem(uint redeemTokens)
Withdraw underlying tokens by redeeming your PERC20 tokens.
Parameters:
redeemTokens
: Amount of PERC20 tokens to redeem.
✅ redeemUnderlying(uint redeemAmount)
redeemUnderlying(uint redeemAmount)
Withdraw an exact amount of underlying tokens.
Parameters:
redeemAmount
: Exact amount of underlying tokens to redeem.
✅ borrow(uint borrowAmount)
borrow(uint borrowAmount)
Borrows underlying assets from the market.
Parameters:
borrowAmount
: Amount of underlying tokens to borrow.
✅ repayBorrow(uint repayAmount)
repayBorrow(uint repayAmount)
Repays borrowed tokens to the market.
Parameters:
repayAmount
: Amount of borrowed tokens to repay.
✅ balanceOfUnderlying(address owner)
balanceOfUnderlying(address owner)
Shows the underlying asset balance for a user (includes interest accrued).
Parameters:
owner
: User's wallet address.
Returns:
Current underlying balance including accrued interest.
📈 View Functions & Information
exchangeRateCurrent()
: Fetches current exchange rate (PERC20 ↔ underlying).getCash()
: Retrieves total available liquidity of underlying asset.
This contract allows users to earn interest transparently and manage their asset positions securely.
Last updated