0 txs
85 calls
constructor
No constructor.
functions
_BASE_PRICE_CUMULATIVE_LAST_
viewfunction _BASE_PRICE_CUMULATIVE_LAST_() view returns (uint256)
_BASE_RESERVE_
viewfunction _BASE_RESERVE_() view returns (uint112)
_BASE_TARGET_
viewfunction _BASE_TARGET_() view returns (uint112)
_BASE_TOKEN_
viewfunction _BASE_TOKEN_() view returns (address)
_BLOCK_TIMESTAMP_LAST_
viewfunction _BLOCK_TIMESTAMP_LAST_() view returns (uint32)
_I_
viewfunction _I_() view returns (uint128)
_IS_OPEN_TWAP_
viewfunction _IS_OPEN_TWAP_() view returns (bool)
_K_
viewfunction _K_() view returns (uint64)
_LP_FEE_RATE_
viewfunction _LP_FEE_RATE_() view returns (uint64)
_MAINTAINER_
viewfunction _MAINTAINER_() view returns (address)
_MT_FEE_RATE_MODEL_
viewfunction _MT_FEE_RATE_MODEL_() view returns (address)
_NEW_OWNER_
viewfunction _NEW_OWNER_() view returns (address)
_OWNER_
viewfunction _OWNER_() view returns (address)
_QUOTE_RESERVE_
viewfunction _QUOTE_RESERVE_() view returns (uint112)
_QUOTE_TARGET_
viewfunction _QUOTE_TARGET_() view returns (uint112)
_QUOTE_TOKEN_
viewfunction _QUOTE_TOKEN_() view returns (address)
_RState_
viewfunction _RState_() view returns (uint32)
getBaseInput
viewfunction getBaseInput() view returns (uint256 input)
getMidPrice
viewfunction getMidPrice() view returns (uint256 midPrice)
getPMMState
viewfunction getPMMState() view returns (tuple state)
getPMMStateForCall
viewfunction getPMMStateForCall() view returns (uint256 i, uint256 K, uint256 B, uint256 Q, uint256 B0, uint256 Q0, uint256 R)
getQuoteInput
viewfunction getQuoteInput() view returns (uint256 input)
getUserFeeRate
viewfunction getUserFeeRate(address user) view returns (uint256 lpFeeRate, uint256 mtFeeRate)
getVaultReserve
viewfunction getVaultReserve() view returns (uint256 baseReserve, uint256 quoteReserve)
querySellBase
viewfunction querySellBase(address trader, uint256 payBaseAmount) view returns (uint256 receiveQuoteAmount, uint256 mtFee, uint8 newRState, uint256 newBaseTarget)
querySellQuote
viewfunction querySellQuote(address trader, uint256 payQuoteAmount) view returns (uint256 receiveBaseAmount, uint256 mtFee, uint8 newRState, uint256 newQuoteTarget)
version
purefunction version() pure returns (string)
claimOwnership
nonpayablefunction claimOwnership()
flashLoan
nonpayablefunction flashLoan(uint256 baseAmount, uint256 quoteAmount, address assetTo, bytes data)
init
nonpayablefunction init(address owner, address maintainer, address baseTokenAddress, address quoteTokenAddress, uint256 lpFeeRate, address mtFeeRateModel, uint256 k, uint256 i, bool isOpenTWAP)
initOwner
nonpayablefunction initOwner(address newOwner)
ratioSync
nonpayablefunction ratioSync()
reset
nonpayablefunction reset(address assetTo, uint256 newLpFeeRate, uint256 newI, uint256 newK, uint256 baseOutAmount, uint256 quoteOutAmount, uint256 minBaseReserve, uint256 minQuoteReserve) returns (bool)
retrieve
nonpayablefunction retrieve(address to, address token, uint256 amount)
sellBase
nonpayablefunction sellBase(address to) returns (uint256 receiveQuoteAmount)
sellQuote
nonpayablefunction sellQuote(address to) returns (uint256 receiveBaseAmount)
transferOwnership
nonpayablefunction transferOwnership(address newOwner)
tuneParameters
nonpayablefunction tuneParameters(uint256 newLpFeeRate, uint256 newI, uint256 newK, uint256 minBaseReserve, uint256 minQuoteReserve) returns (bool)
tunePrice
nonpayablefunction tunePrice(uint256 newI, uint256 minBaseReserve, uint256 minQuoteReserve) returns (bool)
events
DODOFlashLoan
event DODOFlashLoan(address borrower, address assetTo, uint256 baseAmount, uint256 quoteAmount)
DODOSwap
event DODOSwap(address fromToken, address toToken, uint256 fromAmount, uint256 toAmount, address trader, address receiver)
LpFeeRateChange
event LpFeeRateChange(uint256 newLpFeeRate)
OwnershipTransferPrepared
event OwnershipTransferPrepared(address indexed previousOwner, address indexed newOwner)
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
RChange
event RChange(uint8 newRState)
errors
No errors.
creation bytecode
0x3d602d80600a3d3981f3363d3d373d3d3d363d73acf0cc10874304923ecec40df8616025ba62a0335af43d82803e903d91602b57fd5bf3