Peridot Protocol
  • Introduction
    • Overview
      • What is Peridot?
      • Our Mission & Vision
      • Key Value Propositions
    • Why Cross-Chain DeFi?
      • Current Challenges in DeFi
      • How our Hub & Spoke model addresses these challenges
  • Architecture & Design
    • System Architecture
      • Overview of the Hub & Spoke Model
    • Core Components
      • Compound Based Lending & Borrowing Modules
      • Wormhole Integration: Token Transfer with Payload
      • On-Chain Accounting & Interest Rate Models
    • Integration Details
  • Technical Specifications
    • Core Contracts
      • Peridottroller
      • PERC20
      • PEther
  • Easy Mode: Onramp & Offramp for New Users
    • Overview of Easy Mode
    • Goals
    • Key Features
  • Contact
Powered by GitBook
On this page
  • 🛠️ Key Functions & Parameters
  • 📈 View Functions & Information
  1. Technical Specifications
  2. Core Contracts

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.


This contract allows users to earn interest transparently and manage their asset positions securely.

PreviousPeridottrollerNextPEther

Last updated 1 month ago