Skip to content

Commit

Permalink
fix: wrong checks in external share limit
Browse files Browse the repository at this point in the history
  • Loading branch information
folkyatina committed Dec 24, 2024
1 parent 9099c27 commit a936b19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/0.4.24/Lido.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit a936b19

Please sign in to comment.