fix dsp init quote check
This commit is contained in:
@@ -44,6 +44,7 @@ contract DSPFunding is DSPVault {
|
|||||||
// But May Happen,reserve >0 But totalSupply = 0
|
// But May Happen,reserve >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;
|
||||||
|
|||||||
Reference in New Issue
Block a user