add todo && smartSwap event update

This commit is contained in:
owen05
2020-11-20 11:05:41 +08:00
parent 93c2270076
commit 857e4fc01a
9 changed files with 30 additions and 10 deletions

View File

@@ -31,6 +31,7 @@ contract DVMFunding is DVMVault {
}
// case 3. normal case
if (baseReserve > 0 && quoteReserve > 0) {
//TODO: (Route合约配合实现)
uint256 baseInputRatio = DecimalMath.divFloor(baseInput, baseReserve);
uint256 quoteInputRatio = DecimalMath.divFloor(quoteInput, quoteReserve);
uint256 mintRatio = baseInputRatio > quoteInputRatio ? quoteInputRatio : baseInputRatio;

View File

@@ -61,6 +61,7 @@ contract DVMStorage is InitializableOwnable, ReentrancyGuard {
// ============ Setting Functions ============
//TODO: owner权限问题论证
function setLpFeeRateModel(address newLpFeeRateModel) external onlyOwner {
_LP_FEE_RATE_MODEL_ = IFeeRateModel(newLpFeeRateModel);
}

View File

@@ -49,6 +49,7 @@ contract DVMTrader is DVMVault {
{
uint256 baseInput = getBaseInput();
uint256 mtFee;
//TODO:tx.origin 的潜在风险,直接写to
(receiveQuoteAmount, mtFee) = querySellBase(tx.origin, baseInput);
_transferQuoteOut(to, receiveQuoteAmount);
_transferQuoteOut(_MAINTAINER_, mtFee);