Skip to content

Commit

Permalink
Merge pull request #244 from Gearbox-protocol/tests-pool-fix-4
Browse files Browse the repository at this point in the history
fix: fix edge case for pool setup
  • Loading branch information
Van0k authored Aug 8, 2024
2 parents 832fe64 + fde84eb commit bbe94b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/test/helpers/IntegrationTestHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ contract IntegrationTestHelper is TestHelper, BalanceHelper, ConfigManager {
if (remainingBorrowable < 10 * minDebt) {
uint256 depositAmount = 10 * minDebt;
{
if (pool.expectedLiquidity() != 0) {
if (pool.expectedLiquidity() != 0 && pool.expectedLiquidity() > pool.availableLiquidity()) {
uint256 utilization =
WAD * (pool.expectedLiquidity() - pool.availableLiquidity()) / pool.expectedLiquidity();
if (utilization > 85 * WAD / 100) {
Expand Down

0 comments on commit bbe94b9

Please sign in to comment.