From 6f8e99cae8ef3faeb8a90a69da54105db38d57e2 Mon Sep 17 00:00:00 2001 From: Attens1423 Date: Wed, 3 Jan 2024 18:16:27 +0800 Subject: [PATCH] fix dsp init quote check --- contracts/DODOStablePool/impl/DSPFunding.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/contracts/DODOStablePool/impl/DSPFunding.sol b/contracts/DODOStablePool/impl/DSPFunding.sol index 9c1c47b..dbda0cf 100644 --- a/contracts/DODOStablePool/impl/DSPFunding.sol +++ b/contracts/DODOStablePool/impl/DSPFunding.sol @@ -44,6 +44,7 @@ contract DSPFunding is DSPVault { // But May Happen,reserve >0 But totalSupply = 0 if (totalSupply == 0) { // case 1. initial supply + require(quoteBalance > 0, "ZERO_QUOTE_AMOUNT"); shares = quoteBalance < DecimalMath.mulFloor(baseBalance, _I_) ? DecimalMath.divFloor(quoteBalance, _I_) : baseBalance;