annotation && v2proxy add gasreturn and trade incentive && proxyV2 incentive test

This commit is contained in:
owen05
2021-01-08 17:19:23 +08:00
parent 267ad24edc
commit 34d9ccf668
33 changed files with 537 additions and 90 deletions

View File

@@ -12,6 +12,12 @@ import {IFeeRateModel} from "../../lib/FeeRateModel.sol";
import {IERC20} from "../../intf/IERC20.sol";
import {DPPTrader} from "./DPPTrader.sol";
/**
* @title DODO PrivatePool
* @author DODO Breeder
*
* @notice DODOPrivatePool initialization
*/
contract DPP is DPPTrader {
function init(
address owner,

View File

@@ -12,13 +12,19 @@ import {IDPP} from "../intf/IDPP.sol";
import {IDODOApprove} from "../../intf/IDODOApprove.sol";
import {InitializableOwnable} from "../../lib/InitializableOwnable.sol";
/**
* @title DPPAdmin
* @author DODO Breeder
*
* @notice Admin of DODOPrivatePool
*/
contract DPPAdmin is InitializableOwnable {
address public _DPP_;
address public _OPERATOR_;
address public _DODO_APPROVE_;
uint256 public _FREEZE_TIMESTAMP_;
modifier notFreezed() {
require(block.timestamp >= _FREEZE_TIMESTAMP_, "ADMIN_FREEZED");
_;
@@ -36,7 +42,6 @@ contract DPPAdmin is InitializableOwnable {
_DODO_APPROVE_ = dodoApprove;
}
//For Rebase Token
function sync() external notFreezed onlyOwner {
IDPP(_DPP_).ratioSync();
}

View File

@@ -16,12 +16,6 @@ import {IFeeRateModel} from "../../lib/FeeRateModel.sol";
import {IERC20} from "../../intf/IERC20.sol";
import {PMMPricing} from "../../lib/PMMPricing.sol";
/**
* @title Storage
* @author DODO Breeder
*
* @notice Local Variables
*/
contract DPPStorage is InitializableOwnable, ReentrancyGuard {
using SafeMath for uint256;

View File

@@ -25,8 +25,6 @@ interface IDPP {
//=========== admin ==========
function ratioSync() external;
//==============================
function retrieve(
address payable to,
address token,