# PERC20

The **PERC20** contract represents interest-bearing ERC20 tokens users receive when supplying assets to Peridot Protocol.

***

### 🛠️ Key Functions & Parameters

#### `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)`

Withdraw underlying tokens by redeeming your PERC20 tokens.

* **Parameters:**
  * `redeemTokens`: Amount of PERC20 tokens to redeem.

***

#### `redeemUnderlying(uint redeemAmount)`

Withdraw an exact amount of underlying tokens.

* **Parameters:**
  * `redeemAmount`: Exact amount of underlying tokens to redeem.

***

#### `borrow(uint borrowAmount)`

Borrows underlying assets from the market.

* **Parameters:**
  * `borrowAmount`: Amount of underlying tokens to borrow.

***

#### `repayBorrow(uint repayAmount)`

Repays borrowed tokens to the market.

* **Parameters:**
  * `repayAmount`: Amount of borrowed tokens to repay.

***

#### `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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://peridot-finance.gitbook.io/peridot-protocol/technical-architecture/evm/core-contracts/perc20.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
