@@ -23,7 +23,7 @@ contract Vault is IVault, ERC4626 {
2323 using SafeERC20 for IERC20 ;
2424
2525 // CONSTANTS
26- uint256 public constant WAD = 1e18 ;
26+ uint256 private constant WAD = 1e18 ;
2727
2828 // IMMUTABLES
2929 IPool private immutable POOL;
@@ -35,11 +35,12 @@ contract Vault is IVault, ERC4626 {
3535 uint256 public immutable LP_DUST;
3636
3737 // STATE VARIABLES
38+ uint8 private bolt; // reentrancy lock: 0 = off, 1 = on
39+
3840 uint256 [] public buckets;
3941 mapping (uint256 => uint256 ) public bucketsIndex; // (bucketIndex => index location in buckets)
4042 uint256 public bufferLps;
4143 mapping (uint256 => uint256 ) public lps; // (bucketIndex => lps)
42- uint8 public bolt; // reentrancy lock: 0 = off, 1 = on
4344 uint256 public removedCollateralValue;
4445
4546 // MODIFIERS
@@ -433,7 +434,7 @@ contract Vault is IVault, ERC4626 {
433434 if (_paused ()) return 0 ;
434435 // The max the user can redeem is the amount of shares
435436 // they have in the vault limited by the value the buffer holds
436- return Maths.min (super .maxRedeem (owner), convertToShares (BUFFER.total ()));
437+ return Maths.min (super .maxRedeem (owner), _convertToShares (BUFFER.total (), Math.Rounding.Down ));
437438 }
438439
439440 function previewDeposit (uint256 assets ) public view override returns (uint256 ) {
0 commit comments