DODO V2’s DODO Private Pool (DPP) is a highly customizable solution catered towards market makers who wish to operate their own liquidity pools.
With DPP, pool operators have complete freedom to customize their market-making experience on DODO, by configuring and modifying the following parameters:
- Trading fee rate
- External oracle feed price, i, and
- Price curve slippage coefficient, k
In addition, DPP also supports dynamic adjustment of the amount of capital in the pool. All these configurations and modifications can be made against smart contracts on-chain in a fully decentralized, permissionless manner.
In order to make changes to their pools, pool operators will need to invoke the
resetDODOPrivatePool function in the
DODO V2Proxy02 contract (refer to the “Deployment Information” pages or the Appendix for contract addresses). See below for
resetDODOPrivatePool’s function declaration.
dppAddress: The DPP pool’s contract address
paramList: An array of
uint256containing three parameters, namely:
paramList: The first parameter is
newLpFeeRate, which is the new trading fee rate that the pool will have after the function invocation. Decimals: 18, Range: [0, 1e18], where 0 represents 0% and 1e18 represents 100%.
paramList: The second parameter is
newI, which is the new oracle feed price (i) that the pool will have after the function invocation. The oracle feed price is the baseToken price/quoteToken price ratio. Decimals: 18 - baseToken’s decimals + quoteToken’s decimals.
paramList: The third parameter is
newK, which is the new slippage coefficient (k) that the pool’s price curve will have after the function invocation. The slippage coefficient dictates how “bent” the price curve is. Decimals: 18, Range: [0, 1e18], where 0 represents a horizontal line as a price curve, and 1e18 represents a Uniswap-like, constant-product AMM price curve.
amountList: An array of
uint256containing the following parameters in order:
quoteOutAmount. Decimals for each of these parameters conform to the token decimals they represent, i.e.,
quoteInAmounthas the same number of decimals as
quoteInAmountrepresent the number of base tokens and quote tokens being added to the DPP pool, respectively. NOTE: Before adding these tokens, the function invoker must give token spend permissions to the
DODOApprovecontract (refer to the “Deployment Information” pages or the Appendix for contract addresses).
quoteOutAmountrepresent the number of base tokens and quote tokens being removed from the DPP pool, respectively.
uint8used to flag whether wrapping/unwrapping is required for ETH
0: base and quote tokens are both ERC-20
1: base token being added to the pool is ETH, so the contract will wrap ETH into WETH
2: quote token being added to the pool is ETH, so the contract will wrap ETH into WETH
3: base token being removed from the pool is WETH, so the contract will unwrap WETH into ETH
4: quote token being removed from the pool is WETH, so the contract will unwrap WETH into ETH
uint256used to reduce arbitrage opportunities for frontrunners and minimize risk. When the function invoker wants to modify parameters and submits the transaction for processing, the token price for the pool may change. This change opens a window for frontrunning bots to come in and perform arbitrage trading. With
minQuoteReserveset, if after an on-chain transaction will cause the number of base tokens in the pool to go below
minBaseReserveor the number of quote tokens in the pool to go below
minQuoteReserve, the contract will revert this transaction, thus reducing arbitrage risk.
uint256. The transaction will revert if this timestamp is exceeded.
DODOV2Proxy Deployment Information
- ETH: 0xa356867fDCEa8e71AEaF87805808803806231FdC
- BSC: 0x8F8Dd7DB1bDA5eD3da8C9daf3bfa471c12d58486
- HECO: 0xAc7cC7d2374492De2D1ce21e2FEcA26EB0d113e7
DODOApprove Deployment Information
- ETH: 0xCB859eA579b28e02B87A1FDE08d087ab9dbE5149
- BSC: 0xa128Ba44B2738A558A1fdC06d6303d52D3Cef8c1
- HECO: 0x68b6c06Ac8Aa359868393724d25D871921E97293