From 8386ed59254715fc0a5d13ba235aa80637013110 Mon Sep 17 00:00:00 2001 From: ReposCollector Date: Fri, 13 Sep 2024 14:22:01 +0900 Subject: [PATCH] check whether etherFanEEthShares is zero or not. --- src/MembershipManager.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MembershipManager.sol b/src/MembershipManager.sol index b0fc741e0..9d0099b11 100644 --- a/src/MembershipManager.sol +++ b/src/MembershipManager.sol @@ -268,7 +268,7 @@ contract MembershipManager is Initializable, OwnableUpgradeable, PausableUpgrade // Eth Rewards Amount per NFT = (eETH share amount of the NFT) * (total rewards ETH amount) / (total eETH share amount in ether.fan) uint256 etherFanEEthShares = eETH.shares(address(this)); uint256 thresholdAmount = fanBoostThresholdEthAmount(); - if (address(this).balance >= thresholdAmount) { + if (address(this).balance >= thresholdAmount && etherFanEEthShares > 0) { uint256 mintedShare = liquidityPool.deposit{value: thresholdAmount}(address(this), address(0)); ethRewardsPerEEthShareAfterRebase += 1 ether * thresholdAmount / etherFanEEthShares; }