add todo && smartSwap event update
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user