Skip to content

Commit 568804f

Browse files
committed
fix: adapt rounding
1 parent d6d346d commit 568804f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libraries/PoolLib.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ library PoolLib {
2121
/// @dev The pool supply `index` must be passed as a parameter to skip the supply on pool
2222
/// if it were to revert due to the amount being too small.
2323
function supplyToPool(IPool pool, address underlying, uint256 amount, uint256 index) internal {
24-
if (amount.rayDiv(index) == 0) return;
24+
if (amount.rayDivDown(index) == 0) return;
2525

2626
pool.supply(underlying, amount, address(this), Constants.NO_REFERRAL_CODE);
2727
}

0 commit comments

Comments
 (0)