Evoq Finance
  • introduction
    • Evoq Finance: A P2P-Based Lending Optimizer
  • background
    • Problem: Capital Inefficiency
  • protocol overview
    • How it works
      • Fallback Mechanism
      • Interest Rate Model
      • Cap Mechanism
    • Liquidation
    • Price Oracle
    • Risk Fund
  • advanced mechanism
    • Matching Engine
      • Priority Queue Matching
      • Max Gas Limit
    • Delta Mechanism
  • security
    • General Risks
      • Flash Loan Attack
      • Front-Running Attack
    • Audits
  • Technical
    • Overview
      • Evoq
      • WBNBGateway
      • Lens
      • Contract Deployments
    • Liquidation Bot
  • GETTING STARTED
    • User Guide
    • FAQ
  • Links
    • Launch App
    • Community
Powered by GitBook
On this page
  1. advanced mechanism
  2. Matching Engine

Max Gas Limit

PreviousPriority Queue MatchingNextDelta Mechanism

Last updated 2 months ago

To manage gas costs, we have set a max gas limit called maxGasForMatching, ensuring that matching transactions are executed efficiently and remain cost-effective by preventing excessive gas consumption.

  1. The initial state: Supply 1 is 300 USDC, and supplies 2 through 10 are 10 USDC each.

  2. When borrow 11 is requested, priority is given to supply 1.

  3. After matching 300 USDC, followed by 10 USDC in each of the next 6 iterations, the gas limit of maxGasForMatching is reached.

  4. The matching engine then stops.

  5. The remaining 30 USDC falls back to the underlying protocol.

Example: Max gas limit