Max Gas Limit
Last updated
Last updated
To manage gas costs, we have set a max gas limit called maxGasForMatching
. This ensures that any unmatched liquidity returns to the underlying protocol, maintaining economic stability and guaranteeing users at least the underlying protocol's APY. Below is an example where the max gas limit is applied.
The initial state: Supply 1 is 300 USDC, and supplies 2 through 10 are 10 USDC each.
When borrow 11 is requested, priority is given to supply 1.
After matching 300 USDC, followed by 10 USDC in each of the next 6 iterations, the gas limit of maxGasForMatching
is reached.
The matching engine then stops.
The remaining 30 USDC falls back to the underlying protocol.