From a936b191abf350760a811f8e723df3a076385827 Mon Sep 17 00:00:00 2001 From: Aleksei Potapkin Date: Tue, 24 Dec 2024 12:15:07 +0200 Subject: [PATCH] fix: wrong checks in external share limit --- contracts/0.4.24/Lido.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/0.4.24/Lido.sol b/contracts/0.4.24/Lido.sol index 7ca76b930..b217aad2e 100644 --- a/contracts/0.4.24/Lido.sol +++ b/contracts/0.4.24/Lido.sol @@ -960,10 +960,10 @@ contract Lido is Versioned, StETHPermit, AragonApp { /// - Returns 0 if maxBP is 0 (external minting is disabled) or external shares already exceed the limit /// - Returns 2^256-1 if maxBP is 100% (external minting is unlimited) function _getMaxMintableExternalShares() internal view returns (uint256) { + uint256 maxRatioBP = MAX_EXTERNAL_RATIO_POSITION.getStorageUint256(); if (maxRatioBP == 0) return 0; if (maxRatioBP == TOTAL_BASIS_POINTS) return uint256(-1); - uint256 maxRatioBP = MAX_EXTERNAL_RATIO_POSITION.getStorageUint256(); uint256 externalShares = EXTERNAL_SHARES_POSITION.getStorageUint256(); uint256 totalShares = _getTotalShares();