Max Gas Limit

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.

Example: Max gas limit
  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.

Last updated