Skip to content

Commit

Permalink
fix: Adapt maxFlashLoan to match standard. (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zer0dot authored Jan 26, 2023
1 parent 44b7905 commit 038442d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/contracts/facilitators/flashMinter/GhoFlashMinter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ contract GhoFlashMinter is IGhoFlashMinter {
return 0;
} else {
IGhoToken.Facilitator memory flashMinterFacilitator = GHO_TOKEN.getFacilitator(address(this));
return flashMinterFacilitator.bucketCapacity - flashMinterFacilitator.bucketLevel;
uint256 capacity = flashMinterFacilitator.bucketCapacity;
uint256 level = flashMinterFacilitator.bucketLevel;
return capacity > level ? capacity - level : 0;
}
}

Expand Down

0 comments on commit 038442d

Please sign in to comment.