Skip to content

Commit

Permalink
fix: address 3 improved return value check
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra committed Sep 30, 2024
1 parent adf6944 commit c4d7d15
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ abstract contract ERC4626StataTokenUpgradeable is ERC4626Upgradeable, IERC4626St
// return remaining supply cap margin
uint256 currentSupply = (IAToken(reserveData.aTokenAddress).scaledTotalSupply() +
reserveData.accruedToTreasury).mulDiv(_rate(), RAY, Math.Rounding.Ceil);
return currentSupply > supplyCap ? 0 : supplyCap - currentSupply;
return currentSupply >= supplyCap ? 0 : supplyCap - currentSupply;
}

///@inheritdoc IERC4626StataToken
Expand Down

0 comments on commit c4d7d15

Please sign in to comment.