fix dsp init quote check

This commit is contained in:
Attens1423
2024-01-03 18:16:27 +08:00
parent 14efeca42b
commit 6f8e99cae8

View File

@@ -44,6 +44,7 @@ contract DSPFunding is DSPVault {
// But May Happenreserve >0 But totalSupply = 0 // But May Happenreserve >0 But totalSupply = 0
if (totalSupply == 0) { if (totalSupply == 0) {
// case 1. initial supply // case 1. initial supply
require(quoteBalance > 0, "ZERO_QUOTE_AMOUNT");
shares = quoteBalance < DecimalMath.mulFloor(baseBalance, _I_) shares = quoteBalance < DecimalMath.mulFloor(baseBalance, _I_)
? DecimalMath.divFloor(quoteBalance, _I_) ? DecimalMath.divFloor(quoteBalance, _I_)
: baseBalance; : baseBalance;