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

PEther

The PEther contract manages deposits and borrowing of the blockchain’s native asset (e.g., ETH), providing users with interest-bearing tokens in return for native asset deposits.


πŸ› οΈ Key Functions & Parameters

βœ… mint() payable

Deposit native blockchain asset (ETH) into the protocol.

  • Usage: Send ETH directly with the call.

  • User receives PEther tokens proportionally.


βœ… redeem(uint redeemTokens)

Withdraw ETH by redeeming PEther tokens.

  • Parameters:

    • redeemTokens: Number of PEther tokens to redeem.


βœ… redeemUnderlying(uint redeemAmount)

Withdraw an exact amount of ETH directly.

  • Parameters:

    • redeemAmount: Amount of ETH to withdraw.


βœ… borrow(uint borrowAmount)

Borrow ETH from the market.

  • Parameters:

    • borrowAmount: Amount of ETH to borrow.


βœ… repayBorrow() payable

Repay borrowed ETH.

  • Usage: Send ETH directly as repayment.


βœ… balanceOfUnderlying(address owner)

Returns user's underlying ETH balance (including accrued interest).

  • Parameters:

    • owner: User wallet address.

  • Returns:

    • User's underlying ETH balance.


πŸ“ˆ View Functions & Information

  • exchangeRateCurrent(): Current exchange rate between PEther and underlying ETH.

  • getCash(): Shows total ETH liquidity available in the market.


The PEther contract facilitates direct native-asset lending and borrowing within Peridot, streamlining user interactions with native tokens.

PreviousPERC20NextEasy Mode: Onramp & Offramp for New Users

Last updated 1 month ago