fix DVM test
This commit is contained in:
@@ -88,4 +88,14 @@ contract DVMStorage is InitializableOwnable, ReentrancyGuard {
|
||||
function setSell(bool open) external onlyOwner {
|
||||
_SELLING_CLOSE_ = !open;
|
||||
}
|
||||
|
||||
// ============ View Functions ============
|
||||
|
||||
function getLpFeeRate(address trader) external view returns (uint256 feeRate) {
|
||||
return _LP_FEE_RATE_MODEL_.getFeeRate(trader);
|
||||
}
|
||||
|
||||
function getMtFeeRate(address trader) external view returns (uint256 feeRate) {
|
||||
return _MT_FEE_RATE_MODEL_.getFeeRate(trader);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,8 +52,8 @@ library DODOMath {
|
||||
c=-kQ0^2
|
||||
and Q2=(-b+sqrt(b^2+4(1-k)kQ0^2))/2(1-k)
|
||||
note: another root is negative, abondan
|
||||
if deltaBSig=true, then Q2>Q1
|
||||
if deltaBSig=false, then Q2<Q1
|
||||
if deltaBSig=true, then Q2>Q1, user sell Q and receive B
|
||||
if deltaBSig=false, then Q2<Q1, user sell B and receive Q
|
||||
return |Q1-Q2|
|
||||
*/
|
||||
function _SolveQuadraticFunctionForTrade(
|
||||
|
||||
@@ -207,7 +207,7 @@ library PMMPricing {
|
||||
state.B,
|
||||
DecimalMath.divFloor(payQuoteAmount, state.i),
|
||||
false,
|
||||
state.i
|
||||
state.K
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user