# Table of Contents - [ What is DODO? - DODO Docs](#-what-is-dodo-dodo-docs) - [ DODO Media Kit - DODO Docs](#-dodo-media-kit-dodo-docs) - [ DODO Research - DODO Docs](#-dodo-research-dodo-docs) - [ Terms of Service - DODO Docs](#-terms-of-service-dodo-docs) - [FAQ - DODO Docs](#faq-dodo-docs) - [ Join Community - DODO Docs](#-join-community-dodo-docs) - [ 什么是DODO? - DODO 文档中心](#-dodo-dodo-) - [ DODO研究 - DODO 文档中心](#-dodo-dodo-) - [ DODO 媒体包 - DODO 文档中心](#-dodo-dodo-) - [ 服务条款 - DODO 文档中心](#-dodo-) - [ DIP Record - DODO Docs](#-dip-record-dodo-docs) - [常见问题 - DODO 文档中心](#-dodo-) - [开发者文档中心 - DODO 文档中心](#-dodo-) - [ PMM Algorithm - DODO Docs](#-pmm-algorithm-dodo-docs) - [教程 - DODO 文档中心](#-dodo-) - [ 路线图 - DODO 文档中心](#-dodo-) - [ What is DODO V3? - DODO Docs](#-what-is-dodo-v3-dodo-docs) - [ PMM算法 - DODO 文档中心](#-pmm-dodo-) - [ 安全审计 - DODO 文档中心](#-dodo-) - [ DIP记录 - DODO 文档中心](#-dip-dodo-) - [ Fees - DODO Docs](#-fees-dodo-docs) - [如何通过Starter功能参与项目? - DODO 文档中心](#-starter-dodo-) - [DODO Toolbox - DODO Docs](#dodo-toolbox-dodo-docs) - [ DODO V2: A Leap Forward in Decentralization - DODO Docs](#-dodo-v2-a-leap-forward-in-decentralization-dodo-docs) - [ 费用 - DODO 文档中心](#-dodo-) - [ 仪表盘 - DODO 文档中心](#-dodo-) - [ DODO V1: The First Step of DODO - DODO Docs](#-dodo-v1-the-first-step-of-dodo-dodo-docs) - [ DODO 合约 - DODO 文档中心](#-dodo-dodo-) - [ Security Audits - DODO Docs](#-security-audits-dodo-docs) - [DODO 工具箱 - DODO 文档中心](#dodo-dodo-) - [ DODO V2:去中心化的一大进步 - DODO 文档中心](#-dodo-v2-dodo-) - [如何切换并连接到不同的网络? - DODO 文档中心](#-dodo-) - [ 什么是DODO V3? - DODO 文档中心](#-dodo-v3-dodo-) - [ DODO Token - DODO Docs](#-dodo-token-dodo-docs) - [ 加入社群 - DODO 文档中心](#-dodo-) - [ DODO代币 - DODO 文档中心](#-dodo-dodo-) - [如何进行跨链交易? - DODO 文档中心](#-dodo-) - [如何参加Crowdpooling活动? - DODO 文档中心](#-crowdpooling-dodo-) - [如何成为DODO V3策略提供者(SP)? - DODO 文档中心](#-dodo-v3-sp-dodo-) - [如何参与流动性挖矿? - DODO 文档中心](#-dodo-) - [如何添加流动性? - DODO 文档中心](#-dodo-) - [如何创建挖矿活动? - DODO 文档中心](#-dodo-) - [如何交换代币? - DODO 文档中心](#-dodo-) - [ DODO V1: DODO的第一步 - DODO 文档中心](#-dodo-v1-dodo-dodo-) - [Developer Docs Center - DODO Docs](#developer-docs-center-dodo-docs) - [ Roadmap - DODO Docs](#-roadmap-dodo-docs) - [如何创建流动性池? - DODO 文档中心](#-dodo-) - [如何创建代币? - DODO 文档中心](#-dodo-) - [如何创建一个众筹池? - DODO 文档中心](#-dodo-) - [Tuorial - DODO Docs](#tuorial-dodo-docs) - [ DODO X: A Pioneering Product for Superior Trading Experience - DODO Docs](#-dodo-x-a-pioneering-product-for-superior-trading-experience-dodo-docs) - [ DODO X:卓越交易体验的先锋产品 - DODO 文档中心](#-dodo-x-dodo-) - [DODO开发者门户网站 - DODO 文档中心](#dodo-dodo-) - [How to participate in projects through the Starter function? - DODO Docs](#how-to-participate-in-projects-through-the-starter-function-dodo-docs) - [How to switch and connect to different networks? - DODO Docs](#how-to-switch-and-connect-to-different-networks-dodo-docs) - [How to conduct cross-chain transactions? - DODO Docs](#how-to-conduct-cross-chain-transactions-dodo-docs) - [Trading Widget - DODO Docs](#trading-widget-dodo-docs) - [How to create a liquidity pool? - DODO Docs](#how-to-create-a-liquidity-pool-dodo-docs) - [How to create tokens? - DODO Docs](#how-to-create-tokens-dodo-docs) - [How to create a crowdpooling event? - DODO Docs](#how-to-create-a-crowdpooling-event-dodo-docs) - [ API - DODO 文档中心](#-api-dodo-) - [DODO Developer Portal - DODO Docs](#dodo-developer-portal-dodo-docs) - [Web3 数据 - DODO 文档中心](#web3-dodo-) - [桥梁与流动性来源 - DODO 文档中心](#-dodo-) - [Bridge & Liquidity Sources - DODO Docs](#bridge-liquidity-sources-dodo-docs) - [限价订单 - DODO 文档中心](#-dodo-) - [智能交易 - DODO 文档中心](#-dodo-) - [跨链交易 - DODO 文档中心](#-dodo-) - [Introduction - DODO Docs](#introduction-dodo-docs) - [Widget配置中心 - DODO 文档中心](#widget-dodo-) - [Web3 Data - DODO Docs](#web3-data-dodo-docs) - [Cross Chain Trading - DODO Docs](#cross-chain-trading-dodo-docs) - [ API - DODO Docs](#-api-dodo-docs) - [Limit Order - DODO Docs](#limit-order-dodo-docs) - [介绍 - DODO 文档中心](#-dodo-) - [Getting Started - DODO Docs](#getting-started-dodo-docs) - [How to join a crowdpooling event? - DODO Docs](#how-to-join-a-crowdpooling-event-dodo-docs) - [How to become a DODO V3 strategy provider(SP)? - DODO Docs](#how-to-become-a-dodo-v3-strategy-provider-sp-dodo-docs) - [How to participate in liquidity mining? - DODO Docs](#how-to-participate-in-liquidity-mining-dodo-docs) - [How to add liquidity? - DODO Docs](#how-to-add-liquidity-dodo-docs) - [ DODO Contracts - DODO Docs](#-dodo-contracts-dodo-docs) - [How to swap tokens? - DODO Docs](#how-to-swap-tokens-dodo-docs) - [How to create a mining campaign? - DODO Docs](#how-to-create-a-mining-campaign-dodo-docs) - [交易小部件 - DODO 文档中心](#-dodo-) - [ Dashboard - DODO Docs](#-dashboard-dodo-docs) - [ DODO V1/V2 - DODO Docs](#-dodo-v1-v2-dodo-docs) - [ DODO V1/V2 - DODO 文档中心](#-dodo-v1-v2-dodo-) - [Smart Trade - DODO Docs](#smart-trade-dodo-docs) - [Quick Start - DODO Docs](#quick-start-dodo-docs) - [ 合约地址 - DODO 文档中心](#-dodo-) - [FAQ - DODO Docs](#faq-dodo-docs) - [Profit-Sharing Instructions - DODO Docs](#profit-sharing-instructions-dodo-docs) - [快速开始 - DODO 文档中心](#-dodo-) - [Listening to Contract Events - DODO Docs](#listening-to-contract-events-dodo-docs) - [ Contract Addresses - DODO Docs](#-contract-addresses-dodo-docs) - [Widget Config - DODO Docs](#widget-config-dodo-docs) - [Widget配置 - DODO 文档中心](#widget-dodo-) - [🦄 DODO AMM V2/V3 - DODO Docs](#-dodo-amm-v2-v3-dodo-docs) - [Widget Config Center - DODO Docs](#widget-config-center-dodo-docs) - [开始入门 - DODO 文档中心](#-dodo-) - [盈利分享指南 - DODO 文档中心](#-dodo-) - [DODO V1/V2 Integration Guide - DODO Docs](#dodo-v1-v2-integration-guide-dodo-docs) - [ DODO V2 Contract Framework - DODO Docs](#-dodo-v2-contract-framework-dodo-docs) - [DODO V1/V2 集成指南 - DODO 文档中心](#dodo-v1-v2-dodo-) - [ Guides - DODO Docs](#-guides-dodo-docs) - [ DODO V2 合约框架 - DODO 文档中心](#-dodo-v2-dodo-) - [ V1/V2合约地址 - DODO 文档中心](#-v1-v2-dodo-) - [ V1/V2 Contract Addresses - DODO Docs](#-v1-v2-contract-addresses-dodo-docs) - [ 指南 - DODO 文档中心](#-dodo-) - [How to find all the DODO pools? - DODO Docs](#how-to-find-all-the-dodo-pools-dodo-docs) - [DuneAnalytics - DODO Docs](#duneanalytics-dodo-docs) - [🦄 DODO AMM V2/V3 - DODO 文档中心](#-dodo-amm-v2-v3-dodo-) - [Subgraphs - DODO Docs](#subgraphs-dodo-docs) - [DODO V3 - DODO Docs](#dodo-v3-dodo-docs) - [DODO V3 - DODO 文档中心](#dodo-v3-dodo-) - [常见问题解答 - DODO 文档中心](#-dodo-) - [ V3合约地址 - DODO 文档中心](#-v3-dodo-) - [监听合约事件 - DODO 文档中心](#-dodo-) - [ V3 Contract Addresses - DODO Docs](#-v3-contract-addresses-dodo-docs) - [DODO AMM V2/V3 Integration Guide - DODO Docs](#dodo-amm-v2-v3-integration-guide-dodo-docs) - [DuneAnalytics - DODO 文档中心](#duneanalytics-dodo-) - [subgraph - DODO 文档中心](#subgraph-dodo-) - [DODO AMM V2/V3 集成指南 - DODO 文档中心](#dodo-amm-v2-v3-dodo-) - [D3Pool - DODO Docs](#d3pool-dodo-docs) - [Periphery - DODO Docs](#periphery-dodo-docs) - [D3Vault - DODO Docs](#d3vault-dodo-docs) - [DODO V3 Integration Guide - DODO Docs](#dodo-v3-integration-guide-dodo-docs) - [如何找到所有的DODO池? - DODO 文档中心](#-dodo-dodo-) - [D3Pool - DODO 文档中心](#d3pool-dodo-) - [D3Vault - DODO 文档中心](#d3vault-dodo-) - [外围 - DODO 文档中心](#-dodo-) - [DODO V3 集成指南 - DODO 文档中心](#dodo-v3-dodo-) - [流动性参数结构 - DODO 文档中心](#-dodo-) - [Liquidity Parameter Structure - DODO Docs](#liquidity-parameter-structure-dodo-docs) - [Core - DODO 文档中心](#core-dodo-) - [Lib - DODO 文档中心](#lib-dodo-) --- # What is DODO? - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🐥 What is DODO? ================ DODO stands at the forefront of decentralized cryptocurrency exchanges, revolutionizing the way you interact with liquidity. We are your ultimate liquidity partner, offering you the means to create, find, and harness liquidity with ease. In an age where financial autonomy and transparency are of utmost importance, DODO sets itself apart by empowering users to take full control of their assets. Core Principles[#](https://docs.dodoex.io/en/home/what-is-dodo#core-principles) -------------------------------------------------------------------------------- * Decentralization & Trust: At its core, DODO is built on decentralization principles. It operates as a peer-to-peer system, ensuring that your assets remain securely under your control. * Transparency & Security: With a foundation built on blockchain technology, DODO offers complete transparency. Our commitment to security is second to none, backed by rigorous audits and significant investments to bolster our defenses. This dedication extends our compatibility across most EVM chains. Your Path to Liquidity[#](https://docs.dodoex.io/en/home/what-is-dodo#your-path-to-liquidity) ---------------------------------------------------------------------------------------------- DODO's innovative Proactive Market Maker (PMM) algorithm takes center stage, presenting three distinct versions: V1, V2, and V3, each catering to a diverse range of liquidity requirements. Whether you're focused on stablecoins, mainstream cryptocurrencies, or introducing new tokens to the market, DODO simplifies the path to liquidity creation. Our user-centric toolkit further streamlines the process. Even without any coding expertise, users can effortlessly navigate our platform. With just a few clicks, you can undertake tasks like token creation, fundraising, liquidity mining, and more. Introducing DODOX: Elevate Your Trading Experience[#](https://docs.dodoex.io/en/home/what-is-dodo#introducing-dodox--elevate-your-trading-experience) ------------------------------------------------------------------------------------------------------------------------------------------------------ As DODO evolved, we acknowledged the unique challenges of discovering liquidity and facilitating seamless trades in a multi-chain environment. This realization gave birth to DODOX, dedicated to addressing these vital dimensions. 1. Revolutionizing Liquidity Search: Navigating the vast ocean of liquidity pools can be overwhelming. DODOX simplifies this with cutting-edge algorithms and integrations. By connecting with prominent liquidity sources such as Uniswap, Curve, and PancakeSwap, and comparing prices across top-tier aggregators like 1inch and 0x, DODOX ensures that users always secure the most competitive rates. Additionally, DODOX offers a trading API and widget for developers seeking seamless integration. 2. Optimized Trading: Trading should be seamless, efficient, and profitable. DODOX offers a user-centric trading experience, whether you're conducting a same-chain or cross-chain swap. With our slippage forecast system and limit order feature, users are empowered to trade with the highest transaction success rate and under ideal conditions. Beyond the Exchange: DODO Research[#](https://docs.dodoex.io/en/home/what-is-dodo#beyond-the-exchange--dodo-research) ---------------------------------------------------------------------------------------------------------------------- Dive deep into the crypto realm with DODO Research. Our dedicated team is committed to providing objective and insightful analyses, covering both DODO-centric news and broader crypto trends. Here is our [Content Gallery](https://www.notion.so/Dr-DODO-is-Researching-6c18bbca8ea0465ab94a61ff5d2d7682?pvs=21) . You can also follow us on Twitter at [@DodoResearch](https://twitter.com/DodoResearch) . Our DM is open! We welcome any insights. --- # DODO Media Kit - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🎨 DODO Media Kit ================= [DODO Logo](https://drive.google.com/drive/folders/1qRn6Yqz3KllhdGy70wOY52fZ2g2ejQVT?usp=drive_link) [#](https://docs.dodoex.io/en/home/media-kit#dodo-logo) ------------------------------------------------------------------------------------------------------------------------------------------------------------- ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FDODO-Logo3.2f3dc6ef.png&w=1920&q=75) [DODO Illustration](https://drive.google.com/drive/folders/15XiV28_f5c6YTnZqxGcA8u8PCDgi6REn?usp=drive_link) [#](https://docs.dodoex.io/en/home/media-kit#dodo-illustration) ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FDODO-Illustration.6c326ab4.png&w=3840&q=75) [DODO Pattern](https://drive.google.com/drive/folders/1GFEMpckaqIZ7OvcZ-eLkTGbG1ijdDscp?usp=drive_link) [#](https://docs.dodoex.io/en/home/media-kit#dodo-pattern) ------------------------------------------------------------------------------------------------------------------------------------------------------------------- ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FDODO-Pattern.72003f28.png&w=3840&q=75) --- # DODO Research - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🔭 DODO Research ================ We delve deep into various aspects of the crypto world, providing insights, analytics, and updates. Our main goal is to inform and help the community navigate the ever-evolving blockchain landscape. Here is our [Content Gallery](https://www.notion.so/Dr-DODO-is-Researching-6c18bbca8ea0465ab94a61ff5d2d7682?pvs=21) . We’ve initiated several sections or channels to cater to different interests: * DexWeeklyBrief: we have the latest updates on DEXs, focusing on industry updates, trading volume, and market share changes of key products. * Cryptosnap: This is where we cover the latest crypto news, giving a quick snapshot of what’s trending. * Datacheck: Here, we focus on on-chain analytics, diving deep into data to extract meaningful insights. * Opinions: This section is more for research-oriented articles and opinions, where we share our thoughts on various topics. * MaybeAlpha: We analyze different projects in-depth, providing a comprehensive overview for our followers. You can also follow us on Twitter at [@DodoResearch](https://twitter.com/DodoResearch) . Our DM is open! We welcome any insights. eMail:[\[email protected\]](https://docs.dodoex.io/cdn-cgi/l/email-protection#a3c7ccc7cccacdc4d1c6d0c6c2d1c0cbe3c4cec2cacf8dc0ccce) --- # Terms of Service - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 📄 Terms of Service =================== Welcome to DODO (the "App"), a website application by DODO, Inc. (together with all affiliates, "DODO," "we," "us"). The App allows users to swap certain digital tokens using a variety of different smart contract protocols on the Ethereum Blockchain. This Terms of Service Agreement (the "Agreement") explains the terms and conditions that govern your access to and use of the App. Please read the Agreement carefully. By accessing the App, you accept and agree to be bound by and to comply with the Agreement, including the mandatory arbitration provision in Section 15. If you do not agree to the terms of the Agreement, you must not access or use the App. 1\. ELIGIBILITY[#](https://docs.dodoex.io/en/home/terms-of-service#1--eligibility) ----------------------------------------------------------------------------------- To be eligible to access and use the App, you must be at least 18 years old (or the age of majority where you reside, whichever is older), and must not be barred from using the App under applicable law. In addition, you must be able to form a legally binding contract online either on behalf of a company or as an individual. If you are agreeing to the Agreement on behalf of a company or other legal entity, you represent that you have the legal authority to bind the company or other legal entity to the terms of the Agreement, can form a legally binding contract online, and have the full right, power, and authority to enter into and to comply with the obligations under the Agreement. Additionally, by accessing the App, you represent and warrant that you are not subject to sanctions by the United States, and are not a citizen or resident of a state, country, territory, or other jurisdiction that is embargoed by the United States or where your use of the App would be illegal or otherwise violate any domestic or foreign law, rule, statute, or regulation (“Applicable Law”). ### Prohibited Localities[#](https://docs.dodoex.io/en/home/terms-of-service#prohibited-localities) You are not permitted to access or use the App or any of its services, including dododex and dodochain, if you are located in, established in, or a resident of the following regions or countries: **China, the United States (including its territories: American Samoa, Guam, Puerto Rico, Northern Mariana Islands, and the U.S. Virgin Islands), Belarus, Cuba, Crimea Region, Democratic Republic of Congo, Iran, Iraq, New Zealand, North Korea, South Sudan, Sudan, Syria, Zimbabwe.** IP addresses from these regions are prohibited from accessing dododex and dodochain services. ### Sanctions and Restricted Persons[#](https://docs.dodoex.io/en/home/terms-of-service#sanctions-and-restricted-persons) By using or accessing the App, you represent to us that you are not subject to the Sanction Lists and are not a “Restricted Person” as defined in these terms. “Sanction Lists” include any sanctions designations published by international organizations, the United Nations, the European Union, and its Member States, or any state and governmental authorities, including but not limited to the sanctions lists of the United States and the United Kingdom. ### Non-Circumvention[#](https://docs.dodoex.io/en/home/terms-of-service#non-circumvention) You agree not to use any software, technology, or networking techniques, including a Virtual Private Network (VPN), to circumvent or attempt to circumvent these restrictions. Any attempt to bypass these restrictions will result in the immediate suspension or termination of your access to the App. We reserve the right to limit access to the App in any jurisdiction at any time and at our sole discretion. Furthermore, we may suspend, restrict, or terminate your access to any or all of the features on the App, and/or block or bar any transactions of yours if: * (a) We are required to do so by a subpoena, court order, or binding order of a government authority, or under any applicable laws and regulations; * (b) You breach this Agreement, including engaging in prohibited activities; * (c) We determine to do so for any legal or regulatory reasons at our sole discretion. 2\. MODIFICATIONS TO THESE TERMS[#](https://docs.dodoex.io/en/home/terms-of-service#2--modifications-to-these-terms) --------------------------------------------------------------------------------------------------------------------- We reserve the right, in our sole discretion, to modify the Agreement at any time. If we make changes, we will provide you with notice of such changes by sending an email, providing a notice through the App or updating the date at the top of this Agreement. Unless we say otherwise in our notice, any modifications are effective immediately, and your continued use of the App will confirm your acceptance of the changes. If you do not agree to the amended Agreement, you must stop using the App. 3\. PROPRIETARY RIGHTS[#](https://docs.dodoex.io/en/home/terms-of-service#3--proprietary-rights) ------------------------------------------------------------------------------------------------- We do not claim any ownership rights in any content that users (including you) provide to be made available through the App (“User Content”). You agree that you own or have all rights, title, and interest, including all intellectual property rights, in any User Content you provide to us. You hereby grant us a worldwide, non-exclusive, royalty-free, sublicensable, and transferable license to use, copy, distribute, create derivative works of, display, and perform any User Content that you upload, submit, store, or send on or through the App. Subject to the foregoing, DODO owns or is duly authorized to use all intellectual property and other rights in the App and its contents, including all text, images and trademarks displayed or provided on the App, and all App software. Unless expressly authorized by us, you may not copy, modify, adapt, rent, license, sell, publish, distribute, or otherwise permit any third party to access or use the App or any of its contents. Provided that you are eligible, and in consideration for your compliance with the terms of this Agreement, you are hereby granted a single, personal, limited license to access and use the App. This license is non-exclusive, non-transferable, and freely revocable by us at any time without notice or cause. Use of the App or its contents for any purpose not expressly permitted by this Agreement is strictly prohibited. Unlike the App software, the underlying smart contract protocols operating on the Ethereum Blockchain that facilitate trades through the App are open source software. 4\. DISCLOSURES; DISCLAIMERS[#](https://docs.dodoex.io/en/home/terms-of-service#4--disclosures--disclaimers) ------------------------------------------------------------------------------------------------------------- ### 4.1 WARRANTY DISCLAIMER[#](https://docs.dodoex.io/en/home/terms-of-service#4-1-warranty-disclaimer) To the maximum extent permitted under Applicable Law, the App (and any of its content or functionality) is provided on an “AS IS” and “AS AVAILABLE” basis, and we expressly disclaim, and you hereby waive, any representations, conditions or warranties of any kind, whether express or implied, legal, statutory or otherwise, or arising from statute, otherwise in law, course of dealing, or usage of trade, including, without limitation, the implied or legal warranties and conditions of merchantability, merchantable quality, quality or fitness for a particular purpose, title, security, availability, reliability, accuracy, quiet enjoyment and non-infringement of third party rights. Without limiting the foregoing, we do not represent or warrant that the App (including any related data) will be uninterrupted, available at any particular time or error-free. Further, we do not warrant that errors in the App are correctable or will be corrected. ### 4.2 DISCLAIMER ABOUT INFORMATION ACCURACY[#](https://docs.dodoex.io/en/home/terms-of-service#4-2-disclaimer-about-information-accuracy) You are aware that we rely on third-party sources for information about certain digital tokens listed on the App and we have the right to choose, change and remove any third-party information source at our discretion. Digital token information, including token price, is currently derived from third-party sources such as coingecko.com. We are not responsible for the quality, accuracy, timeliness, completeness or reliability of any of the digital token information on the App. You are obligated to collect sufficient information and keep yourself well informed before trading any digital tokens on the App. ### 4.3 FEATURED LISTS[#](https://docs.dodoex.io/en/home/terms-of-service#4-3-featured-lists) The appearance of digital tokens on any of the App’s featured lists is determined by various factors, including but not limited to their ranking on coingecko.com, performance on the App, and DODO’s policies of digital token listing. You understand that we do not endorse or promote any digital assets on any of the default lists. We have the right to add, change, update, or remove any digital tokens from any of the featured lists, or from the App at our sole discretion. ### 4.4 PAYMENTS AND FEES[#](https://docs.dodoex.io/en/home/terms-of-service#4-4-payments-and-fees) Transactions on Ethereum or that otherwise involve the use of an underlying blockchain or other decentralized or permissioned infrastructure (the “Distributed Ledger Technology”) require that you pay a fee, such as “gas” charges on the Ethereum network, for the computational resources required to perform a transaction on the particular Distributed Ledger Technology (such payments and fees, “Charges”). DODO does not currently charge any fees for your transactions on the App. However, we reserve the right to charge fees for your use of the App and adjust the pricing anytime. If such fees are imposed, we will notify you of the fees and pricing of your transaction when you authorize the transaction. You acknowledge and agree that DODO has no control over any Distributed Ledger Technology transactions, the method of payment of any Charges, if applicable, or any actual payments of Charges, if applicable. Accordingly, you must ensure that you have a sufficient balance of the applicable Distributed Ledger Technology network tokens stored at your Distributed Ledger Technology-compatible wallet address (“Distributed Ledger Technology Address”) to complete any transaction on the Distributed Ledger Technology before initiating such transaction. ### 4.5 CUSTODY AND CONTROL OF DIGITAL TOKENS[#](https://docs.dodoex.io/en/home/terms-of-service#4-5-custody-and-control-of-digital-tokens) You have full custody and control of the digital tokens in your digital wallets at all times. We do not custody your digital tokens and do not have access to, or retain the electronic private key of your digital wallet. As the owner and custodian of the digital tokens in your digital wallets, you shall bear all risk of loss of such digital tokens. You understand that DODO is not registered or licensed by the Commodity Futures Trading Commission, Securities and Exchange Commission, Financial Crimes Enforcement Network, or any financial regulatory authority, and that no financial regulatory authority has reviewed or approved the App. You further understand that DODO is not acting as an investment adviser or commodity trading adviser to any person, does not offer securities services in the United States or to U.S. persons, and that the contents of the App do not constitute advice or recommendations concerning any commodity, security or other asset. ### 4.6 RISKS ASSOCIATED WITH DIGITAL TOKENS[#](https://docs.dodoex.io/en/home/terms-of-service#4-6-risks-associated-with-digital-tokens) By accessing and using the App, you represent that you understand the inherent risks associated with using cryptographic and blockchain-based systems, and that you have a working knowledge of the usage and intricacies of digital tokens such as bitcoin (BTC), ether (ETH), and other digital tokens such as those following the Ethereum Token Standard (ERC-20). DODO does not control the underlying software protocols of any digital tokens accessible on the App. You agree that we are not responsible for the operation, functionality or security of the underlying protocols and not liable for any loss of token value you may encounter due to any operating change, malfunction or failure of the underlying protocols. You further understand that the markets for these digital tokens are highly volatile, and that there are risks associated with digital tokens including (but not limited to) those related to adoption, speculation, technology, security, and regulation. You acknowledge that the cost and speed of transacting with cryptographic and blockchain-based systems such as Ethereum are variable and may increase dramatically at any time. You understand and agree to assume full responsibility for all of the risks of accessing and using the App and interacting with the Ethereum Blockchain, and agree that DODO is not responsible for any loss you may experience as a result of these risks. You should be aware that anyone can create ERC20 tokens on Ethereum. We make no representation about the nature, quality, or legal categorization of the token or associated project. You are responsible for for doing your own research as well as ensuring that you may legally transact in this token in the jurisdiction where you reside. 5\. TAXES[#](https://docs.dodoex.io/en/home/terms-of-service#5--taxes) ----------------------------------------------------------------------- It is your sole responsibility to fulfill your tax obligations that apply to your transactions conducted on the App. You should withhold, collect, report and remit the correct amounts of taxes to the appropriate tax authorities. We make reasonable efforts to make your transaction history available through your account but we make no representation about the completeness or accuracy of that information. 6\. CHANGES; SUSPENSION; TERMINATION[#](https://docs.dodoex.io/en/home/terms-of-service#6--changes--suspension--termination) ----------------------------------------------------------------------------------------------------------------------------- We may, at our sole discretion, at any time and with or without prior notice to you, modify, suspend or disable, temporarily or permanently, the App, in whole or in part, for any reason whatsoever, including, but not limited to, as a result of a security incident. We will not be liable for any losses suffered by you resulting from any modification to the App or from any suspension or termination, for any reason, of your access to all or any portion of the App. All of the terms of the Agreement will survive any termination of your access to the App regardless of the reasons for its expiration or termination, in addition to any other provision which by law or by its nature should survive. 7\. ELECTRONIC NOTICES[#](https://docs.dodoex.io/en/home/terms-of-service#7--electronic-notices) ------------------------------------------------------------------------------------------------- You consent to receive all communications, agreements, documents, receipts, notices, and disclosures electronically (collectively, our “Communications”) that we provide in connection with the Agreement or the App. You agree that we may provide our Communications to you by posting them on the App. You may also contact our Legal team to request additional electronic copies of our Communications by sending a support request to [\[email protected\]](https://docs.dodoex.io/cdn-cgi/l/email-protection#e2818d8c96838196a2868d868d879acc8b8d) . 8\. INDEMNIFICATION[#](https://docs.dodoex.io/en/home/terms-of-service#8--indemnification) ------------------------------------------------------------------------------------------- You agree to hold harmless, release, defend, and indemnify us and our officers, directors, employees, contractors, agents, affiliates, and subsidiaries ("Protected Parties") from and against all claims, damages, obligations, losses, liabilities, costs and expenses arising from: (a) your access to and use of the App; (b) your violation of any term or condition of this Agreement, the right of any third party, or any other applicable law, rule, or regulation; and (c) any other party’s access and use of the App with your assistance or using any device or account that you own or control. 9\. PROHIBITED ACTIVITIES[#](https://docs.dodoex.io/en/home/terms-of-service#9--prohibited-activities) ------------------------------------------------------------------------------------------------------- You agree not to engage in, or attempt to engage in, any of the following categories of prohibited activity in relation to your access to or use of the App: ### 9.1 Intellectual Property Infringement[#](https://docs.dodoex.io/en/home/terms-of-service#9-1-intellectual-property-infringement) Activity that infringes or violates any person or entity’s copyright, trademark, service mark, patent, right of publicity, right of privacy, or other proprietary or intellectual property rights under the law. ### 9.2 Cyberattack[#](https://docs.dodoex.io/en/home/terms-of-service#9-2-cyberattack) Activity that seeks to interfere with or compromise the integrity, security or proper functioning of any computer, server, network, personal device or other information technology system, including (but not limited to) the deployment of viruses and denial of service attacks. ### 9.3 Fraud or Misrepresentation[#](https://docs.dodoex.io/en/home/terms-of-service#9-3-fraud-or-misrepresentation) Activity that seeks to defraud us or any other person or entity, including (but not limited to) providing any false, inaccurate, or misleading information in order to unlawfully obtain the property of another. ### 9.4 Market Manipulation[#](https://docs.dodoex.io/en/home/terms-of-service#9-4-market-manipulation) Activity that violates any applicable law, rule, or regulation concerning the integrity of markets, including (but not limited to) the manipulative tactics commonly known as spoofing and wash trading. ### 9.5 Gambling[#](https://docs.dodoex.io/en/home/terms-of-service#9-5-gambling) Activity that stakes or risks something of value upon the outcome of a contest of others, an event, or a game of chance, including without limitation to lotteries, bidding fee auctions, political betting, sports forecasting and sweepstakes. ### 9.6 Any Other Unlawful Conduct[#](https://docs.dodoex.io/en/home/terms-of-service#9-6-any-other-unlawful-conduct) Activity that violates any applicable law, rule, or regulation of the United States or another relevant jurisdiction, including (but not limited to) the restrictions and regulatory requirements imposed by U.S. law. 10\. EXCLUSION OF CONSEQUENTIAL AND RELATED DAMAGES[#](https://docs.dodoex.io/en/home/terms-of-service#10--exclusion-of-consequential-and-related-damages) ----------------------------------------------------------------------------------------------------------------------------------------------------------- In no event will DODO be liable for any incidental, indirect, special, punitive, exemplary, consequential or similar damages or liabilities whatsoever (including, without limitation, damages for loss of data, information, revenue, goodwill, profits or other business or financial benefit) arising out of or in connection with your use of the App, whether under contract, tort (including negligence), civil liability, statute, strict liability, breach of warranties, or under any other theory of liability, and whether or not DODO has been advised of, knew of or should have known of the possibility of such damages. 11\. LIMITATION OF LIABILITY[#](https://docs.dodoex.io/en/home/terms-of-service#11--limitation-of-liability) ------------------------------------------------------------------------------------------------------------- In no event will DODO's aggregate liability arising out of or in connection with the App (and any of its content and functionality), any performance or non-performance of DODO, Distributed Ledger Technology tokens, other digital tokens, or any other product, service or other item provided in connection with the App, whether under contract, tort (including negligence), civil liability, statute, strict liability or other theory of liability exceed the amount of fees paid by you to us in the twelve (12) month period immediately preceding the event giving rise to the claim for liability. 12\. RELEASE[#](https://docs.dodoex.io/en/home/terms-of-service#12--release) ----------------------------------------------------------------------------- To the extent permitted by applicable law, in consideration for being allowed to use the App, you hereby release and forever discharge DODO from, and hereby waive and relinquish, each and every past, present and future dispute, claim, controversy, demand, right, obligation, liability, action and cause of action of every kind and nature (including personal injuries, death, and property damage), that has arisen or arises directly or indirectly out of, or that relates directly or indirectly, to the App. YOU HEREBY WAIVE ANY APPLICABLE PROVISION IN LAW OR REGULATION IN CONNECTION WITH THE FOREGOING, INCLUDING THE PROVISIONS OF SECTION 1542 OF THE CALIFORNIA CIVIL CODE, WHICH STATES: “A GENERAL RELEASE DOES NOT EXTEND TO CLAIMS THAT THE CREDITOR OR RELEASING PARTY DOES NOT KNOW OR SUSPECT TO EXIST IN HIS OR HER FAVOR AT THE TIME OF EXECUTING THE RELEASE, AND THAT, IF KNOWN BY HIM OR HER WOULD HAVE MATERIALLY AFFECTED HIS OR HER SETTLEMENT WITH THE DEBTOR OR RELEASED PARTY.” 13\. ASSIGNMENT[#](https://docs.dodoex.io/en/home/terms-of-service#13--assignment) ----------------------------------------------------------------------------------- You may not assign any rights or licenses granted under the Agreement. We reserve the right to assign any rights and/or licenses under this Agreement without restriction, including but not limited to any DODO affiliates or subsidiaries or any successors of DODO’s business interests. 14\. FORCE MAJEURE[#](https://docs.dodoex.io/en/home/terms-of-service#14--force-majeure) ----------------------------------------------------------------------------------------- We shall not be responsible for any delay or failure in performance of the App resulted directly or indirectly from any events or circumstances beyond our reasonable control, including but not limited to, natural disaster, civil unrest, terrorism, significant market volatility and failure of Internet services, equipment or software. 15\. DISPUTE RESOLUTION AND ARBITRATION[#](https://docs.dodoex.io/en/home/terms-of-service#15--dispute-resolution-and-arbitration) ----------------------------------------------------------------------------------------------------------------------------------- Please read the following section carefully because it requires you to arbitrate certain disputes and claims with DODO and limits the manner in which you can seek relief from us, unless you opt out of arbitration by following the instructions set forth below. In addition, arbitration precludes you from suing in court or having a jury trial. You and DODO agree that any dispute arising out of or related to this Agreement is personal to you and DODO and that any dispute will be resolved solely through individual action, and will not be brought as a class arbitration, class action or any other type of representative proceeding. Except for small claims disputes in which you or DODO seeks to bring an individual action in small claims court located in the county or other applicable jurisdiction where you reside or disputes in which you or DODO seeks injunctive or other equitable relief for the alleged unlawful use of intellectual property, you and DODO waive your rights to a jury trial and to have any dispute arising out of or related to this Agreement or the App resolved in court. Instead, for any dispute or claim that you have against DODO or relating in any way to the Services, you agree to first contact DODO and attempt to resolve the claim informally by sending a written notice of your claim (“Notice”) to DODO by email at [\[email protected\]](https://docs.dodoex.io/cdn-cgi/l/email-protection#5d3e3233293c3e291d393239323825733432) . The Notice must include your name, residence address, email address, and telephone number, describe the nature and basis of the claim and set forth the specific relief sought. Our notice to you will be similar in form to that described above. If you and DODO cannot reach an agreement to resolve the claim within thirty (30) days after such Notice is received, then either party may submit the dispute to binding arbitration administered by the JAMS, or, under the limited circumstances set forth above, in court. All disputes submitted to JAMS will be resolved through confidential, binding arbitration before one arbitrator. Arbitration proceedings will be held in San Francisco, California, in accordance with the JAMS Comprehensive Arbitration Rules & Procedures (“JAMS Rules”). The most recent version of the JAMS Rules are available on the JAMS Site and are hereby incorporated by reference. You either acknowledge and agree that you have read and understand the JAMS Rules or waive your opportunity to read the JAMS Rules and waive any claim that the JAMS Rules are unfair or should not apply for any reason. You and DODO agree that the enforceability of this Section 15 will be substantively and procedurally governed by the Federal Arbitration Act, 9 U.S.C. § 1, et seq. (the “FAA”), to the maximum extent permitted by applicable law. As limited by the FAA, these Terms and the AAA Rules, the arbitrator will have exclusive authority to make all procedural and substantive decisions regarding any dispute and to grant any remedy that would otherwise be available in court, including the power to determine the question of arbitrability. The arbitrator may conduct only an individual arbitration and may not consolidate more than one individual’s claims, preside over any type of class or representative proceeding or preside over any proceeding involving more than one individual. The arbitrator, DODO, and you will maintain the confidentiality of any arbitration proceedings, judgments and awards, including, but not limited to, all information gathered, prepared and presented for purposes of the arbitration or related to the disputes. The arbitrator will have the authority to make appropriate rulings to safeguard confidentiality, unless the law provides to the contrary. The duty of confidentiality does not apply to the extent that disclosure is necessary to prepare for or conduct the arbitration hearing on the merits, in connection with a court application for a preliminary remedy or in connection with a judicial challenge to an arbitration award or its enforcement, or to the extent that disclosure is otherwise required by law or judicial decision. You and DODO agree that for any arbitration you initiate, you will pay all AAA fees and costs. For any arbitration initiated by DODO, DODO will pay all AAA fees and costs. Any claim arising out of or related to this Agreement must be filed within one year after such claim arose; otherwise, the claim is permanently barred, which means that you and DODO will not have the right to assert the claim. You have the right to opt out of binding arbitration within 30 days of the date you first accepted the terms of this Section 15 by emailing us at [\[email protected\]](https://docs.dodoex.io/cdn-cgi/l/email-protection#593a36372d383a2d193d363d363c21773036) . In order to be effective, the opt-out notice must include your full name and address and clearly indicate your intent to opt out of binding arbitration. By opting out of binding arbitration, you are agreeing to resolve disputes in accordance with Section 16. If any portion of this Section 15 is found to be unenforceable or unlawful for any reason, the unenforceable or unlawful provision will be severed from this Agreement, severance of the unenforceable or unlawful provision will have no impact whatsoever on the remainder of this Section 15 or the parties’ ability to compel arbitration of any remaining claims on an individual basis under this Section 15, and to the extent that any claims must therefore proceed on a class, collective, consolidated, or representative basis, such claims must be litigated in a civil court of competent jurisdiction and not in arbitration, and the parties agree that litigation of those claims will be stayed pending the outcome of any individual claims in arbitration. Further, if any part of this Section 15 is found to prohibit an individual claim seeking public injunctive relief, that provision will have no effect to the extent such relief is allowed to be sought out of arbitration, and the remainder of this Section 15 will be enforceable. 16\. GOVERNING LAW[#](https://docs.dodoex.io/en/home/terms-of-service#16--governing-law) ----------------------------------------------------------------------------------------- The interpretation and enforcement of the Agreement, and any dispute related to the Agreement or the App, will be governed by and construed and enforced in accordance with the laws of the California, as applicable, without regard to conflict of law rules or principles that would cause the application of the laws of any other jurisdiction. You agree that we may initiate a proceeding related to the enforcement or validity of our intellectual property rights in any court having jurisdiction. You agree that San Francisco, California is the proper forum for any appeals of an arbitration award or for court proceedings in the event that this Agreement’s binding arbitration clause is found to be unenforceable. --- # FAQ - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) ❓FAQ ==== General FAQs[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#general-faqs) ------------------------------------------------------------------------------------ ### What is DODO?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#what-is-dodo) DODO is a decentralized trading platform that uses the innovative Proactive Market Maker (PMM) algorithm to provide efficient on-chain liquidity for Web3 assets, making it easy for everyone to issue and trade these assets. It provides competitive prices for DEX traders and reduces impermanent loss for liquidity providers. In addition, DODO offers a zero barrier-to-entry token issuance mechanic. ### What can I do on DODO?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#what-can-i-do-on-dodo) DODO offers a variety of DeFi tools, including token trading, liquidity mining, token creation and initial liquidity, custom liquidity pool creation, and more. These tools, both DeFi staples and those created by the DODO Team, implement features that make them unparalleled in safety and efficiency, including the PMM algorithm and liquidity aggregation. ### Why the name "DODO"?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#why-the-name--dodo-) The DODO founders are big fans of Nintendo's Animal Crossing game, and Dodos are a species of villager in the game. We thought they were absolutely adorable, so we named our product DODO. DODO’s yellow bird mascot is named Maya, and even though Maya doesn't look so much like the dodos of Mauritius and she has a carrot for a mouth, we think she looks cute anyway! ### Which wallets does DODO currently support?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#which-wallets-does-dodo-currently-support) DODO’s supported wallet list is always growing! As of May 1, 2023, the crypto wallets supported on DODO are the following: * [Binance Wallet](https://www.bnbchain.org/en/binance-wallet) * [Bitkeep](https://bitkeep.com/en/index) * [Brave Wallet](https://brave.com/wallet/) * [Coinbase Wallet](https://www.coinbase.com/wallet) * [Frontier Wallet](https://www.frontier.xyz/) * [GameStop Wallet](https://wallet.gamestop.com/) * [KuCoin Wallet](https://play.google.com/store/apps/details?id=com.kucoin.wallet) * [Ledger](https://www.ledger.com/) * [Math Wallet](https://mathwallet.org/en-us/) * [MetaMask](https://metamask.io/) * [Nabox](https://nabox.io/) * [OKX Wallet](https://www.okx.com/web3) * [OneKey](https://onekey.so/) * [OpenBlock](https://openblock.com/) * [Portis](https://www.portis.io/) * [Unstoppable Wallet](https://unstoppable.money/) * [WalletConnect](https://walletconnect.com/) ### Does DODO have a token?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#does-dodo-have-a-token) Yes! [$DODO](https://www.coingecko.com/coins/dodo) is our native token, which is issued on Ethereum and has been mapped to other blockchains such as BSC, Arbitrum, and others. For information on how to obtain DODO tokens, see [Get DODO Tokens](https://docs.dodoex.io/en/home/token-economy#how-to-buy--dodo) . DODO also issues the loyalty token vDODO. See [below](https://docs.dodoex.io/en/home/faq---trouble-shooting#what-is-vdodo) for more information. ### How does governance work on DODO?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#how-does-governance-work-on-dodo) Governance on DODO is simple: any holder of vDODO can submit a DODO Improvement Proposal, known as a [DIP](https://docs.dodoex.io/en/home/token-economy/dip-record) , for public consideration. After a discussion period, vDODO holders can submit their tokens (1 vDODO = 100 votes) to vote on whether they want to accept or reject the proposal. If accepted, a DIP will be implemented by the DODO Team. DODO’s Unique Features[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#dodo-s-unique-features) -------------------------------------------------------------------------------------------------------- ### What is the PMM algorithm and how does it work?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#what-is-the-pmm-algorithm-and-how-does-it-work) The [Proactive Market Maker](https://docs.dodoex.io/en/product/pmm-algorithm) , also known as the PMM, is DODO’s way of ensuring ample liquidity for its trading pools and other services. The PMM algorithm, a derivation of the popular AMM model, was developed by the DODO Team based on the central limit order books used in traditional finance. The PMM algorithm works by adjusting the price curve of an asset to ensure that there is ample liquidity at the most up-to-date market price. For example, when the supply of an asset decreases, the PMM algorithm automatically increases the market price for this asset in anticipation of buying back the missing inventory from the market. This ensures that DODO trading pools have much less impermanent loss and improved capital efficiency compared to similar AMM pools. ### What is Crowdpooling?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#what-is-crowdpooling) Crowdpooling, a portmanteau of the phrases "crowdfunding" and "liquidity pool", is a way to distribute tokens and initiate liquid markets that's available to everyone. Inspired by the call auction mechanism common in securities markets, Crowdpooling’s liquidity protection period and equal opportunity investment features ensure that there is no rush of experts or bot interference, like with other liquidity offering methods available today on DEXs. ### What is vDODO?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#what-is-vdodo) [vDODO](https://docs.dodoex.io/en/home/token-economy) is a transferable token that serves as a user's proof of membership in DODO’s loyalty program. It can be used for voting on governance proposals, getting better quotas for Crowdfunding investments, as well as claiming a portion of DODO’s trading fee revenue and exclusive member perks! ### How does DODO ensure the best price for trades?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#how-does-dodo-ensure-the-best-price-for-trades) DODO monitors various liquidity sources, both those hosted by DODO that use the PMM algorithm, and others across the network. It then uses multiple smart routing algorithms, including those of 1inch, Matcha, and UniSwap, to find the best price out of all of them. This best price is what is quoted to the end user. Common Concerns and Misconceptions[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#common-concerns-and-misconceptions) -------------------------------------------------------------------------------------------------------------------------------- ### Are DODO smart contracts audited?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#are-dodo-smart-contracts-audited) Yes, all DODO contracts have been audited by third parties! See [here](https://docs.dodoex.io/en/home/security) for a full list of DODO contract audits. ### Is there impermanent loss on DODO?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#is-there-impermanent-loss-on-dodo) The short answer is there is reduced impermanent loss on DODO compared to other decentralized exchanges. Liquidity providers may see their token balances go down short-term, but such losses are less severe than on other AMM platforms, most notably UniSwap. DODO is a decentralized exchange and on-chain liquidity provider built for long-term success, and our backtests on BTC price data from April 2018 to April 2020 indicate that liquidity providers that stick to DODO are able to make 80% in net gains. The long answer is that the kind of impermanent loss (we would prefer calling it "asset re-balancing loss", as it is much more accurate and less generic) frequently seen on other AMM platforms is not present on DODO. In one of [our earlier Medium articles](https://medium.com/dodoex/why-there-is-no-impermanent-loss-on-dodo-4d82b2b532bc) , we talked about how there is "no \[AMM\] impermanent loss" on DODO, because DODO does not force liquidity providers to deposit tokens in pre-defined ratios and does not tamper with their asset allocations. There is, however, market risk involved with liquidity provision on DODO. The biggest distinction between market risk and AMM "impermanent loss" (or asset re-balancing loss) is the fact that impermanent loss is always a loss and there is very little LPs can do to address it, if it is present. In contrast, market risk is not always manifested in losses. LPs could profit if the asset prices went up. Liquidity Provision[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#liquidity-provision) -------------------------------------------------------------------------------------------------- ### How do I withdraw my trading fee revenue?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#how-do-i-withdraw-my-trading-fee-revenue) The trading fee revenue are added to the liquidity pool in real-time. When you withdraw your funds, you will also receive your share of the fee revenue. ### Do I need to pay a fee to withdraw my funds from a liquidity pool?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#do-i-need-to-pay-a-fee-to-withdraw-my-funds-from-a-liquidity-pool) In most situations, withdrawing your funds from a liquidity pool does not incur a withdrawal fee. However, if the asset allocation in a pool is not balanced, and you are withdrawing the scarcer asset, then the system will charge a withdrawal fee. This fee will be distributed to the other LPs who have provided the scarce asset, in order to incentivize their continued liquidity provision. Usually, this fee is very small, and only when the asset allocation is extremely unbalanced will it become significantly larger. ### How is the APY of a liquidity pool calculated?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#how-is-the-apy-of-a-liquidity-pool-calculated) The formula for calculating the Annual Percentage Yield (APY)a of liquidity provision is (estimated annual trading volume x fee rate x 80%) divided by the total funds in the liquidity pool. Crowdpooling[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#crowdpooling) ------------------------------------------------------------------------------------ ### How is the Crowdpooling share allocated?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#how-is-the-crowdpooling-share-allocated) Currently, there is no deposit threshold required to participate in a Crowdpooling campaign, you just need to hold the required token. For example, if the project requires USDT, you can participate by providing USDT at the Crowdpooling price. If too many people participated in the Crowdpooling campaign, the funds will be allocated proportionally based on the amount provided, and any excess funds will be refunded. ### What is the 'Liquidity Protection Period' in the context of Crowdpooling?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#what-is-the--liquidity-protection-period--in-the-context-of-crowdpooling) After the Crowdpooling period ends, the funds and remaining tokens belong to the project initiator. These assets will be used to provide liquidity in the spot market. During the liquidity protection period, the project initiator cannot withdraw funds from the pool. After the liquidity protection period ends, the funds can be withdrawn. This safety feature was implemented to prevent rug-pull scams where a project initiator would withdraw funds immediately after getting buy-in from others, destroying the value of others' deposits. Liquidity Mining[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#liquidity-mining) -------------------------------------------------------------------------------------------- ### Is there a trading volume threshold for liquidity mining?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#is-there-a-trading-volume-threshold-for-liquidity-mining) No! As long as a trade is completed, you can get a certain proportion of $DODO tokens from the reward pool. ### How is the APR of liquidity mining calculated?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#how-is-the-apr-of-liquidity-mining-calculated) The Annual Percentage Rate (APR) for liquidity mining is calculated as follows: (the reward token's reward per block \* estimated total blocks per year \* the USD price of the reward token) divided by the total funds in the mining pool. vDODO[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#vdodo) ---------------------------------------------------------------------- ### What are the benefits of holding vDODO?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#what-are-the-benefits-of-holding-vdodo) vDODO is a membership token designed for loyal DODO users. By holding vDODO, you will enjoy the following benefits: 1. Trading fee dividends 2. vDODO membership perks 3. Governance proposal and voting rights 4. Increased shares for IDOs and Crowdpooling campaigns on the DODO platform 5. Trading fee discounts ### How much is the vDODO membership reward?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#how-much-is-the-vdodo-membership-reward) 6 DODO tokens are released per block and awarded to vDODO holders. The reward is paid in the form of vDODO, credited in real-time and compounded. vDODO holders receive DODO membership rewards in proportion to their holdings. Inviting your friends to mint vDODO will earn you an additional 10% reward. ### Are there any restrictions on the address of the vDODO inviter?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#are-there-any-restrictions-on-the-address-of-the-vdodo-inviter) When minting vDODO for the first time, you must enter an inviter address. The default inviter is the DODO team. You can choose another Ethereum address that has already minted vDODO as the inviter. The inviter cannot be changed once set. ### How do I mint vDODO?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#how-do-i-mint-vdodo) Stake 100 DODO in a DODO liquidity mining contract to mint 1 vDODO. ### Is there a fee for redeeming vDODO?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#is-there-a-fee-for-redeeming-vdodo) To redeem your vDODO for DODO, you need to pay a proportional exit fee. This exit fee will be distributed in vDODO form to all remaining vDODO holders in real-time, and is calculated based on the DODO Loyalty Index. The "DODO Loyalty Index" is defined as "vDODO supply \* 100" divided by the "circulating supply of DODO ". The higher the loyalty index, the lower the exit fee, as follows: * When the loyalty index is greater than 0.5, and more than 50% of the circulating DODO is staked, the exit fee reaches the minimum of 5%. * As the loyalty index decreases, the exit fee gradually increases. * When the loyalty index is less than 0.1, and less than 10% of the circulating DODO is pledged, the exit fee reaches the maximum of 15%. ### How is the circulating supply of DODO calculated?[#](https://docs.dodoex.io/en/home/faq---trouble-shooting#how-is-the-circulating-supply-of-dodo-calculated) The circulating supply of DODO is calculated by subtracting the DODO amounts in the following addresses from the total DODO supply. The DODO Team will update this list in real-time when there are changes to the locked tokens contract. 0x4447183c50e82a8b0141718c405381a3b1bad634 - Incentive tokens 0x3e19d726ed435afd3a42967551426b3a47c0f5b7 - DODO Team, investors, market 0x380312700ed61e4401d27e62508b82d0ae162d9e - Liquidity mining rewards 0x95c4f5b83aa70810d4f142d58e5f7242bd891cb0 - DODO Team multisig 0x0e504d3e053885a82bd1cb5c29cbaae5b3673be4 - Pre-mining rewards 0x8876819535b48b551c9e97ebc07332c7482b4b2d - DODO-USDT pool 0x9224fc9d1389734cebb7cb29545bddc546fb9802 - Seed round lock-up --- # Join Community - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🔗 Join Community ================= If you have any questions or concerns, the DODO team can be contacted through one of our many social media profiles. Let's be in touch! * **Twitter:** [https://twitter.com/BreederDodo](https://twitter.com/BreederDodo) * **Discord English:** [https://discord.com/invite/tyKReUK](https://discord.com/invite/tyKReUK) * **Discord 中文:** [https://discord.gg/wSN9nn2kMx](https://discord.gg/wSN9nn2kMx) * **Medium:** [https://medium.com/dodoex](https://medium.com/dodoex) * **Telegram English:** [https://t.me/dodoex\_official](https://t.me/dodoex_official) * **Telegram 中文:** [https://t.me/dodozoo](https://t.me/dodozoo) * **Telegram 日本語:** [https://t.me/DODODEXNFTJapan](https://t.me/DODODEXNFTJapan) * **Telegram Tiếng Việt:** [https://t.me/DODOVietnam](https://t.me/DODOVietnam) * **Telegram Türk:** [https://t.me/dodo\_turkiye](https://t.me/dodo_turkiye) * **Telegram Bahasa Melayu:** [https://t.me/DODOMalaysia](https://t.me/DODOMalaysia) * **Telegram 한국인:** [https://t.me/DODOKorea](https://t.me/DODOKorea) * **Telegram Russian:** [https://t.me/DodoexRU](https://t.me/DodoexRU) * **Reddit:** [https://www.reddit.com/r/DodoEx/](https://www.reddit.com/r/DodoEx/) --- # 什么是DODO? - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🐥 什么是DODO? =========== DODO站在去中心化加密货币交易所的前沿,彻底改变了您与流动性互动的方式。我们是您的终极流动性合作伙伴,为您提供轻松创建、发现和利用流动性的手段。 在金融自治和透明度至关重要的时代,DODO通过赋予用户对资产的完全控制而与众不同。 核心原则[#](https://docs.dodoex.io/zh/home/what-is-dodo#he-xin-yuan-ze) -------------------------------------------------------------------- * 去中心化和信任:DODO的核心是建立在去中心化原则之上。它作为一种点对点系统运作,确保您的资产始终在安全控制之下。 * 透明和安全:DODO构建在区块链技术的基础上,提供完全的透明度。我们对安全性的承诺是无与伦比的,通过严格的审计和大量的投资来加强我们的防御能力。这种承诺使我们可以适应大多数EVM链的兼容性。 您的流动性路径[#](https://docs.dodoex.io/zh/home/what-is-dodo#nin-de-liu-dong-xing-lu-jing) ------------------------------------------------------------------------------------- DODO的创新性的主动式做市商(PMM)算法成为核心,提供了三个不同版本:V1、V2和V3,每个版本都满足不同的流动性需求。无论您专注于稳定币、主流加密货币还是引入新代币到市场,DODO都简化了流动性创建的路径。 我们面向用户的工具包进一步简化了流程。即使没有任何编程专长,用户也可以轻松地操作我们的平台。只需点击几下,您就可以完成诸如代币创建、筹款、流动性挖掘等任务。 引入DODOX:提升您的交易体验[#](https://docs.dodoex.io/zh/home/what-is-dodo#yin-ru-dodox-ti-sheng-nin-de-jiao-yi-ti-yan) ------------------------------------------------------------------------------------------------------------- 随着DODO的发展,我们意识到在多链环境中发现流动性和促进无缝交易所面临的独特挑战。出于这个认识,DODOX应运而生,致力于解决这些重要的维度。 1. 革命性的流动性搜索:在众多的流动性池中导航可能会让人感到不知所措。DODOX通过先进的算法和集成来简化这一过程。通过与Uniswap、Curve和PancakeSwap等著名的流动性来源进行连接,并在1inch和0x等一流的聚合器之间比较价格,DODOX确保用户始终获得最有竞争力的汇率。此外,DODOX还提供了供开发人员无缝集成的交易API和小组件。 2. 优化交易:交易应该是无缝、高效和有利可图的。DODOX提供了面向用户的交易体验,无论您进行同链或跨链交换。凭借我们的滑点预测系统和限价订单功能,用户可以在最高的交易成功率和理想的条件下进行交易。 超越交易所:DODO研究[#](https://docs.dodoex.io/zh/home/what-is-dodo#chao-yue-jiao-yi-suo--dodoyan-jiu) ----------------------------------------------------------------------------------------------- 通过DODO研究,深入探索加密货币领域。我们的专业团队致力于提供客观、有深度的分析,涵盖了DODO相关新闻和更广泛的加密货币趋势。 这是我们的[内容库](https://www.notion.so/Dr-DODO-is-Researching-6c18bbca8ea0465ab94a61ff5d2d7682?pvs=21) 。 您也可以在Twitter上关注我们的[@DodoResearch](https://twitter.com/DodoResearch) 。我们的直接消息开启了!欢迎任何洞察和意见。 --- # DODO研究 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🔭 DODO研究 ========= 我们深入研究加密货币世界的各个方面,提供洞见、分析和更新。我们的主要目标是为社区提供信息和帮助,帮助其在不断演变的区块链领域中航行。 这是我们的[内容图库](https://www.notion.so/Dr-DODO-is-Researching-6c18bbca8ea0465ab94a61ff5d2d7682?pvs=21) 。我们为不同的兴趣爱好开设了几个专栏或频道: * DexWeeklyBrief:我们有关去中心化交易所(DEX)的最新动态,重点关注行业更新、交易量和主要产品的市场份额变化。 * Cryptosnap:这是我们报道最新的加密货币新闻的地方,快速概述正在流行的内容。 * Datacheck:在这里,我们专注于链上分析,深入挖掘数据并提取有意义的洞见。 * Opinions:这一部分更多地是关于研究型文章和观点,我们分享对各种主题的看法。 * MaybeAlpha:我们深入分析不同的项目,为我们的追随者提供全面的概述。 您也可以在Twitter上关注我们[@DodoResearch](https://twitter.com/DodoResearch) 。我们的私信是开放的!欢迎您的任何见解。 电子邮件:[\[email protected\]](https://docs.dodoex.io/cdn-cgi/l/email-protection#2b4f444f4442454c594e584e4a5948436b4c464a424705484446) --- # DODO 媒体包 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🎨 DODO 媒体包 =========== [DODO 徽标](https://drive.google.com/drive/folders/1qRn6Yqz3KllhdGy70wOY52fZ2g2ejQVT?usp=drive_link) [#](https://docs.dodoex.io/zh/home/media-kit#dodo-hui-biao) --------------------------------------------------------------------------------------------------------------------------------------------------------------- ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FDODO-Logo3.2f3dc6ef.png&w=1920&q=75) [DODO 插图](https://drive.google.com/drive/folders/15XiV28_f5c6YTnZqxGcA8u8PCDgi6REn?usp=drive_link) [#](https://docs.dodoex.io/zh/home/media-kit#dodo-cha-tu) ------------------------------------------------------------------------------------------------------------------------------------------------------------- ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FDODO-Illustration.6c326ab4.png&w=3840&q=75) [DODO 图案](https://drive.google.com/drive/folders/1GFEMpckaqIZ7OvcZ-eLkTGbG1ijdDscp?usp=drive_link) [#](https://docs.dodoex.io/zh/home/media-kit#dodo-tu-an) ------------------------------------------------------------------------------------------------------------------------------------------------------------ ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FDODO-Pattern.72003f28.png&w=3840&q=75) --- # 服务条款 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 📄 服务条款 ======= 欢迎使用 DODO(以下简称“应用程序”),这是由 DODO, Inc. (及其所有附属机构,以下简称“DODO”、“我们”)提供的一个网站应用程序。该应用程序允许用户使用以太坊区块链上多种智能合约协议交换某些数字代币。 本服务条款协议(以下简称“协议”)解释了您访问和使用应用程序的条款和条件。请仔细阅读本协议。访问应用程序即表示您接受并同意受协议约束,包括第 15 节中的强制性仲裁条款。如果您不同意本协议的条款,则不得访问或使用该应用程序。 1\. 资格[#](https://docs.dodoex.io/zh/home/terms-of-service#1--zi-ge) -------------------------------------------------------------------- 为了符合访问和使用该应用程序的资格,您必须年满 18 岁(或您居住地的成年年龄,以较大者为准),且不得在适用法律下被禁止使用该应用程序。此外,您必须能够以公司的名义或作为个人在网上签订具有法律约束力的合同。 如果您代表公司或其他法律实体同意本协议,则表明您具备将公司或其他法律实体与协议条款绑定的法律权限,并具有在线签订具有法律约束力合同的能力,并有权力和权限遵守协议下的义务。 此外,访问应用程序即表明您声明并保证不受美国制裁,不是美国制裁或法则禁止的国家、地区、领土或其他地区的公民或居民。 ### 禁止访问的地区[#](https://docs.dodoex.io/zh/home/terms-of-service#jin-zhi-fang-wen-de-di-qu) 如果您位于、成立于或是以下地区或国家的居民,则不得访问或使用应用程序或其任何服务,包括 dododex 和 dodochain: **中国、美国(包括其领土:美属萨摩亚、关岛、波多黎各、北马里亚纳群岛和美属维尔京群岛)、白俄罗斯、古巴、克里米亚地区、刚果民主共和国、伊朗、伊拉克、新西兰、朝鲜、南苏丹、苏丹、叙利亚、津巴布韦。** 来自这些地区的 IP 地址禁止访问 dododex 和 dodochain 服务。 ### 制裁和受限人员[#](https://docs.dodoex.io/zh/home/terms-of-service#zhi-cai-he-shou-xian-ren-yuan) 通过使用或访问该应用程序,您向我们声明您不受制裁名单的限制,并且不是条款中定义的“受限人员”。“制裁名单”包括任何国际组织、联合国、欧盟及其成员国或任何国家和政府当局发布的制裁指定,包括但不限于美国和英国的制裁名单。 ### 禁止规避条款[#](https://docs.dodoex.io/zh/home/terms-of-service#jin-zhi-gui-bi-tiao-kuan) 您同意不使用任何软件、技术或网络技术(包括虚拟私人网络(VPN)),以规避或尝试规避这些限制。任何试图规避这些限制的行为都会导致您的应用程序访问权限立即被暂停或终止。 我们保留在任何司法管辖区随时自行决定限制访问应用程序的权利。此外,如果: * (a) 我们被传票、法院命令或政府当局的约束性命令要求这样做,或根据任何适用法律法规要求; * (b) 您违反本协议,包括从事禁止的活动; * (c) 我们自行决定出于任何法律或监管原因决定这样做; 我们可能会暂停、限制或终止您对应用程序任何或所有功能的访问,和/或阻止或禁止您的任何交易。 2\. 这些条款的修改[#](https://docs.dodoex.io/zh/home/terms-of-service#2--zhe-xie-tiao-kuan-de-xiu-gai) ------------------------------------------------------------------------------------------------ 我们保留在任何时候自行决定修改本协议的权利。如果我们进行更改,我们将通过发送电子邮件、通过应用程序提供通知或更新本协议顶部的日期来向您提供这些更改的通知。除非我们在通知中另行说明,否则任何修改立即生效,您继续使用应用程序将确认您接受这些更改。如果您不同意修改后的协议,您必须停止使用应用程序。 3\. 所有权权利[#](https://docs.dodoex.io/zh/home/terms-of-service#3--suo-you-quan-quan-li) -------------------------------------------------------------------------------------- 我们不声称对用户(包括您)提供用于通过应用程序可用的任何内容(“用户内容”)拥有任何所有权权利。您同意您拥有或拥有所有权利、所有权和权益,包括您提供给我们的任何用户内容的所有知识产权权利。您在此授予我们一个全球范围、非排他性、免版税、可再授权和可转让的许可,以使用、复制、分发、创作衍生作品、展示和表演您在应用程序上传、提交、存储或发送的任何用户内容。 在上述规定的范围内,DODO 拥有或被正式授权使用应用程序及其内容中的所有知识产权和其他权利,包括应用程序显示或提供的所有文本、图像和商标,以及所有应用程序软件。未经我们明确授权,您不得复制、修改、改编、租赁、许可、出售、出版、分发或以其他方式允许任何第三方访问或使用应用程序或其任何内容。在您符合资格并遵守本协议条款的前提下,我们在此授予您单一的、个人的、有限的访问和使用应用程序的许可。此许可证是非排他性、不可转让的,并可以随时无理由地由我们撤销。除本协议明确允许外,严禁以其他任何目的使用应用程序或其内容。 与应用程序软件不同,操作在以太坊区块链上的基础智能合约协议,是用于通过应用程序进行交易的开源软件。 4\. 披露;免责声明[#](https://docs.dodoex.io/zh/home/terms-of-service#4--pi-lu--mian-ze-sheng-ming) --------------------------------------------------------------------------------------------- ### 4.1 保证免责声明[#](https://docs.dodoex.io/zh/home/terms-of-service#4-1-bao-zheng-mian-ze-sheng-ming) 在适用法律允许的最大范围内,应用程序(及其任何内容或功能)按“原样”和“可用”原则提供,我们明确否认,您在此放弃,对任何种类的声明、条件或保证,无论是明示或默示、法律或其他方式,还是由法规、法律习惯或贸易习惯产生的,包括但不限于适销性、适销质量、特定目的的质量或适用性、标题、安全性、可用性、可靠性、准确性、安静享受和第三方权利不侵犯的默示或法律保证和条件。在不限制上述内容的前提下,我们不代表或保证应用程序(包括任何相关数据)将不间断、在任何特定时间可用或无错误。此外,我们不保证应用程序中的错误是可纠正的或将得到纠正。 ### 4.2 关于信息准确性的免责声明[#](https://docs.dodoex.io/zh/home/terms-of-service#4-2-guan-yu-xin-xi-zhun-que-xing-de-mian-ze-sheng-ming) 您知道我们依靠第三方来源提供有关应用程序上列出的某些数字代币的信息,我们有权自行选择、更改和删除任何第三方信息来源。数字代币信息(包括代币价格)目前来自 coingecko.com 等第三方来源。我们对应用程序上任何数字代币信息的质量、准确性、及时性、完整性或可靠性不承担任何责任。在应用程序上交易任何数字代币之前,您有义务收集足够的信息并保持信息通畅。 ### 4.3 精选列表[#](https://docs.dodoex.io/zh/home/terms-of-service#4-3-jing-xuan-lie-biao) 应用程序上任何精选列表上数字代币的出现由多种因素决定,包括但不限于它们在 coingecko.com 上的排名、应用程序上的表现以及 DODO 的数字代币上市政策。您明白我们不对默认列表上的任何数字资产给予认可或推广。我们有权自行决定添加、更改、更新或删除任何精选列表或应用程序上的任何数字代币。 ### 4.4 支付和费用[#](https://docs.dodoex.io/zh/home/terms-of-service#4-4-zhi-fu-he-fei-yong) 在以太坊上进行的交易或者涉及使用基础区块链或其他去中心化或许可基础设施(称为“分布式账本技术”)的交易,要求您支付费用,例如以太坊网络上的“汽油费”,这些费用用于支付在特定分布式账本技术上进行交易所需的计算资源(这些支付和费用,称为“费用”)。 DODO 目前不对您在应用程序上的交易收取任何费用。然而,我们保留随时收取应用程序使用费用并调整定价的权利。如果收取此类费用,我们将在您授权交易时通知您交易的费用和定价。 您承认并同意 DODO 对任何分布式账本技术交易、任何费用的支付方式(如适用)或任何费用的实际支付方式(如适用)无控制权。因此,您必须确保在开始任何分布式账本技术交易之前,您的分布式账本技术兼容钱包地址(“分布式账本技术地址”)中有足够的适用分布式账本技术网络代币余额以完成任何交易。 ### 4.5 数字代币的保管和控制[#](https://docs.dodoex.io/zh/home/terms-of-service#4-5-shu-zi-dai-bi-de-bao-guan-he-kong-zhi) 您在您的数字钱包中对数字代币拥有完全的保管和控制权。我们不保管您的数字代币,也无法访问或持有您数字钱包的电子私钥。作为您数字钱包中数字代币的所有者和保管人,您应承担该等数字代币丢失的所有风险。 您理解,DODO 未经商品期货交易委员会,证券交易委员会,金融犯罪执法网络或任何金融监管机构注册或授权,并且没有任何金融监管机构审查或批准此应用程序。您还理解,DODO 未为任何人充当投资顾问或商品交易顾问,未在美国或针对美国人提供证券服务,并且应用程序的内容不构成有关任何商品、证券或其他资产的建议或推荐。 ### 4.6 数字代币相关风险[#](https://docs.dodoex.io/zh/home/terms-of-service#4-6-shu-zi-dai-bi-xiang-guan-feng-xian) 通过访问和使用此应用程序,您表示您理解使用加密和区块链系统所固有的风险,并且您对使用和理解数字代币(如比特币(BTC)、以太(ETH)及其他遵循以太坊代币标准(ERC-20)的数字代币)有一定的掌握。DODO 不控制可通过应用程序访问的任何数字代币的底层软件协议。您同意我们不对底层协议的操作、功能或安全性负责,并且对于由于底层协议的任何操作变化、故障或失败而导致的代币价值损失不负责任。 您进一步理解,这些数字代币的市场高度波动,数字代币存在与采用、投机、技术、安全和监管有关的风险(但不限于这些)。您承认,与以太坊等加密货币和区块链系统进行交易的成本和速度是可变的,可能随时急剧增加。您理解并同意完全承担访问和使用应用程序以及与以太坊区块链互动的所有风险,并同意DODO对您可能因这些风险而遭受的任何损失不负责任。 您应知道任何人都可以在以太坊上创建ERC20代币。我们不对该代币或相关项目的性质、质量或法律分类做出任何陈述。您需自行开展研究并确保在您居住的司法管辖区内可以合法交易此代币。 5\. 税务[#](https://docs.dodoex.io/zh/home/terms-of-service#5--shui-wu) ---------------------------------------------------------------------- 履行在该应用程序上进行的交易适用的税务义务是您唯一的责任。您应在适当的税务机关前预扣、征收、报告和缴纳税款。我们会尽力通过您的账户提供交易历史记录,但不对这些信息的完整性或准确性做出任何陈述。 6\. 更改;暂停;终止[#](https://docs.dodoex.io/zh/home/terms-of-service#6--geng-gai--zan-ting--zhong-zhi) -------------------------------------------------------------------------------------------------- 我们可以在我们自行决定的情况下,随时修改、暂停或停用整个或部分应用程序,无论是否事先通知您,出于任何原因,包括但不限于安全事件。 我们不对您因对应用程序的任何修改或因任何原因中止或终止您访问应用程序的全部或任何部分而遭受的任何损失负责。 该协议的所有条款将在您访问应用程序终止后继续生效,无论其过期或终止的原因如何,除此之外,法律或其性质要求的任何其他条款也应继续有效。 7\. 电子通知[#](https://docs.dodoex.io/zh/home/terms-of-service#7--dian-zi-tong-zhi) --------------------------------------------------------------------------------- 您同意接收我们就协议或应用程序提供的所有通信、协议、文件、收据、通知和披露的电子版(统称为“通信”)。您同意我们可以通过将通信发布在应用程序上来向您提供。您还可以通过发送支持请求至 [\[email protected\]](https://docs.dodoex.io/cdn-cgi/l/email-protection#aac9c5c4decbc9deeacec5cec5cfd284c3c5) 联系我们的法律团队要求额外的电子版通信。 8\. 赔偿[#](https://docs.dodoex.io/zh/home/terms-of-service#8--pei-chang) ------------------------------------------------------------------------ 您同意对我们及我们的官员、董事、员工、承包商、代理、附属机构和子公司(“被保护方”)做出无害、释放、辩护和赔偿,针对因以下情况引起的所有索赔、损害赔偿、义务、损失、责任、费用和开支:(a)您对应用程序的访问和使用;(b)您违反本协议的任何条款或条件、任何第三方的权利或任何其他适用法律、规则或法规;(c)任何其他方在您的协助下或使用您拥有或控制的任何设备或账户访问和使用应用程序。 9\. 禁止活动[#](https://docs.dodoex.io/zh/home/terms-of-service#9--jin-zhi-huo-dong) --------------------------------------------------------------------------------- 您同意不参与或试图参与与您访问或使用应用程序有关的以下任何类别的禁止活动: ### 9.1 知识产权侵权[#](https://docs.dodoex.io/zh/home/terms-of-service#9-1-zhi-shi-chan-quan-qin-quan) 侵犯或违反任何人或实体的版权、商标、服务标志、专利、公开权、隐私权或其他专有或知识产权的活动。 ### 9.2 网络攻击[#](https://docs.dodoex.io/zh/home/terms-of-service#9-2-wang-luo-gong-ji) 试图干扰或破坏任何计算机、服务器、网络、个人设备或其他信息技术系统的完整性、安全性或正常功能的活动,包括(但不限于)病毒的部署和拒绝服务攻击。 ### 9.3 欺诈或误导[#](https://docs.dodoex.io/zh/home/terms-of-service#9-3-qi-zha-huo-wu-dao) 试图欺骗我们或任何其他个人或实体的活动,包括(但不限于)提供虚假、不准确或误导性的信息以非法获取他人财产。 ### 9.4 市场操纵[#](https://docs.dodoex.io/zh/home/terms-of-service#9-4-shi-chang-cao-zong) 违反任何关于市场完整性的适用法律、规则或法规的活动,包括(但不限于)普遍称为诱骗交易和刷交易的操纵策略。 ### 9.5 赌博[#](https://docs.dodoex.io/zh/home/terms-of-service#9-5-du-bo) 在竞争对手的比赛、事件或机遇游戏上押注或冒险价值的活动,包括但不限于彩票、竞价费拍卖、政治赌博、体育预测和抽奖。 ### 9.6 任何其他非法行为[#](https://docs.dodoex.io/zh/home/terms-of-service#9-6-ren-he-qi-ta-fei-fa-xing-wei) 违反美国或其他相关司法管辖区的任何适用法律、规则或法规的活动,包括(但不限于)美国法律施加的限制和监管要求。 10\. 排除后果性和相关损害赔偿[#](https://docs.dodoex.io/zh/home/terms-of-service#10--pai-chu-hou-guo-xing-he-xiang-guan-sun-hai-pei-chang) ------------------------------------------------------------------------------------------------------------------------------- 在任何情况下,DODO均不对因您使用应用程序而产生的任何附带、间接、特别、惩罚性、示范性、后果性或类似的损害或责任负责(包括但不限于因数据、信息、收入、商誉、利润或其他业务或财务利益的损失而导致的损害),无论是基于合同、侵权(包括过失)、民事责任、法规、严格责任、违约或任何其他责任理论,且无论DODO是否已被告知、知晓或应知这种损害的可能性。 11\. 责任限制[#](https://docs.dodoex.io/zh/home/terms-of-service#11--ze-ren-xian-zhi) ---------------------------------------------------------------------------------- 在任何情况下,DODO因应用程序(及其任何内容和功能性)、DODO 的履行或非履行、分布式账本技术代币、其他数字代币或与应用程序相关的任何其他产品、服务或其他项目引起或与之相关的累计责任,不会超过您在事件发生前的十二(12)个月内支付给我们的费用总额。 12\. 释放[#](https://docs.dodoex.io/zh/home/terms-of-service#12--shi-fang) ------------------------------------------------------------------------- 在适用法律允许的范围内,为了允许使用应用程序,您特此释放并永远免除DODO,并特此放弃和放弃,直接或间接因应用程序直接或间接引起的每一个过去、现在和未来的争议、索赔、争议、需求、权利、义务、责任、行动和诉因(包括人身伤害、死亡和财产损害)。您在此放弃与前述事项相关的任何适用法律规定或法规,包括加州民法典第1542节规定:“一般性解除不适用于债权人在实施解除时不知道或怀疑存在于其有利情况下的索赔,而这些索赔如果被其知晓,会实质上影响其与债务人或被解除方的和解。” 13\. 转让[#](https://docs.dodoex.io/zh/home/terms-of-service#13--zhuan-rang) --------------------------------------------------------------------------- 您不得转让根据协议授予的任何权利或许可。我们保留在无需限制下转让本协议项下的任何权利和/或许可的权利,包括但不限于任何DODO附属公司或子公司或DODO业务利益的任何继承人。 14\. 不可抗力[#](https://docs.dodoex.io/zh/home/terms-of-service#14--bu-ke-kang-li) -------------------------------------------------------------------------------- 我们对因任何超出我们合理控制范围之外的事件或情况直接或间接导致的应用程序性能的任何延迟或失败不承担责任,包括但不限于自然灾害、内乱、恐怖主义、显著市场波动和互联网服务、设备或软件的故障。 15\. 争议解决和仲裁[#](https://docs.dodoex.io/zh/home/terms-of-service#15--zheng-yi-jie-jue-he-zhong-cai) --------------------------------------------------------------------------------------------------- 请仔细阅读以下部分,因为它要求您对某些争议和索赔进行仲裁,并限制您向我们寻求救济的方式,除非您按照以下说明选择退出仲裁。此外,仲裁将使您无法在法庭上提起诉讼或进行陪审团审判。 您和DODO同意,因本协议引起的或与之相关的任何争议仅限于您与DODO之间的个人行为解决,并且不会作为集体仲裁、集体诉讼或任何其他类型的代表性程序提起。 除去您或>>>START-TERMS>>>DODO>>>END-TERMS>>>在您居住地所在的县或其他适用管辖区的小额索赔法院提起的个人诉讼,或您或>>>START-TERMS>>>DODO>>>END-TERMS>>>为声称非法使用知识产权而寻求禁令或其他衡平救济的纠纷,您和>>>START-TERMS>>>DODO>>>END-TERMS>>>放弃对于因本协议或应用程序引起或与之相关的任何纠纷在法院进行的陪审团审判的权利。相反,对于您对>>>START-TERMS>>>DODO>>>END-TERMS>>>的任何争议或索赔或与服务相关的任何争议或索赔,您同意首先联系>>>START-TERMS>>>DODO>>>END-TERMS>>>,并通过发送书面通知(“通知”)至电子邮箱 [\[email protected\]](https://docs.dodoex.io/cdn-cgi/l/email-protection#3f5c50514b5e5c4b7f5b505b505a47115650) ,尝试非正式地解决索赔。通知必须包括您的姓名、住址、电子邮箱地址和电话号码,描述索赔的性质和依据,并明确所寻求的具体救济。我们给您的通知将类似于上述形式。如果您和>>>START-TERMS>>>DODO>>>END-TERMS>>>在收到该通知后三十(30)天内无法达成解决索赔的协议,那么任一方可以将争议提交由>>>START-TERMS>>>JAMS>>>END-TERMS>>>管理的具有约束力的仲裁,或在上述有限情况下在法院进行。提交给>>>START-TERMS>>>JAMS>>>END-TERMS>>>的所有争议将通过保密的、具有约束力的仲裁在一名仲裁员面前解决。仲裁程序将在加利福尼亚州旧金山举行,按照>>>START-TERMS>>>JAMS>>>END-TERMS>>>综合仲裁规则和程序(“>>>START-TERMS>>>JAMS Rules>>>END-TERMS>>>”)进行。最新版本的>>>START-TERMS>>>JAMS Rules>>>END-TERMS>>>可在>>>START-TERMS>>>JAMS Site>>>END-TERMS>>>上找到,并通过参考纳入本协议中。您要么承认和同意已经阅读并理解>>>START-TERMS>>>JAMS Rules>>>END-TERMS>>>,要么放弃阅读>>>START-TERMS>>>JAMS Rules>>>END-TERMS>>>的机会,并放弃因>>>START-TERMS>>>JAMS Rules>>>END-TERMS>>>不公平或不应适用的任何理由提出的任何索赔。 您和>>>START-TERMS>>>DODO>>>END-TERMS>>>同意,本第15节的可执行性在实质和程序上将受联邦仲裁法9 U.S.C. § 1 et seq(简称“>>>START-TERMS>>>FAA>>>END-TERMS>>>”)的最大许可范围内的规范。根据>>>START-TERMS>>>FAA>>>END-TERMS>>>的限制,这些条款和>>>START-TERMS>>>AAA Rules>>>END-TERMS>>>,仲裁员将拥有对任何争议作出所有程序和实质决定以及授予任何在法院可用的救济的独占权,包括决定仲裁性问题的权力。仲裁员只能进行个体仲裁,不能合并多个个人的索赔,不能主持任何类型的集团或代表性的程序,也不能主持涉及多于一个个人的程序。 仲裁员、>>>START-TERMS>>>DODO>>>END-TERMS>>>和您将保持任何仲裁程序、判决和裁决的保密性,包括但不限于,所有收集、准备和为仲裁或与争议相关的目的展示的信息。仲裁员将有权作出适当的裁决以保障保密性,法律另有规定的情况除外。保密义务不适用于准备或进行仲裁听证或与申请初步救济的法院申请或与仲裁裁决或其强制执行的司法挑战相关的必要披露,或者法律或司法决定另有要求的范围。 您和>>>START-TERMS>>>DODO>>>END-TERMS>>>同意,对于您发起的任何仲裁,您将承担所有>>>START-TERMS>>>AAA>>>END-TERMS>>>费用和成本。对于>>>START-TERMS>>>DODO>>>END-TERMS>>>发起的任何仲裁,>>>START-TERMS>>>DODO>>>END-TERMS>>>将支付所有>>>START-TERMS>>>AAA>>>END-TERMS>>>费用和成本。 任何因本协议引起或与之相关的索赔必须在索赔产生后一年内提出;否则,该索赔将被永久禁止,这意味着您和>>>START-TERMS>>>DODO>>>END-TERMS>>>将无法主张该索赔。 您有权在首次接受本第15节条款的日期后的30天内通过电子邮件至[\[email protected\]](https://docs.dodoex.io/cdn-cgi/l/email-protection#5d3e3233293c3e291d393239323825733432) 取消具有约束力的仲裁。为了生效,选择退出通知必须包括您的全名和地址,并明确表示您选择退出具有约束力的仲裁。通过选择退出具有约束力的仲裁,您同意根据第16节解决纠纷。 如果本第15节的任何部分因任何原因被认定为不可执行或非法,则该不可执行或非法的条款将从本协议中分离,其分离不会对本第15节的其余部分或双方根据本第15节以个体形式强制执行仲裁的能力产生任何影响,并且必须以集团、集体、合并或代表形式进行的任何索赔,将在有管辖权的民事法院中诉讼而非仲裁,各方同意在仲裁中的任何个体索赔的结果出来之前,暂停这些索赔的诉讼。此外,如果本第15节的任何部分被认定禁止寻求公共禁令救济的个体索赔,则在允许在仲裁之外寻求该救济的范围内,该条款将无效,本第15节的其余部分仍具执行力。 16\. 适用法律[#](https://docs.dodoex.io/zh/home/terms-of-service#16--shi-yong-fa-l-) --------------------------------------------------------------------------------- 本协议的解释和执行,以及与协议或应用程序相关的任何争议,将适用加利福尼亚州的法律进行解释和执行,并不考虑可能导致适用任何其他司法管辖区法律的法律冲突规则或原则。您同意我们可以在任何具有管辖权的法院启动与我们知识产权权利的执行或有效性相关的法律程序。您同意旧金山,加利福尼亚,是对仲裁裁决进行上诉或在本协议的具有约束力的仲裁条款被认定为不可执行时进行法院程序的适当地点。 --- # DIP Record - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🗳 DIP Record ============= DIP Records[#](https://docs.dodoex.io/en/home/token-economy/dip-record#dip-records) ------------------------------------------------------------------------------------ * [DIP-1: DODO Booster Program](https://community.dodoex.io/t/dip-1-dodo-booster/1595) * DIP-1 proposed to launch the DODO Booster program in order to be able to attract more quality project parties to establish liquidity pools in DODO, as well as to develop user trading habits and increase active users. * [DIP-2: Destroy 50% vDODO Exit Fee](https://community.dodoex.io/t/dip-2-50-vdodo/7598) * DIP-2 proposed to introduce a deflationary mechanism for DODO tokens by destroying 50% of the vDODO exit fee. * [DIP-3: Transaction Fee Dividend and Community Vault](https://community.dodoex.io/t/dip-3/8068) * DIP-3 proposed to redistribute the transaction fee from the previous 100% transaction fee to LP to 80% handling fee to LP, and the remaining 20% handling fee will be used for two parts, one for buying back DODO and distributing to vDODO holders, and the other for establishing a community vault. * [DIP-4: Migrate 5 million DODOs to Arbitrum mainnet for incentive program](https://community.dodoex.io/t/dip-4-500-dodo-arbitrum/8460) * DIP-4 proposed to migrate 5 million DODO tokens to the Arbitrum mainnet for liquidity mining and other future incentive programs * [DIP-5: Support for vDODO transfer functionality](https://community.dodoex.io/t/dip-5-vdodo/8503) * DIP-5 proposed to support the vDOOD token transfer function, which is used to allow holders of vDODO tokens to use vDODO tokens in more application scenarios. * [DIP-6: DODO Community Vault Framework](https://community.dodoex.io/t/dip-6-dodo/8713) * DIP-6 proposed a framework and process standard for the DODO Community Vault. * [DIP-7: Migrate $5M worth of DODO to Aurora/NEAR protocol for incentive program](https://community.dodoex.io/t/dip-7-500-dodo-aurora-near/9730) * DIP-7 proposed to migrate $5 million worth of DODO tokens to the Aurora network for liquidity mining and other future community incentive programs. * [DIP-8: Reduction of LP Fees for Major Stablecoin Trading Pairs](https://community.dodoex.io/t/dip-8-reduction-of-lp-fees-for-major-stablecoin-trading-pairs/9824) * DIP-8 proposed reducing the LP portion of the trading fee for the USDC-USDT (ETH) and BUSD-USDT (BSC) trading pairs on the DODO platform to improve our competitiveness in the stablecoin trading market. This proposal includes increasing the rewards for LPs to compensate for this decrease. * [DIP-9: Migrating 2 Million DODO to the Polygon PoS Chain for Incentive Programs](https://community.dodoex.io/t/dip-9-migrating-2-million-dodo-to-the-polygon-pos-chain-for-incentive-programs/10124) * DIP-9 proposed to migrate 2 million DODO to the Polygon Proof of Stake chain for stablecoin liquidity mining and other incentive programs. * [DIP-10: Migration of 2 Million DODO Tokens each to Avalanche, BOBA, and Moonriver for Future Incentives](https://community.dodoex.io/t/dip-10-migration-of-2-million-dodo-tokens-each-to-avalanche-boba-and-moonriver-for-future-incentives/10155) * DIP-10 proposed migrating and allocating 2 million DODO tokens each to the Avalanche, Boba, and Moonriver Mainnets to be used for liquidity mining and as other trading incentives in the future. * [DIP-11: vDODO Membership Reward Adjustment](https://community.dodoex.io/t/dip-11-vdodo-membership-reward-adjustment/10346) * DIP-11 proposed to end the double reward period for the current emission of vDODO membership rewards. At the same time, we would decrease the vDODO exit fee cap from 15% to 10%. * [DIP-12: Adjustment of Liquidity Mining Incentives on Select Pools](https://community.dodoex.io/t/dip-12-adjustment-of-liquidity-mining-incentives-on-select-pools/10376) * DIP-12 proposed to adjust the liquidity mining incentives on multiple chains. * [DIP-13: Governance Framework Update](https://community.dodoex.io/t/dip-13-governance-framework-update/10410) * DIP-13 proposed to develop a new governance system and migrate from the old vDODO contract to a new one. * [DIP-14: Migration of 1.5 Million DODO Tokens to Polygon Mainnet for Liquidity Mining Incentives](https://community.dodoex.io/t/dip-14-migration-of-1-5-million-dodo-tokens-to-polygon-mainnet-for-liquidity-mining-incentives/10484) * DIP-14 proposed to migrate 1.5 million DODO tokens to the Polygon Mainnet for liquidity mining incentives. * [DIP-15: Proposal to Increase the Number of Signers Required for the DODO Treasury Multisig](https://community.dodoex.io/t/proposal-to-increase-the-number-of-signers-required-for-the-dodo-treasury-multisig/10536) * DIP-15 proposed that the DODO Team should increase the number of signers required for transactions in the gnosis safe. * [DIP-16: Temporary Pause of DODO Emissions in vDODO Staking Pool to Mitigate Inflation and Enhance Long-Term Stability](https://community.dodoex.io/t/proposal-for-a-temporary-pause-of-dodo-emissions-in-vdodo-staking-pool-to-mitigate-inflation-and-enhance-long-term-stability/11292) * DIP-16 proposed to temporary suspense DODO emission in the vDODO Staking Pool and remove vDODO redemption fee. * [DIP-17: Migration of DODO Tokens to Scroll and Strategic Use of Community Treasury Funds](https://snapshot.org/#/dodobird.eth/proposal/0xfcff3c1696857de18f27a8ce2df3b15759611a5c6bc7efe3b10148b1918c4fda) * This DIP proposes a strategic migration of 2 million DODO tokens to Scroll, a leading zkEVM Layer 2 solution, aiming to leverage its enhanced scalability and performance for DODOX, our most advanced cross-chain DEX aggregator. Concurrently, it proposes allocating $100,000 from the DODO community treasury. This investment is designed to boost trading volumes and user engagement on Scroll, fostering a cycle of growth and sustainability for the community treasury. * [DIP-18: Migrating 200M DODO to DODOchain and Redirecting Future Protocol Revenues to the Treasury](https://snapshot.org/#/dodobird.eth/proposal/0xd170ddeb2a9353416654495d3aa953ec725a1a1a70ea4cf679eb34ab91e3b521) * DIP-18 proposes to migrate 200M DODO tokens to DODOchain, to support the growth of DODO DEX TVL and user base, and to attract future partners and ecosystem development and proposes that all future protocol revenues from DODO DEX be transferred to the DODO community treasury until the launch of new tokenomics, at which point their allocation will be determined through governance and voting. --- # 常见问题 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) ❓常见问题 ===== 常见问题[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#chang-jian-wen-ti) --------------------------------------------------------------------------------- ### 什么是DODO?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#shen-me-shi-dodo) DODO是一个去中心化交易平台,使用创新的主动市场制造商(PMM)算法为Web3资产提供高效的链上流动性,使每个人都能便捷地发行和交易这些资产。它为DEX交易者提供有竞争力的价格,减少流动性提供者的非永久性损失。此外,DODO还提供了零门槛的令牌发行机制。 ### 我可以在DODO上做什么?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#wo-ke-yi-zai-dodoshang-zuo-shen-me-) DODO提供各种DeFi工具,包括令牌交易、流动性挖矿、令牌创建和初始流动性、自定义流动性池创建等。这些工具既有DeFi的基本功能,也有DODO团队创建的功能,具备安全性和效率性等特点,包括PMM算法和流动性聚合。 ### 为什么叫"DODO"?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#wei-shen-me-jiao--dodo-) DODO的创始人是任天堂的《动物森友会》游戏的忠实粉丝,而渡渡鸟是游戏中的一种村民。我们觉得它们非常可爱,所以将我们的产品命名为DODO。 DODO的黄色鸟形吉祥物名叫玛雅,尽管玛雅看起来并不像毛里求斯的渡渡鸟,它有一张胡萝卜当嘴,但我们觉得她仍然很可爱! ### DODO目前支持哪些钱包?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#dodomu-qian-zhi-chi-na-xie-qian-bao-) DODO支持的钱包列表不断增长!截至2023年5月1日,在DODO上支持的加密钱包有以下几个: * [币安钱包](https://www.bnbchain.org/en/binance-wallet) * [Bitkeep](https://bitkeep.com/en/index) * [Brave钱包](https://brave.com/wallet/) * [Coinbase钱包](https://www.coinbase.com/wallet) * [Frontier钱包](https://www.frontier.xyz/) * [GameStop钱包](https://wallet.gamestop.com/) * [KuCoin钱包](https://play.google.com/store/apps/details?id=com.kucoin.wallet) * [Ledger钱包](https://www.ledger.com/) * [Math钱包](https://mathwallet.org/en-us/) * [MetaMask钱包](https://metamask.io/) * [Nabox钱包](https://nabox.io/) * [OKX钱包](https://www.okx.com/web3) * [OneKey钱包](https://onekey.so/) * [OpenBlock钱包](https://openblock.com/) * [Portis钱包](https://www.portis.io/) * [Unstoppable钱包](https://unstoppable.money/) * [WalletConnect钱包](https://walletconnect.com/) ### DODO有令牌吗?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#dodoyou-ling-pai-ma-) 有的![$DODO](https://www.coingecko.com/coins/dodo) 是我们的原生代币,它发行在Ethereum网络上,并映射到其他区块链(如BSC、Arbitrum等)。获取DODO代币的更多信息,参见 [获取DODO代币](https://docs.dodoex.io/zh/home/token-economy#how-to-buy--dodo) 。 DODO还发行了忠诚度代币vDODO。详情请参阅下文有关vDODO的说明。 ### DODO的治理如何工作?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#dodode-zhi-li-ru-he-gong-zuo-) DODO的治理非常简单:任何持有vDODO的人都可以提交DODO改进提案(称为[DIP](https://docs.dodoex.io/zh/home/token-economy/dip-record) ),供公众考虑。讨论期结束后,vDODO持有者可以提交他们的代币(1 vDODO = 100 票)进行投票,决定是否接受或拒绝提案。如果提案被接受,DODO团队将实施该DIP。 DODO的独特特点[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#dodode-du-te-te-dian) ----------------------------------------------------------------------------------------- ### 什么是PMM算法,它是如何工作的?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#shen-me-shi-pmmsuan-fa--ta-shi-ru-he-gong-zuo-de-) [主动市场制造商](https://docs.dodoex.io/zh/product/pmm-algorithm) ,也称为PMM,是DODO确保其交易池和其他服务具有充足流动性的方式。PMM算法是基于传统金融中使用的集中式限价单簿模型的衍生品,由DODO团队开发而来。 PMM算法通过调整资产的价格曲线,以确保在最新的市场价格下有充足的流动性。例如,当某个资产的供应量减少时,PMM算法会自动提高该资产的市场价格,以预期从市场上购回缺失的库存。相比于类似的AMM交易池,这确保了DODO交易池具有更小的非永久性损失和更高的资本效率。 ### 什么是Crowdpooling?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#shen-me-shi-crowdpooling) Crowdpooling是“众筹”和“流动性池”的合成词,是一种分发代币并发起流动性市场的方法,适用于所有人。受证券市场常见的公开竞价机制启发,Crowdpooling的流动性保护期和平等投资机会功能确保了没有专家或机器人干扰的快速涌入,这是目前在DEX上流动性提供的其他方法所没有的。 ### 什么是vDODO?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#shen-me-shi-vdodo) [vDODO](https://docs.dodoex.io/zh/home/token-economy) 是一种可转让的代币,用作用户在DODO忠诚度计划中的会员证明。持有vDODO可以用于治理提案的投票、在Crowdfunding投资中获得更好的份额,以及获取 DODO交易手续费收入和独享的会员特权! ### DODO如何保证交易的最佳价格?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#dodoru-he-bao-zheng-jiao-yi-de-zui-jia-jia-ge-) DODO监控各种流动性来源,包括由DODO托管并使用PMM算法的流动性,以及网络中的其他流动性。然后,DODO使用多个智能路由算法,包括1inch、Matcha和UniSwap的算法,从中找到最优价格。这个最优价格将被向最终用户报价。 常见问题和误解[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#chang-jian-wen-ti-he-wu-jie) ---------------------------------------------------------------------------------------------- ### DODO的智能合约经过审计吗?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#dodode-zhi-neng-he-yue-jing-guo-shen-ji-ma-) 是的,所有DODO智能合约都经过第三方的审计!请参见[这里](https://docs.dodoex.io/zh/home/security) 获取DODO智能合约审计的完整列表。 ### DODO存在非永久性损失吗?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#dodocun-zai-fei-yong-jiu-xing-sun-shi-ma-) 简短的回答是,与其他去中心化交易所相比,DODO的非永久性损失较小。流动性提供者可能会看到其代币余额短期内下降,但这种损失不如其他AMM平台严重,尤其是UniSwap。 DODO是为了长期成功而建立的去中心化交易所和链上流动性提供者。我们对比了从2018年4月到2020年4月的比特币价格数据,并发现坚持使用DODO的流动性提供者能够获得80%的净利润。 较长的答案是,对于在其他AMM平台中经常发生的非永久性损失(我们更喜欢称之为"资产重新平衡损失",因为这更准确,更不普遍),DODO上并不存在这种情况。在我们的早期[Medium文章](https://medium.com/dodoex/why-there-is-no-impermanent-loss-on-dodo-4d82b2b532bc) 中,我们讨论了为何DODO上“没有\[AMM\]非永久性损失”,因为DODO不强制流动性提供者以预定义的比例存入代币,也不干预他们的资产配置。 然而,提供DODO上的流动性确实存在市场风险。市场风险与AMM的“非永久性损失”(或称为资产重新平衡损失)之间的最大区别在于,非永久性损失始终是一种损失,流动性提供者几乎无法解决它(如果存在的话)。相反,市场风险并不总是以损失的形式出现,如果资产价格上涨,流动性提供者可能会获利。 提供流动性[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#ti-gong-liu-dong-xing) -------------------------------------------------------------------------------------- ### 如何提取我的交易手续费收入?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#ru-he-ti-qu-wo-de-jiao-yi-shou-xu-fei-shou-ru-) 交易手续费收入会实时添加到流动性池中。当您提取资金时,您也将获得您所持有的手续费收入份额。 ### 从流动性池中提取资金是否需要支付费用?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#cong-liu-dong-xing-chi-zhong-ti-qu-zi-jin-shi-fou-xu-yao-zhi-fu-fei-yong-) 在大多数情况下,从流动性池提取资金不需要支付提取费用。然而,如果一个流动性池中的资产配置不平衡,并且您正在提取稀缺的资产,则系统将收取一定的提取费用。这笔费用将分配给其他提供稀缺资产的流动性提供者,以激励他们继续提供流动性。通常情况下,这笔费用很小,只有在资产配置极度不平衡时,费用才会显著增加。 ### 如何计算流动性池的年化收益率(APY)?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#ru-he-ji-suan-liu-dong-xing-chi-de-nian-hua-shou-yi-l---apy-) 流动性提供的年化收益率(APY)的计算公式是:(预估年度交易量 x 费率 x 80%)除以流动性池中的总资金。 众筹(Crowdpooling)[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#zhong-chou--crowdpooling) ---------------------------------------------------------------------------------------------------- ### 众筹份额如何分配?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#zhong-chou-fen-e-ru-he-fen-pei-) 目前,参与众筹活动无需存款门槛,您只需持有所需代币即可参与。例如,如果项目需要USDT,您可以按照众筹价格提供USDT进行参与。如果参与众筹活动的人数过多,资金将按提供数量的比例进行分配,多余的资金将退还。 ### 在众筹中,什么是“流动性保护期”?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#zai-zhong-chou-zhong--shen-me-shi--liu-dong-xing-bao-hu-qi--) 众筹期结束后,资金和剩余代币归项目发起人所有。这些资产将用于在场内市场提供流动性。在流动性保护期内,项目发起人无法从流动性池中提取资金。流动性保护期结束后,资金可以提取。这个安全特性的实施是为了防止项目发起人在从他人获得认购后立即提取资金,以破坏其他人的存款价值。 流动性挖矿[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#liu-dong-xing-wa-kuang) --------------------------------------------------------------------------------------- ### 流动性挖矿是否存在交易量门槛?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#liu-dong-xing-wa-kuang-shi-fou-cun-zai-jiao-yi-liang-men-kan-) 不!只要完成交易,您就可以从奖励池获得一定比例的$DODO代币。 ### 如何计算流动性挖矿的年化利率(APR)?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#ru-he-ji-suan-liu-dong-xing-wa-kuang-de-nian-hua-li-l---apr-) 流动性挖矿的年化利率(APR)计算公式如下:(奖励代币每个区块的奖励 \* 预估每年的总区块数 \* 奖励代币的美元价格)除以挖矿池中的总资金。 vDODO[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#vdodo) ---------------------------------------------------------------------- ### 持有vDODO有哪些好处?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#chi-you-vdodoyou-na-xie-hao-chu-) vDODO是为忠诚的DODO用户设计的会员代币。持有vDODO,您将享有以下好处: 1. 交易手续费红利 2. vDODO会员特权 3. 提案和治理投票权 4. 在DODO平台的IDO和众筹活动中获得更高的份额 5. 交易手续费折扣 ### vDODO会员奖励多少?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#vdodohui-yuan-jiang-li-duo-shao-) 每个区块释放6个DODO代币,分配给vDODO持有者。奖励以vDODO形式支付,实时计息,并进行复利。vDODO持有者按比例获得DODO会员奖励。邀请你的朋友铸造vDODO将获得额外的10%奖励。 ### vDODO邀请者的地址有哪些限制吗?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#vdodoyao-qing-zhe-de-di-zhi-you-na-xie-xian-zhi-ma-) 第一次铸造vDODO时,您需要输入邀请者地址。默认邀请者是DODO团队。您可以选择另一个已铸造vDODO的以太坊地址作为邀请者。一旦设置完成,无法更改邀请者。 ### 如何铸造vDODO?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#ru-he-zhu-zao-vdodo) 将100个DODO质押在DODO流动性挖矿合约中,即可铸造1个vDODO。 ### 赎回vDODO需要支付费用吗?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#shu-hui-vdodoxu-yao-zhi-fu-fei-yong-ma-) 要将您的vDODO换回DODO,您需要支付相应的退出费用。此退出费用将以vDODO形式实时分配给所有剩余的vDODO持有者,并根据DODO忠诚度指数计算。 "DODO忠诚度指数"定义为 "vDODO供应量 \* 100" 除以 "DODO的流通供应量"。忠诚度指数越高,退出费用越低,如下所示: * 当忠诚度指数大于0.5且超过DODO总供应量的50%质押时,退出费用达到最低的5%。 * 随着忠诚度指数的降低,退出费用逐渐增加。 * 当忠诚度指数小于0.1且只有DODO流通量的10%以下被质押时,退出费用达到最高的15%。 ### 如何计算DODO的流通供应量?[#](https://docs.dodoex.io/zh/home/faq---trouble-shooting#ru-he-ji-suan-dodode-liu-tong-gong-ying-liang-) 基于以下地址的DODO数量从总供应量中扣除,从而计算出DODO的流通供应量。当锁定代币合约发生更改时,DODO团队将实时更新此列表。 0x4447183c50e82a8b0141718c405381a3b1bad634 - 激励代币 0x3e19d726ed435afd3a42967551426b3a47c0f5b7 - DODO团队、投资者、市场 0x380312700ed61e4401d27e62508b82d0ae162d9e - 流动性挖矿奖励 0x95c4f5b83aa70810d4f142d58e5f7242bd891cb0 - DODO团队多签 0x0e504d3e053885a82bd1cb5c29cbaae5b3673be4 - 预挖奖励 0x8876819535b48b551c9e97ebc07332c7482b4b2d - DODO-USDT池 0x9224fc9d1389734cebb7cb29545bddc546fb9802 - 种子轮锁定 --- # 开发者文档中心 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 开发者文档中心 ======= 了解如何使用 DODO 的开发者资源进行构建。 欢迎来到 DODO 开发者文档中心。本文档介绍了 DODO 开发者门户、合约和数据,您可以学习如何与 DODO 进行构建。 [![image](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdeveloper-portal-intro03.9905c08c.png&w=3840&q=75)\ \ 开发者门户\ \ 本部分将指导开发者如何快速使用 DODO 开发者门户。](https://docs.dodoex.io/zh/developer/developers-portal) [![image](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdeveloper-portal-intro04.ed0ea7e3.png&w=3840&q=75)\ \ 合约\ \ 本部分将帮助您了解 DODO 智能合约。](https://docs.dodoex.io/zh/developer/contracts) [![image](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdeveloper-portal-intro05.bcd7f318.png&w=3840&q=75)\ \ DODO 数据\ \ 本部分将帮助您了解 DODO 数据。](https://docs.dodoex.io/zh/developer/data) --- # PMM Algorithm - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 📗 PMM Algorithm ================ Introduction [#](https://docs.dodoex.io/en/product/pmm-algorithm#introduction) ------------------------------------------------------------------------------- DODO uses the _Proactive Market Maker_ (PMM) algorithm to provide liquidity for its various services. The PMM is an inventory management strategy. When the quantity of an asset decreases, the PMM algorithm automatically increases the price quoted for this asset in anticipation of buying back the missing inventory from the market. ### A Simple Example [#](https://docs.dodoex.io/en/product/pmm-algorithm#a-simple-example) Let's use a simple example to illustrate how PMM works. The following example numbers are not exact, but are mentioned just to help you understand how the algorithm works. Peter's boss gives him $100 and 10 apples. There are people in the market who buy and sell apples, and Peter has to satisfy these people's buying and selling needs with the inventory he has on hand. In more technical terms, this is called "providing liquidity to the apple market". The boss tells Peter that the apples are about $10 each and then goes home to rest, leaving Peter to wait for customers. Someone buys an apple from Peter, and Peter decides to increase the price a little bit and sells it to him for $12. The $2 is the so-called "slippage". At this point, Peter's inventory is $112 and 9 apples. That is an increase of $12 and a decrease of 1 apple. Peter automatically places an order to buy one apple at $11 (slightly above market price), expecting to buy back an apple as soon as possible to make up the shortfall. Soon Peter buys back the apple for $11, leaving Peter with $101 and 10 apples in stock, a net increase of $1 and 0 apples. Although it cost $1 more, the extra $2 received through the slippage was enough to make up for it, and Peter helped his boss make a net profit of $1. The PMM algorithm acts like Peter did in the above scenario, and you are Peter's boss. What Peter does (in a nutshell) is provide liquidity while maintaining a healthy inventory by actively adjusting prices. Price Curve [#](https://docs.dodoex.io/en/product/pmm-algorithm#price-curve) ----------------------------------------------------------------------------- To better explain how the PMM manages inventory, we need to introduce the [Price Curve Simulator](https://simulator.dodoex.io/) . This tool allows you to see exactly how the price of an asset changes when its inventory changes. This depth chart consists of two roughly triangular (though not necessarily symmetrical) shapes, representing bids (buy orders) on the left and asks (sell orders) on the right, along the price x-axis and the depth y-axis. The two triangles can be mathematically described by two parameters, mid price and slope, or how “steep” the triangle is. If you adjust the parameter kk, you will find that: the larger the value of kk, the steeper the curve, the more sensitive the price is to the quantity of inventory, and the larger the trading slippage. The smaller the value of kk is, the smoother the curve, and the less sensitive the price is to the quantity in stock, which makes for less slippage as well. This parameterkk, which we call the slippage factor, is the key to the PMM algorithm and allows market makers to concentrate liquidity around a certain price. The smaller it is, the more liquidity is concentrated and the better the price at which traders can trade. Using Smart Contracts to Provide Liquidity [#](https://docs.dodoex.io/en/product/pmm-algorithm#using-smart-contracts-to-provide-liquidity) ------------------------------------------------------------------------------------------------------------------------------------------- DODO has implemented the EVM smart contract version of the PMM algorithm, in which the concept of orders does not exist. Instead, it is replaced by the supply and consumption of liquidity. --- # 教程 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 本章将系统介绍如何使用DODO产品的各种功能。您可以通过点击下面的标题来导航到具体的教程。 [如何切换并连接到不同的网络?\ \ 详情](https://docs.dodoex.io/zh/product/tutorial/how-to-switch-and-connect-to-different-networks) [如何交换代币?\ \ 详情](https://docs.dodoex.io/zh/product/tutorial/how-to-trade) [如何进行跨链交易?\ \ 详情](https://docs.dodoex.io/zh/product/tutorial/how-to-conduct-cross-chain-transactions) [如何添加流动性?\ \ 详情](https://docs.dodoex.io/zh/product/tutorial/how-to-provide-liquidity) [如何参与流动性挖矿?\ \ 详情](https://docs.dodoex.io/zh/product/tutorial/how-to-join-liquidity-mining) [如何参加Crowdpooling活动?\ \ 详情](https://docs.dodoex.io/zh/product/tutorial/how-to-join-a-crowdpooling-event) [如何创建代币?\ \ 详情](https://docs.dodoex.io/zh/product/tutorial/how-to-create-tokens) [如何创建挖矿活动?\ \ 详情](https://docs.dodoex.io/zh/product/tutorial/how-to-create-a-mining-campaign) [如何创建一个众筹池?\ \ 详情](https://docs.dodoex.io/zh/product/tutorial/how-to-create-a-crowdpooling-event) [如何创建流动性池?\ \ 详情](https://docs.dodoex.io/zh/product/tutorial/how-to-create-pools) [如何成为DODO V3策略提供者(SP)?\ \ 详情](https://docs.dodoex.io/zh/product/tutorial/how-to-be-dodov3-sp) [如何通过Starter功能参与项目?\ \ 详情](https://docs.dodoex.io/zh/product/tutorial/how-to-participate-in-projects-through-the-starter-function) --- # 路线图 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🗺 路线图 ====== ### 2025[#](https://docs.dodoex.io/zh/home/roadmap#2025) * BirdLayer V1 主网 - 全方位流动性层 * BirdLayer 主网发布 * Omni-Trade 桥接器公开发布 * 扩大对 EVM 和非 EVM 链的支持 * 启动生态系统活动及桥接折扣 * DEXpert V2 发布 - 一站式公链 DEX 工具包 * BirdFly V1 发布 - 一站式启动平台,用于创建和交易梗 * 代币创建 - 轻松创建您自己的梗代币 * 流动性迁移 - 无缝的流动性迁移确保市场活跃 * 自定义过滤器 - 精确筛选,找到最适合您的梗项目 * 信息集成 - 实时获取社交媒体上顶级梗的第一手信息 * DODO * 继续引入流动性并集成跨链路由 * 增加对 Solana 和 SVM 区块链的支持 ### 2024[#](https://docs.dodoex.io/zh/home/roadmap#2024) * 经典 AMM v2 和 v3 池 - 满足用户资产交易和做市的基本需求 * DEXpert V1 发布 - 一站式公链 DEX 工具包 * PMM 池 - 旨在服务多样化资产 * 稳定币对池 - 更高的周转率 * 单币池 - 低成本的单边流动性 * 私有资产池 - 为高端做市商量身定制以赚取费用 * 数据显示 - 支持 Defillama、Coingecko 和 Dune Analytics * DODO V3 准备就绪 * DODO 路由服务支持高扩展性 * DODO 开发者门户 * 在 DODOV3 中支持 UniV4 Hook * 支持节省 Gas 的池 * 新版用户界面 * DODO 交换专业模式 * DODO 钱包和代币列表界面 * DODO 开发者门户 * 支持交易费用分享(仅限邀请) ### 2023[#](https://docs.dodoex.io/zh/home/roadmap#2023) * DODO 开发者入口 * DODO 交易小部件收入分享功能 * 用户界面/用户体验升级 * 限价单 V2 * 跨链交易小部件 * DODOV3 池模式测试阶段 * 部署在 Base * 部署在 Linea * 部署在 Scroll * 部署在 Manta * 改善 DODOX 用户体验 还在阅读?[#](https://docs.dodoex.io/zh/home/roadmap#hai-zai-yue-du-) ----------------------------------------------------------------- 在这个快速变化的行业中,显然预先计划一年的开发任务是不现实的,因此此列表将经常更改。 如果您对 DODO 应该在未来实施什么更改或功能有任何想法,欢迎提交 DIP。点击下方链接了解更多信息: [DIP 步骤](https://blog.dodoex.io/dodo-improvement-proposals-steps-to-success-93f5a890e242) --- # What is DODO V3? - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🌟 What is DODO V3? =================== TL;DR[#](https://docs.dodoex.io/en/product/dodo-v3-pools#tl-dr) ---------------------------------------------------------------- DODO V3 is a vault maintained jointly by LPs (Liquidity Providers) and SPs (Strategy Providers), with LPs providing funds to the pool and SPs offering strategies. Both LPs and SPs share the fee income. For SPs, DODO V3 is: * A leveraged market making pool * A mixed asset pool with high capital utilization * A pool that saves 90% gas cost and support arbitrary market-making strategies For LPs, DODO V3 is: * A pool without impermanent loss * A pool with real yield Strategy makes difference[#](https://docs.dodoex.io/en/product/dodo-v3-pools#strategy-makes-difference) -------------------------------------------------------------------------------------------------------- With the transition of on-chain liquidity models from AMM to concentrated liquidity models (such as UniV3), LPs have a much larger strategy space. Where to concentrate liquidity, when to adjust the concentration position, and choosing the fee rate are all part of a strategy. We have found that there is a huge performance difference between different strategies. Most strategies perform poorly, while a few can bring high income for LPs. In other words, a lot of funds are using poorly performing strategies. There is a strategy-fund mismatch in the market. **We need a market that matches liquidity providers (LPs) and strategy providers (SPs).** Strategy management platforms built on UniV3 often impose many restrictions on strategy, such as only being able to adjust the fee parameters or requiring strategies to be written as smart contracts. However, DODO V3 imposes no limitations on liquidity strategies, allowing you to run them as black boxes off-chain. You can adjust parameters such as depth, price, fee rate, etc. at any time. However, to prevent malicious behavior from causing losses to the LPs, SPs are required to provide collateral. If a strategy performs poorly (e.g., resulting in IL - Impermanent Loss), the collateral will be deducted first. When the collateral is insufficient, the strategy will be removed and free all the fund it controlled. So from the perspective of a strategy provider, DODO V3 is a leveraged market making tool. SP can choose how much assets to manage, but in order to avoid unlimited occupation of LP funds, SP needs to provide a guaranteed interest rate to LP. As the utilization rate of LP funds by SP increases, the guaranteed interest rate will also gradually increase. This will bring about healthy competition among SPs, and strategies with stronger profitability will receive more funding support. A pool designed for pro[#](https://docs.dodoex.io/en/product/dodo-v3-pools#a-pool-designed-for-pro) ---------------------------------------------------------------------------------------------------- DODO V3 has made a big improvement in the performance of the pool. ### Multi-token pool[#](https://docs.dodoex.io/en/product/dodo-v3-pools#multi-token-pool) In traditional AMM pools, makers need to provide quotes between two tokens, which becomes cumbersome when providing liquidity for multiple trading pairs. In DODO V3, a single pool can accommodate many different tokens, and any two of these tokens can be exchanged with each other. This helps save maker funds. For example, if a market maker wants to provide liquidity for the DODO-ETH, ETH-USDC, and DODO-USDC trading pairs, in UniV3 they would need to deposit funds separately into three different pools. But in DODO V3, they can reuse ETH USDC and DODO tokens and achieve the same level of liquidity with less money. What's even more amazing is that market makers can only provide USDC as collateral, while other assets are provided by LP. Market makers no longer need to manage complex spot inventory. ### Decouple bid and ask liquidity[#](https://docs.dodoex.io/en/product/dodo-v3-pools#decouple-bid-and-ask-liquidity) We have found that most profitable market-making strategies have some form of hedging mechanism to varying degrees. Hedging strategies eliminate IL (impermanent loss) and achieve stable profits by hedging on other platforms. For example, when buying an ETH on AMM, they simultaneously sell an ETH on another platform. If the buying price of ETH is too high, there will be no profit in selling ETH anywhere else, making this transaction “toxic”. The operators of hedging strategies usually feel very troubled because AMM often generates “toxic” transactions that they cannot hedge against. For example, when a taker makes a purchase, it consumes the liquidity of the maker's ask liquidity. The AMM automatically increase the maker's bid price. But the new bid price may exceed maker's expectation, which is “toxic”. Therefore, to help strategy providers, DODO V3 decouples the bid and ask liquidity and eliminates the “toxic” transactions. ### Save over 90% gas compared to UniV3.[#](https://docs.dodoex.io/en/product/dodo-v3-pools#save-over-90--gas-compared-to-univ3) Rebalance is the most important action in market-making strategies, usually referring to resetting liquidity after price movements. In UniV3, this is reflected as removing and re-adding liquidity. The better the liquidity, the more frequent rebalancing should be done. DODO V3 has carefully designed smart contracts for rebalancing operations, reducing gas consumption by over 90% compared to uniV3. This significantly reduces the cost of executing market-making strategies and makes some strategies that cannot run on UniV3 profitable. --- # PMM算法 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 📗 PMM算法 ======== 简介[#](https://docs.dodoex.io/zh/product/pmm-algorithm#jian-jie) ---------------------------------------------------------------- DODO使用_Proactive Market Maker_(PMM)算法为其各种服务提供流动性。 PMM是一种库存管理策略。当资产数量减少时,PMM算法会自动调高该资产的报价,以预期从市场购回缺失的库存。 ### 一个简单的例子[#](https://docs.dodoex.io/zh/product/pmm-algorithm#yi-ge-jian-dan-de-li-zi) 让我们通过一个简单的例子来说明PMM的工作原理。下面的例子数字并非精确,仅用于帮助您理解算法的工作原理。 Peter的老板给了他100美元和10个苹果。市场上有人在买卖苹果,Peter必须用手里的库存满足这些人的买卖需求。从技术上讲,这被称为“为苹果市场提供流动性”。 老板告诉Peter苹果大约每个10美元,然后回家休息,留下Peter等待顾客。有人从Peter那里买了一个苹果,Peter决定稍微提高价格,以12美元卖给他。其中的2美元被称为“滑点”。此时,Peter的库存是112美元和9个苹果。增加了12美元,减少了1个苹果。 Peter自动下单以11美元的价格买入一个苹果(略高于市价),希望尽快买回一个苹果以弥补缺口。不久后,Peter以11美元买回了苹果,使Peter手头有101美元和10个苹果,净增加了1美元和0个苹果。尽管多花了1美元,但通过滑点获得的额外2美元足够弥补,Peter帮助老板实现了净利润1美元。 PMM算法就像Peter在上述情况下所做的,而您就是Peter的老板。Peter所做的(简而言之)是在积极调整价格的同时提供流动性,以保持良好的库存。 价格曲线[#](https://docs.dodoex.io/zh/product/pmm-algorithm#jia-ge-qu-xian) ------------------------------------------------------------------------ 为了更好地解释PMM如何管理库存,我们需要介绍[Price Curve Simulator](https://simulator.dodoex.io/) 。这个工具可以让您了解当库存变化时,资产价格是如何变化的。 这个深度图由两个大致呈三角形(虽然不一定是对称的)形状组成,左侧代表买单,右侧代表卖单,沿价格x轴和深度y轴。这两个三角形可以通过两个参数进行数学描述,中间价格和斜率,或者说三角形的“陡峭程度”。 如果调整参数kk,您会发现:值越大,曲线越陡,价格对库存数量的敏感性越高,交易滑点也越大。值越小,曲线越平滑,价格对库存的敏感性也越低,同时产生的滑点也较小。 这个参数kk,我们称之为滑点因子,是PMM算法的关键,使市场制造商可以将流动性集中在某个价格附近。它越小,流动性越集中,交易者交易的价格越好。 使用智能合约提供流动性[#](https://docs.dodoex.io/zh/product/pmm-algorithm#shi-yong-zhi-neng-he-yue-ti-gong-liu-dong-xing) --------------------------------------------------------------------------------------------------------------- DODO已经实现了PMM算法的EVM智能合约版本,其中不存在订单的概念,而是由流动性的供应和消耗来代替。 --- # 安全审计 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🔏 安全审计 ======= > 自协议创建以来,我们一直非常关注安全问题,并不断努力解决。DODO已经通过了多个审核人的审查,并始终秉持公开透明的原则,协议代码可在GitHub上公开获取。 **DODO V1智能合约已经接受了**[**Trail of Bits**](https://www.trailofbits.com/) **和**[**PeckShield**](https://peckshield.com/) **的审核** * [点击查看](https://github.com/DODOEX/dodo-audits/blob/main/DODO_V1/[Peckshield]%20dodo_audit_report_2020_16_en_1.0.pdf) 发布于2020年7月10日的PeckShield的审核报告。 * [点击查看](https://github.com/DODOEX/dodo-audits/blob/main/DODO_V1/[Trail%20of%20Bits]%20DODO%20Summary%20Report.pdf) 发布于2020年9月18日的Trail of Bits的审核报告。 **DODO V2智能合约已经接受了**[**SlowMist**](https://www.slowmist.com/?lang=zh) **和**[**PeckShield**](https://peckshield.com/) **的审核** * [点击查看](https://github.com/DODOEX/dodo-audits/blob/main/DODO_V2/SlowMist_Smart%20Contract_Security_Audit_Report_%20DODOV2.pdf) 发布于2021年4月13日的SlowMist的审核报告。 * [点击查看](https://github.com/DODOEX/dodo-audits/blob/main/DODO_V2/PeckShield-Audit-DODOV2-v1.0.pdf) 发布于2020年12月17日的PeckShield的审核报告。 **DODO V2 CrowdPooling和Vending Machine合约已经接受了**[**Beosin**](https://www.lianantech.com/#/index) **的审核** * [点击查看](https://github.com/DODOEX/dodo-audits/blob/main/DODO_V2/Besio%20Report%20for%20CP%20and%20DVM.pdf) 发布于2021年3月16日的Beosin的审核报告。 **vDODO合约已经接受了**[**CertiK**](https://certik.io/) **的审核** * [点击查看](https://github.com/DODOEX/dodo-audits/blob/main/vDODO/vDODO-final-report.pdf) 发布于2021年2月18日的CertiK的审核报告。 **DODO挖矿智能合约已经接受了**[**PeckShield**](https://peckshield.com/) **、**[**SlowMist**](https://www.slowmist.com/?lang=zh) **和**[**CertiK**](https://certik.io/) **的审核** * [点击查看](https://github.com/DODOEX/dodo-audits/blob/main/DODO_Mining/PeckShield-Audit-Report-DODOMineV2-DSP-v1.0rc.pdf) 发布于2021年4月10日的PeckShield的审核报告。 * [点击查看](https://github.com/DODOEX/dodo-audits/blob/main/DODO_Mining/PeckShield-Audit-Report-DODO-MineV3-v1.0.pdf) 发布于2021年7月2日的PeckShield的审核报告。 * [点击查看](https://github.com/DODOEX/dodo-audits/blob/main/DODO_NFT/[SlowMist]%20Mining%20and%20NFT.pdf) 发布于2021年6月21日的SlowMist的审核报告。 * [点击查看](https://github.com/DODOEX/dodo-audits/blob/main/DODO_Mining/CertiK%20Audit%20Final%20Report%20for%20DODO%20Mining%20V2.pdf) 发布于2021年3月31日的CertiK的审核报告。 **DODO LimitOrder和RFQ智能合约已经接受了**[**PeckShield**](https://peckshield.com/) **和**[**CertiK**](https://certik.io/) **的审核** * [点击查看](https://github.com/DODOEX/dodo-audits/blob/main/DODO_LimitOrder&&DODO_RFQ/Certik-DODO-LimitOrder-2021-12-15.pdf) 发布于2021年12月15日的CertiK的审核报告。 * [点击查看](https://github.com/DODOEX/dodo-audits/blob/main/DODO_LimitOrder&&DODO_RFQ/PeckShield-Audit-Report-DODOLimitOrder-v1.0.pdf) 发布于2021年12月30日的PeckShield的审核报告。 **DODO CrowdPooling V2智能合约已经接受了**[**CertiK**](https://certik.io/) **的审核** * [点击查看](https://github.com/DODOEX/dodo-audits/blob/main/DODO_CrowdPooling_V2/Certik-DODO-CrowdPooling-V2-2021-12-15.pdf) 发布于2021年12月15日的CertiK的审核报告。 **DODO GaslessTrading智能合约已经接受了**[**CertiK**](https://certik.io/) **的审核** * [点击查看](https://github.com/DODOEX/dodo-audits/blob/main/DODO_LimitOrder&&DODO_RFQ/Certik-DODO-GaslessTrading-2022-07-06.pdf) 发布于2022年7月6日的CertiK的审核报告。 **DODOFeeRouteProxy智能合约已经接受了**[**Sherlock**](https://www.sherlock.xyz/) **的审核** * [点击查看](https://github.com/DODOEX/dodo-audits/blob/main/DODO_FeeRouteProxy/Sherlock-Audit-DODOFeeRouteProxy-20221212.pdf) 发布于2022年12月12日的Sherlock的审核报告。 **DODO V3智能合约已经接受了**[**Sherlock**](https://www.sherlock.xyz/) **的审核** * [点击查看](https://audits.sherlock.xyz/contests/89/report) 发布于2023年7月1日的Sherlock的审核报告。 🐞 Bug悬赏计划[#](https://docs.dodoex.io/zh/home/security#---bugxuan-shang-ji-hua) ------------------------------------------------------------------------------- DODO团队一直在寻求反馈和建设性批评。为此,我们创建了Bug悬赏计划,允许DODO用户报告他们在DODO合约中发现的漏洞,并获得报酬。 DODO V2 Bug悬赏计划[#](https://docs.dodoex.io/zh/home/security#dodo-v2-bugxuan-shang-ji-hua) ----------------------------------------------------------------------------------------- 我们在Immunefi为V2合约开设了Bug悬赏计划。您可以在[DODO V2 Bug Bounty](https://immunefi.com/bounty/dodo/) 上查看。 DODO V3 Bug悬赏计划[#](https://docs.dodoex.io/zh/home/security#dodo-v3-bugxuan-shang-ji-hua) ----------------------------------------------------------------------------------------- DODO V3现已公开。我们还在Immunefi上开设了Bug悬赏计划。您可以在[DODO V3 Bug Bounty](https://immunefi.com/bounty/dodov3/) 上查看。 --- # DIP记录 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🗳 DIP记录 ======== DIP记录[#](https://docs.dodoex.io/zh/home/token-economy/dip-record#dipji-lu) --------------------------------------------------------------------------- * [DIP-1:DODO Booster计划](https://community.dodoex.io/t/dip-1-dodo-booster/1595) * DIP-1提议启动DODO Booster计划,以吸引更多优质项目方在DODO上建立流动性池,培养用户交易习惯并增加活跃用户。 * [DIP-2:销毁50%的vDODO退出费](https://community.dodoex.io/t/dip-2-50-vdodo/7598) * DIP-2提议通过销毁50%的vDODO退出费,为DODO代币引入通缩机制。 * [DIP-3:交易费分红和社区储备](https://community.dodoex.io/t/dip-3/8068) * DIP-3提议将之前全部分给LP的交易费分配方式调整为80%交易费给LP,剩余的20%用于两个方面,一部分用于回购DODO并分发给vDODO持有人,另一部分用于建立社区储备。 * [DIP-4:迁移500万DODO到Arbitrum主网进行奖励计划](https://community.dodoex.io/t/dip-4-500-dodo-arbitrum/8460) * DIP-4提议迁移500万DODO代币到Arbitrum主网进行流动性挖矿和未来的奖励计划。 * [DIP-5:支持vDODO转移功能](https://community.dodoex.io/t/dip-5-vdodo/8503) * DIP-5提议支持vDODO代币的转移功能,使vDODO持有人能够在更多应用场景下使用vDODO代币。 * [DIP-6:DODO社区储备框架](https://community.dodoex.io/t/dip-6-dodo/8713) * DIP-6提议为DODO社区储备制定了框架和流程标准。 * [DIP-7:迁移价值500万美元的DODO到Aurora/NEAR协议进行奖励计划](https://community.dodoex.io/t/dip-7-500-dodo-aurora-near/9730) * DIP-7提议将价值500万美元的DODO代币迁移到Aurora网络进行流动性挖矿和未来的社区奖励计划。 * [DIP-8:降低主要稳定币交易对的LP费用](https://community.dodoex.io/t/dip-8-reduction-of-lp-fees-for-major-stablecoin-trading-pairs/9824) * DIP-8提议将DODO平台上USDC-USDT(ETH)和BUSD-USDT(BSC)交易对的LP部分交易费用降低,以提高我们在稳定币交易市场上的竞争力。该提议还包括增加LP的奖励以补偿此减少。 * [DIP-9:迁移200万DODO代币到Polygon PoS链用于奖励计划](https://community.dodoex.io/t/dip-9-migrating-2-million-dodo-to-the-polygon-pos-chain-for-incentive-programs/10124) * DIP-9提议将200万DODO代币迁移到Polygon Proof of Stake链上,用于稳定币流动性挖矿和其他奖励计划。 * [DIP-10:迁移200万DODO代币到Avalanche、BOBA和Moonriver用于未来的激励](https://community.dodoex.io/t/dip-10-migration-of-2-million-dodo-tokens-each-to-avalanche-boba-and-moonriver-for-future-incentives/10155) * DIP-10提议将各200万DODO代币迁移到Avalanche、Boba和Moonriver主网,用于流动性挖矿和未来的交易激励。 * [DIP-11:vDODO成员奖励调整](https://community.dodoex.io/t/dip-11-vdodo-membership-reward-adjustment/10346) * DIP-11提议结束当前vDODO成员奖励的双重奖励期,并将vDODO退出费上限从15%降低到10%。 * [DIP-12:调整部分池子的流动性挖矿激励](https://community.dodoex.io/t/dip-12-adjustment-of-liquidity-mining-incentives-on-select-pools/10376) * DIP-12提议调整多个链上的流动性挖矿激励。 * [DIP-13:治理框架更新](https://community.dodoex.io/t/dip-13-governance-framework-update/10410) * DIP-13提议开发新的治理系统,并从旧的vDODO合约迁移到新的合约。 * [DIP-14:迁移150万DODO代币到Polygon主网用于流动性挖矿激励](https://community.dodoex.io/t/dip-14-migration-of-1-5-million-dodo-tokens-to-polygon-mainnet-for-liquidity-mining-incentives/10484) * DIP-14提议将150万DODO代币迁移到Polygon主网用于流动性挖矿激励。 * [DIP-15:提议增加DODO财务多签名所需的签名者数量](https://community.dodoex.io/t/proposal-to-increase-the-number-of-signers-required-for-the-dodo-treasury-multisig/10536) * DIP-15提议DODO团队应增加DODO财务多签名交易所需的签名者数量。 * [DIP-16:暂停vDODO质押池中的DODO发放,以缓解通胀并增强长期稳定性](https://community.dodoex.io/t/proposal-for-a-temporary-pause-of-dodo-emissions-in-vdodo-staking-pool-to-mitigate-inflation-and-enhance-long-term-stability/11292) * DIP-16提议暂时停止在vDODO质押池中发放DODO,并取消vDODO的赎回费用。 * [DIP-17:迁移DODO代币到Scroll并战略使用社区财库资金](https://snapshot.org/#/dodobird.eth/proposal/0xfcff3c1696857de18f27a8ce2df3b15759611a5c6bc7efe3b10148b1918c4fda) * 该DIP提议将200万DODO代币迁移到Scroll,一个领先的zkEVM Layer 2解决方案,旨在利用其增强的可扩展性和性能为DODOX提供支持,DODOX是我们最先进的跨链DEX聚合器。同时,该提议还建议从DODO社区财库中拨款10万美元。这笔投资旨在提高Scroll上的交易量和用户参与度,为社区财库的增长和可持续发展打下良好基础。 * [DIP-18:迁移2亿DODO代币到DODOchain并将未来的协议收入转移到财库](https://snapshot.org/#/dodobird.eth/proposal/0xd170ddeb2a9353416654495d3aa953ec725a1a1a70ea4cf679eb34ab91e3b521) * DIP-18提议迁移2亿DODO代币到DODOchain,以支持DODO DEX的TVL增长和用户基础,吸引未来的合作伙伴和生态系统发展,并建议将DODO DEX的未来协议收入直至新的代币经济模型发布全部转移到DODO社区财库,届时资金的分配将通过治理和投票决定。 --- # Fees - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 💰 Fees ======= Route Fee[#](https://docs.dodoex.io/en/product/fees#route-fee) --------------------------------------------------------------- DODO charges a **0.1% fee on all swaps** done through the SmartTrade routing algorithm This fee is deposited in a special treasury account, whose address is 0x903cF528c0C54eCB99991a69E0E095589917a0ce. The revenue from this new fee will be used to pay for SmartTrade’s operational costs, including development, maintenance, and promotional costs. These costs will go to a variety of initiatives, including funding the development of new SmartTrade features, trading incentives, marketing campaigns, and more. This new fee is essential to the continued growth and success of the SmartTrade routing algorithm. As things currently stand, there is no source of funds dedicated to its operational effort, and therefore the continued development and community adoption of this feature remain limited. The new trading fee will allow DODO to not just maintain SmartTrade’s efficiency and market competitiveness, but also to grow SmartTrade to encompass new features and horizons - thereby increasing its market share and overall efficiency. The more it grows, the better the swap prices become - and the more the trading fee pays for itself in ensuring the best conversion rates. LP Fee[#](https://docs.dodoex.io/en/product/fees#lp-fee) --------------------------------------------------------- The LP fee is collected by the liquidity pool and distributed to liquidity providers based on their share of the pool. The LP fee rate varies for each pool, and you can view it on the pool details page. MT Fee[#](https://docs.dodoex.io/en/product/fees#mt-fee) --------------------------------------------------------- DODO will allocate 20% from the public pool fees for the community treasury. The specific distribution ratio is as follows: * 80% to liquidity providers (LPs) * 20% to the DODO Community Treasury --- # 如何通过Starter功能参与项目? - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 如何通过Starter功能参与项目? ================== 1\. 访问“Starter”页面[#](https://docs.dodoex.io/zh/product/tutorial/how-to-participate-in-projects-through-the-starter-function#1--fang-wen--starter-ye-mian) ---------------------------------------------------------------------------------------------------------------------------------------------------------- Starter功能目前处于测试阶段,仅支持BNBChain,其他网络将很快得到支持。 2\. 选择您想参与的项目[#](https://docs.dodoex.io/zh/product/tutorial/how-to-participate-in-projects-through-the-starter-function#2--xuan-ze-nin-xiang-can-yu-de-xiang-mu) ----------------------------------------------------------------------------------------------------------------------------------------------------------------- 通过左侧的功能列表访问Starter主页。页面的右侧您可以看到: * 进行中:已经开始的项目,您可以参与starter * 即将开始:尚未开始的项目,您可以预览项目信息并申请白名单 3\. 确保您当前钱包的网络与项目的网络相同[#](https://docs.dodoex.io/zh/product/tutorial/how-to-participate-in-projects-through-the-starter-function#3--que-bao-nin-dang-qian-qian-bao-de-wang-luo-yu-xiang-mu-de-wang-luo-xiang-tong) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 如果网络不匹配,则无法读取您的白名单状态、硬顶、代币余额等,并且无法参与starter。 请在参与之前切换钱包网络。 4\. 检查项目信息[#](https://docs.dodoex.io/zh/product/tutorial/how-to-participate-in-projects-through-the-starter-function#4--jian-cha-xiang-mu-xin-xi) -------------------------------------------------------------------------------------------------------------------------------------------------- 点击您想参与的项目,然后您可以找到项目的详细信息。 一旦进入项目页面,项目信息将显示在左侧,您可以浏览项目的各种规则和时间信息。 * 白名单: 左上角的“白名单”表示您当前连接的钱包地址是否有资格参加项目starter。未列入白名单的地址将无法参与项目starter。您可以通过“立即申请”按钮按照项目要求尝试获取资格。 * 配额: “配额”表示您当前连接的钱包地址的最大投资金额,您不能超过该金额进行投资。 * 项目信息: 您可以确认项目代币的详细信息,以及代币筹款的实时状态。 * 时间表: 您可以确认项目的时间表,以及筹款结束后的领取时间、分发时间和解锁机制。 * 项目介绍: 项目团队将在此处介绍他们的项目,例如团队、路线图、投资者等。 5\. 投资[#](https://docs.dodoex.io/zh/product/tutorial/how-to-participate-in-projects-through-the-starter-function#5--tou-zi) ---------------------------------------------------------------------------------------------------------------------------- 一旦进入项目页面,操作区域位于右侧,您可以使用接受的代币进行购买,并在之后领取项目代币。 操作区域顶部显示了项目的状态。将鼠标指针悬停在相应阶段上,可以查看当前订阅处于哪个阶段以及可用的操作。 * 即将开始: 此阶段表示项目尚未开始,您可以预览项目的信息并尝试获取白名单资格。 * 进行中: 在此阶段,您可以投资您的资产。 请注意代币价格和投资截止日期。 对于固定价格项目,可以在结束前随时提取资金;对于可变价格模式,无法提取资金。 资金记录和代币认领记录可以通过底部的操作记录查看。 * 已完成 此阶段表示投资流程已结束,但代币的释放尚未开始。 您可以检查您已经投资的代币数量。 * 认领 此阶段表示您在当前时间可以认领的代币数量。将鼠标指针移动到该处,可以查看您已经认领的代币和即将释放的代币。 单击下方的“认领”按钮并查看您的钱包交易,以接收代币。 如果项目允许超募,超募资金将与第一笔认领同时取出。 --- # DODO Toolbox - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🛠️ DODO Toolbox: A Comprehensive Suite for DeFi Innovators =========================================================== A Comprehensive Suite for DeFi Innovators DODO Toolbox is a robust collection of features designed to empower users in the decentralized finance (DeFi) space. This suite integrates three key functionalities: Create Token, Liquidity Mining, and Crowdpooling, each catering to different aspects of the DeFi ecosystem. Create Token[#](https://docs.dodoex.io/en/product/toolbox#create-token) ------------------------------------------------------------------------ This tool allows users to effortlessly create their own ERC20 tokens on the EVM compitable blockchain. It offers a user-friendly interface for setting up key token parameters like total supply, token name, and decimals. Additional features like "Burn," "Trading Fees," and "Supply Increase" provide further customization, making token creation both accessible and versatile. Liquidity Mining[#](https://docs.dodoex.io/en/product/toolbox#liquidity-mining) -------------------------------------------------------------------------------- You can create your own liquidity mining campaign on DODO with a few clicks. It offers two forms of mining: Single Coin Mining, where users stake tokens without the risk of principal loss. And LP Market Making Mining, involving adding funds to liquidity pools with potential principal risks. These options cater to different risk appetites and strategies. Crowdpooling[#](https://docs.dodoex.io/en/product/toolbox#crowdpooling) ------------------------------------------------------------------------ A unique blend of crowdfunding and liquidity pools, Crowdpooling allows equitable token distribution and market initiation. It's designed to prevent bot interference and offers a liquidity protection period, ensuring a secure and fair environment for both project owners and participants. Together, these tools form DODO Toolbox, a comprehensive and dynamic suite offering a range of solutions from token creation to liquidity provision and market launch. DODO Toolbox embodies the essence of DeFi innovation, providing an integrated platform for users to engage, create, and grow within the burgeoning DeFi landscape. --- # DODO V2: A Leap Forward in Decentralization - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 💧 DODO V2: A Leap Forward in Decentralization ============================================== Launched in February 2021, DODO V2 marked a significant evolution in the decentralized finance (DeFi) space. Over the subsequent two years, it has undergone continuous iterations to improve and expand its offerings. Unlike its predecessor, DODO V1, which limited pool creation and market-making strategies to the DODO team with a sole reliance on Oracle for price feeds, DODO V2 introduced a fully permissionless system. This pivotal upgrade democratized the creation of capital pools and market-making strategies, empowering anyone to contribute to the ecosystem. DODO V2 offers a suite of three distinct types of liquidity pools designed to cater to the diverse needs of various tokens: * DODO Vending Machine (DVM): Tailored for long-tail tokens, the DVM is an innovative solution for assets that are not widely traded but still require market liquidity. * DODO Private Pool (DPP): Aimed at mainstream tokens, the DPP provides a more bespoke liquidity environment, allowing for greater control over trading strategies and parameters. * DODO Stable Pool (DSP): Specifically for stablecoins, the DSP ensures efficient and stable liquidity management, addressing the unique requirements of stablecoin trading pairs. It is important to note that DODO V2 was not designed to replace DODO V1. Instead, it serves as a complementary part, expanding the capabilities and reach of the DODO ecosystem. Through these innovations, DODO V2 continues to push the boundaries of what's possible in DeFi, offering enhanced flexibility, increased accessibility, and a more robust infrastructure for liquidity providers and traders alike. You can find the pool list here and more details about the smart contract here. --- # 费用 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 💰 费用 ===== 路由费[#](https://docs.dodoex.io/zh/product/fees#lu-you-fei) ---------------------------------------------------------- DODO 对通过 SmartTrade 路由算法完成的所有兑换收取 **0.1% 的费用**。 该费用将存入一个专门的财政账户,其地址为 0x903cF528c0C54eCB99991a69E0E095589917a0ce。 这笔新费用的收入将用于支付 SmartTrade 的运营成本,包括开发、维护和促销成本。这些成本将用于多项计划,包括资助新的 SmartTrade 功能的开发、交易激励、市场营销活动等。 这项新费用对于 SmartTrade 路由算法的持续增长和成功至关重要。就当前情况而言,尚无专门用于其运营的资金来源,因此持续开发和社区对该功能的采用仍然有限。新的交易费将使 DODO 不仅能够维持 SmartTrade 的效率和市场竞争力,还能够推动 SmartTrade 增长到涵盖新功能和新领域,从而提高其市场份额和整体效率。它越发展,换算价格就越优——交易费也越能自我覆盖,从而确保最佳兑换率。 LP 费率[#](https://docs.dodoex.io/zh/product/fees#lp-fei-l-) ----------------------------------------------------------- 流动性池收取此费,并根据其在池中的份额分配给流动性提供者。LP 费率对每个池都不同,您可以在池详情页查看。 MT 费[#](https://docs.dodoex.io/zh/product/fees#mt-fei) ------------------------------------------------------- DODO 将从公共池费中分配 20% 用于社区财政。具体分配比例如下: * 80% 给流动性提供者(LPs) * 20% 给 DODO 社区财政 --- # 仪表盘 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🔢 仪表盘 ====== ### 相关 Subgraph 数据统计表解释[#](https://docs.dodoex.io/zh/developer/data#xiang-guan--subgraph-shu-ju-tong-ji-biao-jie-shi) 所有核心指标的数据都来自 Subgraph,而 Subgraph 的数据来源于调用合约时抛出的事件。 在 Subgraph 中,对于日期维度,我们使用国际标准时间进行一天的统计,因此仪表盘上的横轴表示国际标准时间的日期。 在 Subgraph 中,我们有几个基础池来计算与美元相关的价格,其中第一个是稳定币交易池,我们使用交易量最高的交易池作为基础池,并根据交易量的权重计算稳定币的美元价格。此外,链上基础代币到链上稳定币的交易池也会被考虑为基础池,用于提供美元价格,Subgraph 中的法币数据仅供参考。 在进行显示数据统计时,我们会从第三方统计平台获取法币价格进行数据验证。 ### 核心指标[#](https://docs.dodoex.io/zh/developer/data#he-xin-zhi-biao) **交易量:** 我们使用 PairDayData 来跟踪每日每个交易对的数据,使用 TokenDayData 来跟踪每日每个代币的交易数据,每日交易量的数据是每个代币的交易量乘以该代币的法币价格。 **市值:** 从 Subgraph 获取所有池子,并从每个池子中读取 BaseReserve 和 QuoteReserve(即合约上的 BaseToken 和 QuoteToken 的余额),乘以代币的当前法币价格,将两个代币的美元价值之和记录为市值。不包括 Coingecko、Coinmarket 或 Debank 不接受的代币在市值显示中。 **用户地址数量:** 与 DODO 的智能合约进行了交互的地址数量。 **交易数量:** 在 DODO 上发生的交易数量。 **智能合约池子数量:** 在 DODO 上创建的池子数量。 **交易对数量:** 在 DODO 上交易的交易对数量。 ### 交易对数据[#](https://docs.dodoex.io/zh/developer/data#jiao-yi-dui-shu-ju) 所有在 DODO 上进行交易的代币对,交易对数据提供了在 DODO 上进行交易的代币对的信息,因为 DODO 的智能路由功能将帮助用户找到最优价格,外部池子的交易量是用户发起的尚未进入 DODO 流动性池的交易。换手率是计算得出的数据。 **变动比例:** 24 小时的交易量除以当前做市资金 ### 价格图表[#](https://docs.dodoex.io/zh/developer/data#jia-ge-tu-biao) DODO 提供可选的图表,用户可以查看代币对的价格变动。 **全部:** 从第三方平台([Coingecko](https://www.coingecko.com/) )获取代币对的全部数据。 **仅 DODO:** 只通过 DODO 流动性进行的交易。 **未知来源:** 波动性较高的小币种,仅供参考。 --- # DODO V1: The First Step of DODO - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 💧 DODO V1: The First Step of DODO ================================== In August 2020, the DeFi landscape saw the emergence of DODO V1, marking the first iteration of DODO's product line. The platform was conceptualized as a solution to the prevalent issues faced by Uniswap V2, which at the time was the leading decentralized exchange. DODO V1 was created to address specific problems such as: * Impermanent loss suffered by liquidity providers (LPs). * The requirement for LPs to deposit two types of assets. * The high transaction fees borne by traders. Innovative Approach and Evolution[#](https://docs.dodoex.io/en/product/dodo-v1-pools#innovative-approach-and-evolution) ------------------------------------------------------------------------------------------------------------------------ DODO V1 introduced concentrated liquidity around the oracle price to enhance capital efficiency. The mechanism aimed to collect sufficient transaction fees to compensate for impermanent loss. Additionally, it innovated by separating the liquidity of buy and sell orders, allowing LPs to deposit and withdraw a single asset instead of two. To attract more users, DODO V1 dynamically adjusted transaction fees to minimize trading costs. The novel approach quickly garnered attention from users and venture capitalists, inspiring many new projects to adopt similar concepts even into 2023. Adapting to Challenges[#](https://docs.dodoex.io/en/product/dodo-v1-pools#adapting-to-challenges) -------------------------------------------------------------------------------------------------- However, as the platform evolved, it became evident that merely following the oracle price was insufficient to eliminate impermanent loss. This realization led to the decision to phase out most non-stablecoin trading pools in favor of more flexible pricing strategies. Consequently, apart from the stablecoin pools, DODO V1's trading pools were gradually deprecated and migrated to newer versions. DODO V1 Today[#](https://docs.dodoex.io/en/product/dodo-v1-pools#dodo-v1-today) -------------------------------------------------------------------------------- Currently, DODO V1's stablecoin pools remain the most active and voluminous on the exchange. These pools have achieved impressive capital efficiency and low transaction fees, continuously supplying the market with robust liquidity. You can find the pool list and more details about the smart contract [here](https://docs.dodoex.io/en/developer/contracts/dodo-v1-v2) . Single-Sided Deposits and Withdrawals[#](https://docs.dodoex.io/en/product/dodo-v1-pools#single-sided-deposits-and-withdrawals) -------------------------------------------------------------------------------------------------------------------------------- DODO introduced a single-sided deposit and withdrawal function in V1. This feature allows liquidity providers to provide liquidity without changing their existing exposure (in simple terms, they can deposit whatever they have without leverage), greatly facilitating liquidity provision. However, this feature has come at a cost of additional complexity for the system. This section will focus on the special design for single-sided deposit and withdrawal scenarios. If you are using a product without this feature, not using a single-sided deposit and withdrawal product, you can ignore this section. According to the PMM formula, the price depends on the deviation of the short-side asset from its equilibrium price, and any single-sided deposit and withdrawal of the short side asset will change the market price. Let's take the example of when B Note: deposit rewards and withdrawal fees are only applied to DODO V1 --- # DODO 合约 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 📚 DODO 合约 ========== DODO V1、V2 与 V3 都基于 PMM 算法构建。 DODO AMM V2 和 AMM V3 基于 AMM 算法,并且是从 Uniswap AMM 分叉。 DODO V1/V2[#](https://docs.dodoex.io/zh/developer/contracts#dodo-v1-v2) ------------------------------------------------------------------------ * 资本高效的流动性池:DODO V1/V2 通过 PMM 算法实现资本高效的流动性提供,支持对单边代币的流动性提供,降低无常损失,并在交易中将滑点降至最低。 * 智能聚合交易:DODO V1/V2 提供 SmartTrade,能够在多种流动性来源中发现并智能路由,以给出任意两种代币之间的最佳价格。 * 高效且灵活的做市策略:DODO V1/V2 消除了创建新资产流动性池的诸多约束,使资产比率、流动性深度、佣金率等可以自由定义并实时调整。 * 低成本的新资产发行:DODO V1/V2 开发众筹池化,允许任何人通过众筹池以低成本发行新资产并创建更好的流动性池。对资金与代币的比例以及起始价格的限制被取消。 DODO V3[#](https://docs.dodoex.io/zh/developer/contracts#dodo-v3) ------------------------------------------------------------------ * 多资产池:在 DODO V3 中,单个池可以容纳多种可互换的代币。这有助于为做市商节省成本,并以较少的资金实现同等水平的流动性。 * 买卖流动性分离:为了帮助策略提供者,DODO V3 将买入与卖出流动性分离,使对冲策略的运营商能够对冲、消除无常损失并实现稳定利润。 * 节省 Gas 费:DODO V3 设计了用于再平衡操作的智能合约,将 Gas 消耗比 UniV3 降低超过 90%,显著降低执行做市策略的成本,并使某些在 UniV3 上无法运行的策略变为可盈利。 DODO AMM V2[#](https://docs.dodoex.io/zh/developer/contracts#dodo-amm-v2) -------------------------------------------------------------------------- * 基于 AMM V2 的优化:DODO AMM V2 通过引入可调的 `feeRate` 参数,突破了原本固定的 0.3% 费率上限,并为流动性提供者和协议开发者在费率策略方面提供更大灵活性。 * 灵活的多池部署:同一代币对可以为不同的费率创建多个池,适应各种交易需求,帮助用户在低滑点和最大回报之间取得平衡。 * 兼容性与可升级性的平衡:在保持原始 AMM V2 的稳定性和广泛兼容性的同时,DODO AMM V2 增强了做市逻辑配置能力,为在未来版本中引入更高级的策略和聚合机制奠定基础。 DODO AMM V3[#](https://docs.dodoex.io/zh/developer/contracts#dodo-amm-v3) -------------------------------------------------------------------------- * 集中式流动性机制的整合:DODO AMM V3 通过引入集中式流动性设计,对 AMM V3 进行优化和扩展,使流动性提供方能够在自定义价格区间内注入资金,从而显著提高资本效率。 * 灵活的多层费率设置:V3 支持多个 `feeRate` 阶层,包括低至 0.01% 的超低费率,使同一代币对的多个池能够部署不同费率,提供更细化的费率选项以满足各种交易策略和用户需求。 * 组合式高效路径优化:结合 DODO 的专有 SmartTrade 路由系统,V3 支持跨多个池的智能定价与路径优化,动态选择最优路径以降低交易成本和滑点。 * 注重兼容性与可扩展性:DODO AMM V3 在保持与 AMM V3 架构兼容的同时,增强了在聚合交易、参数自定义和资产扩展方面的能力,支持更丰富的 DeFi 应用构建与整合。 --- # Security Audits - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🔏 Security Audits ================== > Since the creation of the protocol, we have been very concerned about security issues and are constantly working to fix them. DODO has been approved by several auditors, and has been adhering to the principles of openness and transparency, with the protocol code being publicly available on GitHub. **The DODO V1 smart contract has been audited by** [**Trail of Bits**](https://www.trailofbits.com/) **and** [**PeckShield**](https://peckshield.com/) * [Click to view](https://github.com/DODOEX/dodo-audits/blob/main/DODO_V1/[Peckshield]%20dodo_audit_report_2020_16_en_1.0.pdf) PeckShield's audit report, issued on July 10, 2020. * [Click to view](https://github.com/DODOEX/dodo-audits/blob/main/DODO_V1/[Trail%20of%20Bits]%20DODO%20Summary%20Report.pdf) Trail of Bits' audit report, issued on September 18, 2020. **The DODO V2 smart contract has been audited by** [**SlowMist**](https://www.slowmist.com/?lang=zh) **and** [**PeckShield**](https://peckshield.com/) * [Click to view](https://github.com/DODOEX/dodo-audits/blob/main/DODO_V2/SlowMist_Smart%20Contract_Security_Audit_Report_%20DODOV2.pdf) SlowMist's audit report, issued on April 13, 2021. * [Click to view](https://github.com/DODOEX/dodo-audits/blob/main/DODO_V2/PeckShield-Audit-DODOV2-v1.0.pdf) Peckshield's audit report, issued on December 17, 2020. **The DODO V2 CrowdPooling and Vending Machine contracts have been audited by** [**Beosin**](https://www.lianantech.com/#/index) * [Click to view](https://github.com/DODOEX/dodo-audits/blob/main/DODO_V2/Besio%20Report%20for%20CP%20and%20DVM.pdf) Beosin's audit report, issued on March 16, 2021. **The vDODO contracts have been audited by** [**CertiK**](https://certik.io/) * [Click to view](https://github.com/DODOEX/dodo-audits/blob/main/vDODO/vDODO-final-report.pdf) CertiK's audit report, issued on February 18, 2021. **The DODO Mining smart contracts have been audited by** [**PeckShield**](https://peckshield.com/) **,** [**SlowMist**](https://www.slowmist.com/?lang=zh) **, and** [**CertiK**](https://certik.io/) * [Click to view](https://github.com/DODOEX/dodo-audits/blob/main/DODO_Mining/PeckShield-Audit-Report-DODOMineV2-DSP-v1.0rc.pdf) PeckShield's audit report, issued on April 10, 2021. * [Click to view](https://github.com/DODOEX/dodo-audits/blob/main/DODO_Mining/PeckShield-Audit-Report-DODO-MineV3-v1.0.pdf) PeckShield's audit report, issued on July 2, 2021. * [Click to view](https://github.com/DODOEX/dodo-audits/blob/main/DODO_NFT/[SlowMist]%20Mining%20and%20NFT.pdf) SlowMist's audit report, issued on June 21, 2021. * [Click to view](https://github.com/DODOEX/dodo-audits/blob/main/DODO_Mining/CertiK%20Audit%20Final%20Report%20for%20DODO%20Mining%20V2.pdf) Certik's audit report, issued on March 31, 2021. **The DODO LimitOrder & RFQ smart contract has been audited b** [**PeckShield**](https://peckshield.com/) **and** [**CertiK**](https://certik.io/) * [Click to view](https://github.com/DODOEX/dodo-audits/blob/main/DODO_LimitOrder&&DODO_RFQ/Certik-DODO-LimitOrder-2021-12-15.pdf) Certik's audit report, issued on December 15, 2021. * [Click to view](https://github.com/DODOEX/dodo-audits/blob/main/DODO_LimitOrder&&DODO_RFQ/PeckShield-Audit-Report-DODOLimitOrder-v1.0.pdf) PeckShield's audit, issued on December 30, 2021. **The DODO CrowdPooling V2 smart contract has been audited by** [**CertiK**](https://certik.io/) * [Click to view](https://github.com/DODOEX/dodo-audits/blob/main/DODO_CrowdPooling_V2/Certik-DODO-CrowdPooling-V2-2021-12-15.pdf) Certik's audit report, issued on December 15, 2021. **The DODO GaslessTrading smart contract has been audited by** [**CertiK**](https://certik.io/) * [Click to view](https://github.com/DODOEX/dodo-audits/blob/main/DODO_LimitOrder&&DODO_RFQ/Certik-DODO-GaslessTrading-2022-07-06.pdf) Certik's audit report, issued on July 6, 2022. **The DODOFeeRouteProxy smart contract has been audited by** [**Sherlock**](https://www.sherlock.xyz/) * [Click to view](https://github.com/DODOEX/dodo-audits/blob/main/DODO_FeeRouteProxy/Sherlock-Audit-DODOFeeRouteProxy-20221212.pdf) Sherlock's audit report, issued on December 12, 2022. **The DODO V3 smart contract has been audited by** [**Sherlock**](https://www.sherlock.xyz/) * [Click to view](https://audits.sherlock.xyz/contests/89/report) Sherlock's audit report, issued on July 1, 2023. 🐞 Bug Bounty Program[#](https://docs.dodoex.io/en/home/security#---bug-bounty-program) ---------------------------------------------------------------------------------------- The DODO Team is always looking for feedback and constructive criticism. To this end, we've created a Bug Bounty Program, allowing DODO users to report vulnerabilities they find in the DODO contracts - and receive monetary reward for their efforts. DODO V2 Bug Bounty[#](https://docs.dodoex.io/en/home/security#dodo-v2-bug-bounty) ---------------------------------------------------------------------------------- We open a bug bounty program in Immunefi for V2 contracts. You could see it in [DODO V2 Bug Bounty](https://immunefi.com/bounty/dodo/) DODO V3 Bug Bounty[#](https://docs.dodoex.io/en/home/security#dodo-v3-bug-bounty) ---------------------------------------------------------------------------------- DODO V3 is public now. We also open a bug bounty program in Immunefi. You could see it in [DODO V3 Bug Bounty](https://immunefi.com/bounty/dodov3/) --- # DODO 工具箱 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🛠️ DODO 工具箱:DeFi 创新者的综合套件 ========================== Defi创新者的综合套件 DODO 工具箱是一个强大的功能集合,旨在赋予去中心化金融(DeFi)领域的用户更多权力。该套件集成了三个关键功能:创建代币、流动性挖矿和众筹池,分别满足DeFi生态系统的不同需求。 创建代币[#](https://docs.dodoex.io/zh/product/toolbox#chuang-jian-dai-bi) ---------------------------------------------------------------------- 这个工具允许用户在兼容EVM的区块链上轻松创建自己的ERC20代币。它提供了一个用户友好的界面,用于设置关键的代币参数,如总供应量、代币名称和小数位数。额外的功能,如“销毁代币”、“交易手续费”和“供应量增加”等,提供了更多的定制选项,使代币创建变得易于使用且多样化。 流动性挖矿[#](https://docs.dodoex.io/zh/product/toolbox#liu-dong-xing-wa-kuang) --------------------------------------------------------------------------- 你可以通过几个简单的步骤在DODO上创建自己的流动性挖矿活动。它提供了两种挖矿方式:单币挖矿,用户可以抵押代币而无风险丧失本金;LP做市挖矿,涉及向流动性池添加资金并承担潜在的本金风险。这些选项满足不同的风险偏好和策略。 众筹池[#](https://docs.dodoex.io/zh/product/toolbox#zhong-chou-chi) ----------------------------------------------------------------- 众筹池是众筹和流动性池的独特组合,允许公平分配代币并启动市场。它旨在防止机器人干扰,并提供一个流动性保护期,确保对项目所有者和参与者都提供安全和公正的环境。 这些工具共同构成了DODO工具箱,一个全面而动态的套件,提供从代币创建到流动性提供和市场启动的一系列解决方案。DODO工具箱体现了DeFi创新的精髓,为用户提供了一个集成平台,在蓬勃发展的DeFi领域中参与、创建和成长。 --- # DODO V2:去中心化的一大进步 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 💧 DODO V2:去中心化的一大进步 ==================== DODO V2在2021年2月推出,标志着去中心化金融(DeFi)领域的重大演进。在随后的两年中,它不断进行迭代,以改进和扩展其服务。与其前身DODO V1不同,DODO V2引入了完全无需许可的系统。这次重大升级使资金池的创建和做市策略民主化,任何人都可以为生态系统做出贡献。 DODO V2提供了三种不同类型的流动性池,旨在满足各种代币的不同需求: * DODO Vending Machine(DVM):定制化的流动性池,适用于那些交易不广泛但仍需要市场流动性的资产。 * DODO Private Pool(DPP):面向主流代币,DPP提供了更个性化的流动性环境,允许更多对交易策略和参数的控制。 * DODO Stable Pool(DSP):专为稳定币而设计,DSP确保高效稳定的流动性管理,满足稳定币交易对的独特需求。 需要注意的是,DODO V2并不是为了替代DODO V1而设计的。相反,它作为DODO生态系统的补充部分,扩展了DODO的功能和覆盖范围。通过这些创新,DODO V2继续推动DeFi的可能性,为流动性提供者和交易者提供更灵活、更可访问以及更强大的基础设施。 您可以在此处找到资金池列表,并了解更多有关智能合约的详细信息。 --- # 如何切换并连接到不同的网络? - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 如何切换并连接到不同的网络? ============== 1. 点击右上角并选择您想要切换到的网络。 ![switch00](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswitch00.a12d3e0c.png&w=3840&q=75) 2. 如果您已经将网络添加到您的钱包中,您可以在弹出窗口中简单地点击“切换网络”。 ![switch01](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswitch01.b3633ee4.png&w=3840&q=75) 3. 如果您的钱包没有您想要切换到的网络,请先授权您的钱包添加该网络。 ![switch02](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswitch02.67c00fe8.png&w=3840&q=75) ![switch03](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswitch03.e6cd3bbb.png&w=3840&q=75) 4. 您还可以通过在钱包的设置中搜索或手动添加一个网络来添加一个网络。我们建议从官方渠道获取添加网络的必要信息。 ![switch04](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswitch04.0c85e47b.png&w=3840&q=75) ![switch05](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswitch05.5c3bc031.png&w=3840&q=75) ![switch06](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswitch06.863b8809.png&w=3840&q=75) --- # 什么是DODO V3? - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🌟 什么是DODO V3? ============== TL;DR[#](https://docs.dodoex.io/zh/product/dodo-v3-pools#tl-dr) ---------------------------------------------------------------- DODO V3是由LP(流动性提供者)和SP(策略提供者)共同维护的储藏库,LP提供资金到池子中,SP提供策略。LP和SP都分享费用收入。 对于SP来说,DODO V3是: * 杠杆市场做市池 * 高资金利用率的混合资产池 * 节省90%的gas费用,并支持任意市场做市策略 对于LP来说,DODO V3是: * 无损失做市池 * 实际收益的做市池 策略产生差距[#](https://docs.dodoex.io/zh/product/dodo-v3-pools#ce-l-e-chan-sheng-cha-ju) ------------------------------------------------------------------------------------ 随着链上流动性模型从AMM转向集中流动性模型(如UniV3),LP有了更大的策略空间。集中流动性在哪里、何时调整集中性位置、选择费率都是策略的一部分。 我们发现不同的策略之间有巨大的性能差异。大多数策略表现不佳,而少数几个策略可以为LP带来高收益。换句话说,很多资金正在使用表现不佳的策略。市场上存在策略和资金不匹配的问题。**我们需要一个将流动性提供者(LP)和策略提供者(SP)匹配的市场。** 建立在UniV3上的策略管理平台通常对策略有很多限制,例如只能调整费用参数或要求策略以智能合约的形式编写。然而,DODO V3对流动性策略没有任何限制,允许您将其作为黑盒子离线运行。您可以随时调整深度、价格、费率等参数。 然而,为了防止恶意行为给LP造成损失,SP必须提供担保物。如果策略表现不佳(例如导致IL - 无常损失),将首先扣除担保物。当担保物不足时,策略将被移除并释放其控制的所有资金。因此,从策略提供者的角度来看,DODO V3是一个杠杆市场做市工具。 SP可以选择管理多少资产,但为了避免无限占用LP资金,SP需要向LP提供固定的利率。随着LP资金利用率的提高,固定利率也会逐渐增加。这将在SP之间产生健康的竞争,盈利能力更强的策略将获得更多的资金支持。 为专业人士设计的池子[#](https://docs.dodoex.io/zh/product/dodo-v3-pools#wei-zhuan-ye-ren-shi-she-ji-de-chi-zi) ----------------------------------------------------------------------------------------------------- DODO V3在池子的性能方面取得了巨大的改进。 ### 多代币池[#](https://docs.dodoex.io/zh/product/dodo-v3-pools#duo-dai-bi-chi) 在传统的AMM池中,做市商需要在两个代币之间提供报价,当为多个交易对提供流动性时,这变得很繁琐。在DODO V3中,一个单一的池子可以容纳许多不同的代币,任意两个代币都可以相互交换。这有助于节省做市商的资金。例如,如果一个做市商想要为DODO-ETH、ETH-USDC和DODO-USDC交易对提供流动性,他们在UniV3中需要将资金分别存入三个不同的池子。但在DODO V3中,他们可以重复使用ETH USDC和DODO代币,用更少的资金实现相同的流动性。 更令人惊讶的是,做市商只需要提供USDC作为担保物,其他资产由LP提供。做市商不再需要管理复杂的现货库存。 ### 解耦买卖挂单流动性[#](https://docs.dodoex.io/zh/product/dodo-v3-pools#jie-ou-mai-mai-gua-dan-liu-dong-xing) 我们发现,大多数有利可图的市场制造策略在不同程度上都有一些对冲机制。对冲策略通过在其他平台上对冲来消除IL(无常损失)并实现稳定的利润。例如,在AMM上购买ETH时,他们同时在另一个平台上卖出ETH。如果ETH的购买价格过高,在其他任何地方卖ETH就没有利润,这使这笔交易成为“毒品”。 对冲策略的操作者通常感到非常困扰,因为AMM经常产生无法对冲的“有毒”交易。例如,当接收者购买时,它消耗了做市商的卖出流动性。AMM自动提高做市商的买入价格。但新的买入价格可能超出做市商的预期,这是“毒品”。 因此,为了帮助策略提供者,DODO V3解耦了买入和卖出流动性,并消除了“有毒”交易。 ### 与UniV3相比,节省超过90%的gas费用。[#](https://docs.dodoex.io/zh/product/dodo-v3-pools#yu-univ3xiang-bi--jie-sheng-chao-guo-90-de-gasfei-yong-) 再平衡是市场制造策略中最重要的操作,通常是指在价格波动后重新设置流动性。在UniV3中,这体现为移除和重新添加流动性。流动性越好,越需要频繁进行再平衡。DODO V3为再平衡操作精心设计了智能合约,与uniV3相比,将gas消耗减少了90%以上。这大大降低了执行市场制造策略的成本,并使一些无法在UniV3上运行的策略变得有利可图。 --- # DODO Token - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🏦 DODO Token ============= [$DODO](https://www.coingecko.com/coins/dodo) , DODO's native token, was created for two main functions: to incentivize growth and capture value, both of which the DODO team has always viewed as central to the design of any token economy. DODO is a governance token that is also endowed with certain functions. DODO token holders enjoy the following benefits: * The right to create and vote on governance proposals (DIPs) * Favorable quota for IDO and Crowdpooling investment Currently, DODO tokens have been issued on four main chains, including Ether, BNB, Arbitrum, and Aurora. The total token supply remains unchanged. DODO Token Allocation[#](https://docs.dodoex.io/en/home/token-economy#dodo-token-allocation) --------------------------------------------------------------------------------------------- The DODO Team distributes many DODO tokens in cost-effective incentive campaigns to help grow the platform and the community. At the same time, DODO tokens are used to capture the full value of the platform, being distributed to the most loyal DODO community members. This includes up to 60% of the total DODO token supply being set aside for community incentives. The total DODO token supply is 1 billion, and the token distribution is as follows: | Group | Token Allocation | | --- | --- | | Core Team / Future Recruitment / Consultants | 15% | | Investors | 16% | | Initial Liquidity Provision (IDO) | 1% | | Operations / Marketing / Partners | 8% | | Community Incentives | 60% | Token Release Schedule[#](https://docs.dodoex.io/en/home/token-economy#token-release-schedule) ----------------------------------------------------------------------------------------------- | Group | Lock-up | Release | | --- | --- | --- | | Core Team / Future Recruitment / Consultants | 1 year | Linear release over next 2 years | | Seed Round Investors | 1 year | Linear release over next 2 years | | Private Placement Round Investors | 6 months | 10% release after 6 months, then linear release over next year | | Initial Liquidity Provision (IDO) | Tokens were fully released on August 15, 2020 | Tokens were fully released on August 15, 2020 | | Operations / Marketing / Partners | No lock-up | Immediate release | | Community Incentives | No lock-up | Immediate release | _All tokens of the investors and founding team have been fully unlocked now_. How to Buy $DODO[#](https://docs.dodoex.io/en/home/token-economy#how-to-buy--dodo) ----------------------------------------------------------------------------------- [$DODO](https://www.coingecko.com/coins/dodo) is our native token, which is issued on Ethereum and has been mapped to other blockchains such as BSC, Arbitrum, and others. The most direct way to buy DODO is to [visit our website](https://app.dodoex.io/) . If you are not used to using a DEX, you can also [buy it on Binance](https://www.binance.com/en/trade/DODO_USDT?layout=basic&theme=dark&type=spot) . Other Ways to Get $DODO [#](https://docs.dodoex.io/en/home/token-economy#other-ways-to-get--dodo) -------------------------------------------------------------------------------------------------- Besides direct purchase, you can also get DODO tokens by participating in a DODO [liquidity mining campaign](https://app.dodoex.io/earn?network=mainnet) . Distribution of DODO Tokens Across Chains[#](https://docs.dodoex.io/en/home/token-economy#distribution-of-dodo-tokens-across-chains) ------------------------------------------------------------------------------------------------------------------------------------- Currently, the DODO protocol is supported on Ethereum, Arbitrum, Polygon, BNBChain, Optimism, Avalanche, Aurora, OKTC, Conflux eSpace, Base, Linea, Scroll, Manta and other networks, with more added in the future. Despite this distribution, the total token supply remains the same. The following are some examples of DODO token migrations to other chains: * BNB Chain: The team has migrated 48 million DODO tokens to the BNB mainnet * Arbitrum: The team has migrated 5 million DODO tokens to the Arbitrum mainnet as a result of [DIP-4](https://snapshot.org/#/dodobird.eth/proposal/QmaNx6xe2zvKTNuaneD4Jb1hxj7mLxVDM2LsufTGwJyEj6) * Aurora: Team has migrated 3.52 million DODOs to the Aurora network as a result of [DIP-7](https://snapshot.org/#/dodobird.eth/proposal/0x282318bfffae135187b0b2995ebc1937d0e71bfe4a73b670722c6dce62a92c59) . * Polygon: eam has migrated 3.5 million DODOs to the Polygon(POS) network as a result of [DIP-9](https://snapshot.org/#/dodobird.eth/proposal/0x5efb7758844e23b62e81546f4e5cb4186901df581a1ec68ec44734d991fd4aab) and [DIP-14](https://snapshot.org/#/dodobird.eth/proposal/0x1db79fa64516176cfea771b3d727e148821fee4978ac709df2a0a222c4d4565f) * Avalanche: Team has migrated 2 million DODOs to the Avalanche network as a result of [DIP-10](https://snapshot.org/#/dodobird.eth/proposal/0xd64729f5490338d9866f9d54c7be43b4c238a3a64e2b0fa2355dcc20d37fb310) * Boba: Team has migrated 2 million DODOs to the Boba network as a result of [DIP-10](https://snapshot.org/#/dodobird.eth/proposal/0xd64729f5490338d9866f9d54c7be43b4c238a3a64e2b0fa2355dcc20d37fb310) * Moonriver: Team has migrated 2 million DODOs to the Moonriver network as a result of [DIP-10](https://snapshot.org/#/dodobird.eth/proposal/0xd64729f5490338d9866f9d54c7be43b4c238a3a64e2b0fa2355dcc20d37fb310) 🏁 vDODO[#](https://docs.dodoex.io/en/home/token-economy#---vdodo) ------------------------------------------------------------------- vDODO, by contrast is a membership certificate, which is set up for loyal coin holders. vDODO holders enjoy all the benefits of DODO holders, as well as: * A fraction of all transaction fees on DODO * vDODO Membership Rewards The relationship between DODO and vDODO is as follows: * If you pledge 100 DODO tokens, you can mint 1 vDODO. * Redeeming vDODO for DODO tokens requires paying a "redemption fee". Minting and Redeeming vDODO [#](https://docs.dodoex.io/en/home/token-economy#minting-and-redeeming-vdodo) ---------------------------------------------------------------------------------------------------------- ### Minting vDODO for Membership Rewards [#](https://docs.dodoex.io/en/home/token-economy#minting-vdodo-for-membership-rewards) Pledging 100 DODO tokens allows you to mint 1 vDODO. vDODO tokens can be transferred or traded between users, and vDODO holders receive membership rewards. Every new block, 12 DODO tokens are distributed proportionally to vDODO holders as a membership reward. If you invite your friends to mint vDODO, you will receive an additional 10% of the invitee's membership reward. Holding vDODO entitles you to receive a proportional share of 50% of the vDODO redemption fees paid by other users. The remaining 50% of redeemed vDODO tokens are permanently destroyed. ### Minting vDODO to Receive a Portion of Transaction Fee Revenue [#](https://docs.dodoex.io/en/home/token-economy#minting-vdodo-to-receive-a-portion-of-transaction-fee-revenue) The DODO Team distributes its platform revenue around the 22nd of each month. 75% of the revenue will be repurchased through the secondary market and minted into vDODO to be directly distributed to all vDODO holders. And 25% of the revenue will be transferred to [community treasury](https://etherscan.io/address/0xab21016bd4127638b8c555e36636449b33df1c38) ### Redeeming vDODO[#](https://docs.dodoex.io/en/home/token-economy#redeeming-vdodo) Transforming vDODO into DODO tokens, known as vDODO redemption, requires the payment of a proportional redemption fee. 50% of this refund fee will be immediately distributed to all non-redeeming vDODO holders in the form of vDODO tokens, and the remaining 50% are permanently destroyed. However, the [DIP16](https://snapshot.org/#/dodobird.eth/proposal/0xc02cec84c294bcf38a1f6631bda776a865a7b4b23a1001621ffe75ceb705d196) community has decided to remove the vDODO redemption fee. --- # 加入社群 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🔗 加入社群 ======= 如果您有任何问题或顾虑,DODO团队可以通过我们众多的社交媒体平台进行联系。让我们保持联系! * **Twitter:** [https://twitter.com/BreederDodo](https://twitter.com/BreederDodo) * **Discord 英文:** [https://discord.com/invite/tyKReUK](https://discord.com/invite/tyKReUK) * **Discord 中文:** [https://discord.gg/wSN9nn2kMx](https://discord.gg/wSN9nn2kMx) * **Medium:** [https://medium.com/dodoex](https://medium.com/dodoex) * **Telegram 英文:** [https://t.me/dodoex\_official](https://t.me/dodoex_official) * **Telegram 中文:** [https://t.me/dodozoo](https://t.me/dodozoo) * **Telegram 日本語:** [https://t.me/DODODEXNFTJapan](https://t.me/DODODEXNFTJapan) * **Telegram Tiếng Việt:** [https://t.me/DODOVietnam](https://t.me/DODOVietnam) * **Telegram Türk:** [https://t.me/dodo\_turkiye](https://t.me/dodo_turkiye) * **Telegram Bahasa Melayu:** [https://t.me/DODOMalaysia](https://t.me/DODOMalaysia) * **Telegram 한국인:** [https://t.me/DODOKorea](https://t.me/DODOKorea) * **Telegram Russian:** [https://t.me/DodoexRU](https://t.me/DodoexRU) * **Reddit:** [https://www.reddit.com/r/DodoEx/](https://www.reddit.com/r/DodoEx/) --- # DODO代币 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🏦 DODO代币 ========= [$DODO](https://www.coingecko.com/coins/dodo) 是DODO的原生代币,主要有两个功能:激励增长和价值捕获,DODO团队一直将这两个功能视为任何代币经济设计的核心。 DODO是一种治理代币,并且具有特定的功能。DODO代币持有者享有以下权益: * 创建和投票治理提案(DIP) * 在IDO和Crowdpooling中获得优惠配额 目前,DODO代币已在包括以太坊、BNB、Arbitrum和Aurora在内的四个主要链上发行。总的代币供应量保持不变。 DODO代币分配[#](https://docs.dodoex.io/zh/home/token-economy#dododai-bi-fen-pei) ----------------------------------------------------------------------------- DODO团队通过成本效益的激励活动向社区成员分发了许多DODO代币,以帮助平台和社区的发展。同时,DODO代币用于捕获平台的全部价值,并分发给最忠实的DODO社区成员。其中,将总共DODO代币供应量的60%用于社区激励。 DODO代币的总供应量为10亿个,代币分配如下: | 群体 | 代币分配 | | --- | --- | | 核心团队/未来招聘/顾问 | 15% | | 投资者 | 16% | | 初始流动性提供(IDO) | 1% | | 运营/营销/合作伙伴 | 8% | | 社区激励 | 60% | 代币释放时间表[#](https://docs.dodoex.io/zh/home/token-economy#dai-bi-shi-fang-shi-jian-biao) --------------------------------------------------------------------------------------- | 群体 | 锁定期 | 释放时间 | | --- | --- | --- | | 核心团队/未来招聘/顾问 | 1年 | 在接下来的2年内线性释放 | | 种子轮投资者 | 1年 | 在接下来的2年内线性释放 | | 私募轮投资者 | 6个月 | 6个月后释放10%,然后在接下来的1年内线性释放 | | 初始流动性提供(IDO) | 代币于2020年8月15日全部发行完毕 | 代币于2020年8月15日全部发行完毕 | | 运营/营销/合作伙伴 | 无锁定期 | 立即释放 | | 社区激励 | 无锁定期 | 立即释放 | _所有投资者和创始团队的代币现已完全解锁。_ 如何购买$DODO[#](https://docs.dodoex.io/zh/home/token-economy#ru-he-gou-mai--dodo) ------------------------------------------------------------------------------- [$DODO](https://www.coingecko.com/coins/dodo) 是我们的原生代币,发行在以太坊上,并映射到BSC、Arbitrum和其他区块链上。 最直接购买DODO的方式是[访问我们的网站](https://app.dodoex.io/) 。 如果您不习惯使用去中心化交易所,您也可以在[Binance上购买](https://www.binance.com/en/trade/DODO_USDT?layout=basic&theme=dark&type=spot) 。 获取$DODO的其他方式[#](https://docs.dodoex.io/zh/home/token-economy#huo-qu--dodode-qi-ta-fang-shi) -------------------------------------------------------------------------------------------- 除了直接购买,您还可以通过参与DODO的[流动性挖矿活动](https://app.dodoex.io/earn?network=mainnet) 来获得DODO代币。 DODO代币在不同链上的分布[#](https://docs.dodoex.io/zh/home/token-economy#dododai-bi-zai-bu-tong-lian-shang-de-fen-bu) ------------------------------------------------------------------------------------------------------------ 目前,DODO协议支持以太坊、Arbitrum、Polygon、BNBChain、Optimism、Avalanche、Aurora、OKTC、Conflux eSpace、Base、Linea、Scroll、Manta等网络,将来还会有更多。尽管分布在不同链上,总的代币供应量保持不变。以下是一些DODO代币迁移到其他链上的示例: * BNB Chain:团队已将4800万个DODO代币迁移到BNB主网 * Arbitrum:团队已将500万个DODO代币迁移到Arbitrum主网,作为[DIP-4](https://snapshot.org/#/dodobird.eth/proposal/QmaNx6xe2zvKTNuaneD4Jb1hxj7mLxVDM2LsufTGwJyEj6) 的结果 * Aurora:团队已将352万个DODO代币迁移到Aurora网络,作为[DIP-7](https://snapshot.org/#/dodobird.eth/proposal/0x282318bfffae135187b0b2995ebc1937d0e71bfe4a73b670722c6dce62a92c59) 的结果 * Polygon:团队已将350万个DODO代币迁移到Polygon(POS)网络,分别作为[DIP-9](https://snapshot.org/#/dodobird.eth/proposal/0x5efb7758844e23b62e81546f4e5cb4186901df581a1ec68ec44734d991fd4aab) 和[DIP-14](https://snapshot.org/#/dodobird.eth/proposal/0x1db79fa64516176cfea771b3d727e148821fee4978ac709df2a0a222c4d4565f) 的结果 * Avalanche:团队已将200万个DODO代币迁移到Avalanche网络,作为[DIP-10](https://snapshot.org/#/dodobird.eth/proposal/0xd64729f5490338d9866f9d54c7be43b4c238a3a64e2b0fa2355dcc20d37fb310) 的结果 * Boba:团队已将200万个DODO代币迁移到Boba网络,作为[DIP-10](https://snapshot.org/#/dodobird.eth/proposal/0xd64729f5490338d9866f9d54c7be43b4c238a3a64e2b0fa2355dcc20d37fb310) 的结果 * Moonriver:团队已将200万个DODO代币迁移到Moonriver网络,作为[DIP-10](https://snapshot.org/#/dodobird.eth/proposal/0xd64729f5490338d9866f9d54c7be43b4c238a3a64e2b0fa2355dcc20d37fb310) 的结果 🏁 vDODO[#](https://docs.dodoex.io/zh/home/token-economy#---vdodo) ------------------------------------------------------------------- 相比之下,vDODO是一种会员证书,专为忠实的代币持有者设立。vDODO持有者享受所有DODO持有者的权益,以及: * DODO上的所有交易手续费的一部分 * vDODO会员奖励 DODO和vDODO之间的关系如下: * 如果您质押了100个DODO代币,您可以铸造1个vDODO。 * 赎回vDODO以获取DODO代币需要支付“赎回费”。 铸造和赎回vDODO[#](https://docs.dodoex.io/zh/home/token-economy#zhu-zao-he-shu-hui-vdodo) ------------------------------------------------------------------------------------- ### 铸造vDODO以获取会员奖励[#](https://docs.dodoex.io/zh/home/token-economy#zhu-zao-vdodoyi-huo-qu-hui-yuan-jiang-li) 质押100个DODO代币可以铸造1个vDODO。vDODO代币可以在用户之间转移或交易,vDODO持有者将获得会员奖励。 每个新区块,12个DODO代币按比例分配给vDODO持有者作为会员奖励。 如果您邀请朋友铸造vDODO,您将额外获得他们会员奖励的10%。 持有vDODO使您有权获得其他用户支付的vDODO赎回费的50%的按比例份额。剩余的50%赎回的vDODO代币将永久销毁。 ### 铸造vDODO以获得交易费收入的一部分[#](https://docs.dodoex.io/zh/home/token-economy#zhu-zao-vdodoyi-huo-de-jiao-yi-fei-shou-ru-de-yi-bu-fen) DODO团队于每月22日左右分配其平台收入。收入的75%将通过二级市场回购并铸造成vDODO,直接分发给所有vDODO持有者。而收入的25%将转入[社区财库](https://etherscan.io/address/0xab21016bd4127638b8c555e36636449b33df1c38) 。 ### 赎回vDODO[#](https://docs.dodoex.io/zh/home/token-economy#shu-hui-vdodo) 将vDODO转换成DODO代币,即vDODO赎回,需要支付按比例计算的赎回费。其中50%的赎回费立即以vDODO代币形式分发给所有未赎回的vDODO持有者,剩余的50%将永久销毁。 然而,[DIP16](https://snapshot.org/#/dodobird.eth/proposal/0xc02cec84c294bcf38a1f6631bda776a865a7b4b23a1001621ffe75ceb705d196) 社区决定取消vDODO赎回费用。 --- # 如何进行跨链交易? - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 如何进行跨链交易? ========= 1\. 导航到"[DODOX](https://app.dodoex.io/) "[#](https://docs.dodoex.io/zh/product/tutorial/how-to-conduct-cross-chain-transactions#1--dao-hang-dao--dodox) -------------------------------------------------------------------------------------------------------------------------------------------------------- 前往DODO的DODOX交易页面。连接你的浏览器钱包开始交易。 ![crosschain000](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcrosschain000.bb34cd85.png&w=3840&q=75) 2\. 选择交易对[#](https://docs.dodoex.io/zh/product/tutorial/how-to-conduct-cross-chain-transactions#2--xuan-ze-jiao-yi-dui) ------------------------------------------------------------------------------------------------------------------------ 选择当前已链接的区块链的货币和你希望交易的数量。接下来,选择目标区块链的货币,你希望接收你的新资产。 ![crosschain001](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcrosschain001.0dd16a40.png&w=3840&q=75) --------------------------------------------------------------------------------------------------------------------------- ![crosschain002](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcrosschain002.cadd2f48.png&w=3840&q=75) --------------------------------------------------------------------------------------------------------------------------- ![crosschain002](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcrosschain003.361d8f64.png&w=3840&q=75) 3\. 提交交易[#](https://docs.dodoex.io/zh/product/tutorial/how-to-conduct-cross-chain-transactions#3--ti-jiao-jiao-yi) ------------------------------------------------------------------------------------------------------------------- 完成选择后,点击“**发送**”以预览交易。确保你的钱包中有足够的主网代币来支付手续费。例如,如果你正在使用Arbitrum链,你将需要一些ETH来支付手续费。 4\. 确认订单[#](https://docs.dodoex.io/zh/product/tutorial/how-to-conduct-cross-chain-transactions#4--que-ren-ding-dan) -------------------------------------------------------------------------------------------------------------------- 确认交易的订单信息,然后点击“**转账**”以将订单提交到跨链桥。 ![crosschain02](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcrosschain004.aeb99f17.png&w=1920&q=75) 5\. 检查交易状态[#](https://docs.dodoex.io/zh/product/tutorial/how-to-conduct-cross-chain-transactions#5--jian-cha-jiao-yi-zhuang-tai) --------------------------------------------------------------------------------------------------------------------------------- 提交后,您的订单将开始处理。要检查其进度,请点击“Tx”以在区块链浏览器上查看您的交易状态。交易成功处理后,您将看到一条令人放心的“交易完成”消息。 现在你已经成功在DODO上进行了跨链交易!尽情利用跨链交易的能力,轻松访问各种区块链上的多样化代币。愉快地交易吧! --- # 如何参加Crowdpooling活动? - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 如何参加Crowdpooling活动? =================== 1\. 导航至"[Crowdpooling](https://app.dodoex.io/cp/join) "页面[#](https://docs.dodoex.io/zh/product/tutorial/how-to-join-a-crowdpooling-event#1--dao-hang-zhi--crowdpooling-ye-mian) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2\. 连接钱包[#](https://docs.dodoex.io/zh/product/tutorial/how-to-join-a-crowdpooling-event#2--lian-jie-qian-bao) -------------------------------------------------------------------------------------------------------------- 3\. 选择要加入的池子[#](https://docs.dodoex.io/zh/product/tutorial/how-to-join-a-crowdpooling-event#3--xuan-ze-yao-jia-ru-de-chi-zi) ----------------------------------------------------------------------------------------------------------------------------- 通过右上角的搜索框,搜索地址或代币地址,找到您想要加入的Crowdpooling项目; 对于还未开始的项目,您可以点击“关注”,然后可以在“关注”列表中找到它们。 ![JoinCP00](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FJoinCP00.dea11793.png&w=3840&q=75) 4\. 参与Crowdpooling活动[#](https://docs.dodoex.io/zh/product/tutorial/how-to-join-a-crowdpooling-event#4--can-yu-crowdpoolinghuo-dong) ------------------------------------------------------------------------------------------------------------------------------------ Crowdpooling活动开始后,您可以点击“加入”按钮进入详情页。 在详情页上,您可以看到更多信息。在右侧窗口中输入您想要贡献的资金金额,以参与Crowdpooling活动。 首次使用某个代币参与Crowdpooling活动时,您需要进行批准操作。点击数字右侧的“锁定”符号以解锁,并在您的钱包中确认交易。 在链上确认交易后,您将准备好使用您希望贡献的代币数量参与Crowdpooling活动。点击“添加”并在您的钱包中确认,交易将在链上确认,您的参与即完成Crowdpooling活动! 5\. 领取您的分配/结算[#](https://docs.dodoex.io/zh/product/tutorial/how-to-join-a-crowdpooling-event#5--ling-qu-nin-de-fen-pei--jie-suan) ---------------------------------------------------------------------------------------------------------------------------------- 在Crowdpooling活动期间,您可以随时存入或取出您的资金。当Crowdpooling周期结束时,如果筹资上限未超出,您将获得100%的分配;如果筹集的资金超过100%,则您在Crowdpooling活动中的分配将根据您的总筹集金额占比乘以销售总代币数量来分配,并超额的资金将退还到您的钱包。 要从已完成的Crowdpool活动中检索您的分配,您需要将活动“结算”到您的钱包中。这将领取代币并发送您的贡献。点击结算按钮,确认条款和交易;在链上确认后,代币将发送到您的地址。 您已成功完成DODO Crowdpooling活动! Crowdpooling风险提醒[#](https://docs.dodoex.io/zh/product/tutorial/how-to-join-a-crowdpooling-event#crowdpoolingfeng-xian-ti-xing) ------------------------------------------------------------------------------------------------------------------------------- Crowdpooling是DODO V2中的重要功能。它是完全无权限的功能,意味着任何人都可以在DODO V2上创建Crowdpooling活动。 如果您希望参与Crowdpooling活动,请仔细检查活动详情页上的所有信息,并在进行任何财务承诺之前与项目创建者确认代币合约地址是否正确。 --- # 如何成为DODO V3策略提供者(SP)? - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 如何成为DODO V3策略提供者(SP)? ===================== DODO V3已经通过[Sherlock](https://audits.sherlock.xyz/contests/89) 的审计,并在主网上部署,与1inch等聚合器也已集成。目前正处于白名单测试阶段。在这个阶段,DODO将邀请策略提供者(SP)使用自己的资金进行市场做市,一旦稳定盈利,DODO V3将对流动性提供者(LP)开放,允许SP管理LP的资金。 如果您想尝试DODO V3,请联系[\[email protected\]](https://docs.dodoex.io/cdn-cgi/l/email-protection#593a36372d383a2d193d363d363c21773036) --- # 如何参与流动性挖矿? - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 如何参与流动性挖矿? ========== 流动性挖矿是去中心化金融(DeFi)生态系统的基石,它涉及向平台的资金池提供流动性,并以此获得奖励。这个概念在确保像DODO这样的交易所具有足够的流动性方面起着至关重要的作用,从而促进更顺畅的交易和更好的价格稳定性。 1\. 导航到 "[挖矿](https://app.dodoex.io/earn/mining) " 页面[#](https://docs.dodoex.io/zh/product/tutorial/how-to-join-liquidity-mining#1--dao-hang-dao---wa-kuang---ye-mian) ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2.选择一个交易对[#](https://docs.dodoex.io/zh/product/tutorial/how-to-join-liquidity-mining#2-xuan-ze-yi-ge-jiao-yi-dui) ------------------------------------------------------------------------------------------------------------------ 单击“Active”可以查看DODO上适用于流动性挖矿的每个交易对。选择一个交易对后,单击您想要抵押的代币的按钮。 注意:当在DODO上首次抵押、存款或交易代币时,您需要点击钱包应用中的“approve”按钮,允许DODO访问您的钱包中的该代币。 ![Joinmining00](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FJoinmining00.0fac6c0a.png&w=3840&q=75) 3.获取LP代币[#](https://docs.dodoex.io/zh/product/tutorial/how-to-join-liquidity-mining#3-huo-qu-lpdai-bi) ------------------------------------------------------------------------------------------------------- 如果您没有任何LP代币,请单击“获取\[token\] LP”按钮,转到该交易对的添加流动性页面,并通过向该流动性池添加流动性来获取LP代币。 ![Joinmining01](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FJoinmining01.c2ddf17c.png&w=3840&q=75) 4.批准抵押[#](https://docs.dodoex.io/zh/product/tutorial/how-to-join-liquidity-mining#4-pi-zhun-di-ya) --------------------------------------------------------------------------------------------------- 在交易对的流动性页面成功添加流动性并获取LP代币后,返回交易对的挖矿页面,然后单击“Approve”。 DODO上的LP代币被称为DLPs,它们是您作为DODO流动性提供者的凭证,代表了流动性池的一部分份额。DLP与流动性资产的比例不是1:1。 在DODO上点击“Approve”和“Stake”,并在您的钱包应用中确认交易,即可开始挖矿。 5.抵押和开始挖矿[#](https://docs.dodoex.io/zh/product/tutorial/how-to-join-liquidity-mining#5-di-ya-he-kai-shi-wa-kuang) ------------------------------------------------------------------------------------------------------------------ 6.提取您的资产[#](https://docs.dodoex.io/zh/product/tutorial/how-to-join-liquidity-mining#6-ti-qu-nin-de-zi-chan) ------------------------------------------------------------------------------------------------------------ 要提取您的资产,您需要首先在挖矿页面上取消抵押LP代币,然后在流动性页面上提取资金。 7.DODO的流动性挖矿方法[#](https://docs.dodoex.io/zh/product/tutorial/how-to-join-liquidity-mining#7-dodode-liu-dong-xing-wa-kuang-fang-fa) ----------------------------------------------------------------------------------------------------------------------------------- DODO代币作为奖励:DODO的流动性挖矿计划将参与者奖励其原生代币DODO。这些奖励非常灵活,参与者可以随时存入或取出,并立即领取奖励。 奖励分配机制:每个LP代币获得的DODO数量在每个区块中是固定的。这意味着随着更多参与者存入池中,个人收益率会降低。这确保了奖励的公平分配,收益基于提供的流动性比例。 多链可用性:DODO已将其流动性挖矿计划拓展到多个区块链,包括以太坊(ETH)、币安智能链(BSC)和Arbitrum。这种多链存在不仅多样化了流动性提供者的选择,也扩大了DODO平台的覆盖范围和功效。可以在[此处](https://app.dodoex.io/earn/mining) 找到有关进行中的流动性挖矿计划的详细信息,包括特定的资金池和奖励率。 8.风险免责声明[#](https://docs.dodoex.io/zh/product/tutorial/how-to-join-liquidity-mining#8-feng-xian-mian-ze-sheng-ming) -------------------------------------------------------------------------------------------------------------------- 流动性挖矿并不是没有风险的,总有可能发生损失。在进行流动性挖矿时请小心,并确保您理解其中的风险。 --- # 如何添加流动性? - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 如何添加流动性? ======== 1\. 导航到"[Pools](https://app.dodoex.io/pool) "页面[#](https://docs.dodoex.io/zh/product/tutorial/how-to-provide-liquidity#1--dao-hang-dao--pools-ye-mian) ------------------------------------------------------------------------------------------------------------------------------------------------------- ![AddLP00](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FAddLP00.d02daba3.png&w=3840&q=75) 2\. 选择一个流动性池[#](https://docs.dodoex.io/zh/product/tutorial/how-to-provide-liquidity#2--xuan-ze-yi-ge-liu-dong-xing-chi) ------------------------------------------------------------------------------------------------------------------------ 有两种方法可以找到要添加流动性的池子: * 按代币搜索:同一交易对可能有多个流动性池,根据其TVL和APY选择适合您需求的池子。 * 按池子合约地址搜索: 选择一个池子后,点击右侧的“**Add**”按钮将代币添加到该池子。 3\. 设置滑点容忍度[#](https://docs.dodoex.io/zh/product/tutorial/how-to-provide-liquidity#3--she-zhi-hua-dian-rong-ren-du) -------------------------------------------------------------------------------------------------------------------- 在存入资金之前,您可以通过点击“Add”对话框右下角的齿轮按钮来设置滑点容忍度。 ![AddLP01](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FAddLP01.41b0a584.jpg&w=3840&q=75) 当您打算为想要提供流动性的代币的市场价格和DODO的流动性来源所提供的报价价格之间的差异超过您的滑点容忍度时,交易将失败。 默认的滑点容忍度为3%。您可以自定义该百分比或点击“AUTO”选择自动模式。自动模式将根据不同交易对的流动性自动调整滑点容忍度: * 主要交易对(如BTC-USDT、WBTC-USDT、ETH-USDC、WETH-USDC、BNB-USDT和WBCB-USDT)的滑点容忍度设置为0.5%。 * 稳定币交易对(包括USDT、USDC、DAI和BUSD)的滑点容忍度设置为0.1%。 * 其他任何交易对的滑点容忍度设置为3%。 4\. 授权和添加资金[#](https://docs.dodoex.io/zh/product/tutorial/how-to-provide-liquidity#4--shou-quan-he-tian-jia-zi-jin) -------------------------------------------------------------------------------------------------------------------- 在确认存入资金之前,请确保仔细检查该池是否支持单边或仅支持双边提供。 点击“Add”后,通过您的钱包中的交易确认来完成存入。 注意:首次在DODO流动性池中存入代币时,您需要通过在钱包应用中点击“Approve”来允许DODO访问您钱包中的该代币。 5\. 如何查看您的流动性[#](https://docs.dodoex.io/zh/product/tutorial/how-to-provide-liquidity#5--ru-he-cha-kan-nin-de-liu-dong-xing) ---------------------------------------------------------------------------------------------------------------------------- 在成功在DODO上添加流动性后,您可以通过转到“Pools” -> “My Liquidity”来查看您的流动性位置。 6\. 提取您的流动性[#](https://docs.dodoex.io/zh/product/tutorial/how-to-provide-liquidity#6--ti-qu-nin-de-liu-dong-xing) ------------------------------------------------------------------------------------------------------------------ 您可以随时提取您的流动性。 * * * **风险声明** 提供流动性并非无风险,存在损失的可能性。在添加流动性时,请小心并确保您理解风险。 --- # 如何创建挖矿活动? - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 如何创建挖矿活动? ========= 1\. 导航到“挖矿”页面[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-a-mining-campaign#1--dao-hang-dao--wa-kuang--ye-mian) -------------------------------------------------------------------------------------------------------------------------------- ![createmining00](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcreatemining00.fbfcf7ec.png&w=3840&q=75) 2\. 选择挖矿类型[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-a-mining-campaign#2--xuan-ze-wa-kuang-lei-xing) ----------------------------------------------------------------------------------------------------------------------- ![createmining01](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcreatemining01.97410794.png&w=3840&q=75) 目前,DODO支持两种不同的挖矿类型,“单令牌”和“令牌对”,这两种类型都不支持启用通缩功能的代币(例如“自动销毁”和“交易费用”)。创建挖矿活动后,无法修改其参数。 * 单令牌:让用户为单个代币提供流动性的挖矿活动,与传统的AMM风格中的代币对不同。 * 令牌对:要求用户为代币对提供流动性的挖矿活动。 3\. 配置池参数[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-a-mining-campaign#3--pei-zhi-chi-can-shu) ---------------------------------------------------------------------------------------------------------------- **单令牌** * 选择要抵押的代币。DODO平台支持任何ERC-20代币的挖矿活动,包括DODO的代币创建功能创建的代币。 * 设置挖矿活动的持续时间:挖矿活动的开始和结束时间基于所在网络的区块高度。根据区块高度,活动的实际开始和结束时间可能略有偏差。 * 选择奖励代币:挖矿活动的奖励可以以单个或多个代币的形式支付。 * 输入挖矿活动的每日奖励和总奖励数量。 **令牌对** * 选择池子:目前,DODO只支持对在DODO平台创建的流动性池进行挖矿活动,不支持其他平台上流动性池的挖矿活动。 * 设置挖矿活动的持续时间:挖矿活动的开始和结束时间基于所在网络的区块高度。根据区块高度,活动的实际开始和结束时间可能略有偏差。 * 选择奖励代币:挖矿活动的奖励可以以单个或多个代币的形式支付。 * 输入挖矿活动的每日奖励和总奖励数量。 4\. 邀请朋友参加挖矿活动[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-a-mining-campaign#4--yao-qing-peng-you-can-jia-wa-kuang-huo-dong) --------------------------------------------------------------------------------------------------------------------------------------------- 点击"邀请"将挖矿活动的链接分享给您的朋友和社区成员。 5\. 风险声明[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-a-mining-campaign#5--feng-xian-sheng-ming) ---------------------------------------------------------------------------------------------------------------- 流动性挖矿并不是无风险的,始终存在损失的可能性。在进行操作时请谨慎,并确保您了解相关风险。 * * * **如果您的挖矿活动结束时没有参与者,如何提取挖矿奖励代币?** 如果一个挖矿活动结束时没有参与者,创建者可以通过参与活动并随后提取池子中存放的挖矿奖励代币,来提取池子中的全部奖励。 --- # 如何交换代币? - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 如何交换代币? ======= **交换模式**[#](https://docs.dodoex.io/zh/product/tutorial/how-to-trade#jiao-huan-mo-shi) -------------------------------------------------------------------------------------- 交换模式是DODO上的默认交易模式。根据执行交易时可获得的最佳价格,它涉及用你自己的代币交换你想要的代币。同时,它还要支付燃气费。 要在DODO上进行交易,请按照以下步骤进行: ### **1\. 导航至交易页面**[#](https://docs.dodoex.io/zh/product/tutorial/how-to-trade#-object-object) 导航至DODO应用网站([https://app.dodoex.io/](https://app.dodoex.io/) )。默认情况下,您应该进入交易页面。如果没有,请点击左侧菜单栏上的“交易”选项卡以导航至该页面。 连接您的浏览器钱包。DODO支持许多常用的浏览器钱包,包括MetaMask、Trust、TokenPocket、imToken、SafePal和Coinbase Wallet。 点击 “DODO X”选项卡开始交易。 ![swap00](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswap00.adbceb95.jpg&w=3840&q=75) ### **2\. 选择交易对**[#](https://docs.dodoex.io/zh/product/tutorial/how-to-trade#-object-object) 您可以通过搜索代币符号或地址来查找交易对。 ![swap01](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswap01.f0485ab2.jpg&w=3840&q=75) ### **3\. 配置交易设置**[#](https://docs.dodoex.io/zh/product/tutorial/how-to-trade#-object-object) 通过在交换对话框的右上角点击齿轮按钮来查找交易设置。 ![swap02](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswap02.845fde9c.jpg&w=3840&q=75) ![swap03](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswap03.69e98814.jpg&w=3840&q=75) DODO上可用的交易设置如下: **最大滑点:** * 当DODO的流动性来源所引用的市场价格与报价价格之间的差异超过您的滑点容忍度时,交易将失败。 * 滑点容忍度越高,越容易执行交易。然而,较高的滑点容忍度也会增加交易以次优汇率进行的可能性。 * 选择“**自动调整**”将使用DODO基于历史交易数据给出的建议值。 * 通过选择“**自定义**”,您可以自定义滑点。请谨慎使用,以避免潜在的资产损失。 **交易截止时间:** * 当交易提交的时间与在链上确认的时间之间的时间间隔超过交易截止时间时,交易将不会执行,以保护交易者免受市场波动的影响。 * 例如,一名交易者将交易截止时间设置为20分钟,而交易在提交后挂起超过30分钟,因为其燃气费设置过低。在这种情况下,交易的挂起时间超过了其交易截止时间,DODO合约不会执行该交易。 **上传到云端:** * 将滑点设置同步到云端,在其他浏览器和设备上共享滑点设置。 **专家模式:** * 在交换代币时,当待交易代币的滑点较高时,交易者可能会收到警报通知。导致此滑点的价格偏差可能是由于流动性较低或代币市场价格的延迟更新引起的。 * 当代币的滑点超过20%时,除非启用专家模式,否则交易者将无法为该代币提交交易。 **禁用间接路由:** * 选中此选项将确保路由算法仅在交易对之间的流动性池之间进行路由,并忽略任何包含中间代币的路由。 * 优点:抵御前运行,节省燃气费。 * 缺点:无法与中间代币交易。例如,DNX网络上的DNX/USDT交易对中只有一个流动性池。如果您禁用了间接路由,则只能用USDT购买DNX,而不能用其他货币购买。 **私人交换** * 私人交换是一种特殊功能,可以有效地保护用户免受“包子”攻击的侵害。这些攻击可能是由滑点设置与流动性池中的当前价格之间的差异引起的。 ### **4\. 批准和确认**[#](https://docs.dodoex.io/zh/product/tutorial/how-to-trade#-object-object) 首次在DODO上进行质押、存款或交易代币时,您需要点击钱包应用中的“批准”按钮,以让DODO获得访问您钱包中该代币的权限。 ![swap04](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswap04.d1f33231.jpg&w=3840&q=75) 您可以在钱包中设置批准代币的数量。如果选择“**最大值**”,DODO将被批准访问您的全部代币余额。如果您需要进行超过该金额的交易,您需要重新批准该代币,这将产生额外的燃气费用。我们建议选择“**使用网站建议**”,这样您只需在DODO上批准每个代币一次即可。不过,您也可以自定义批准的数量。 批准后,点击“确认订单”,然后在钱包中确认。一旦交易在区块链上确认,交易将成功。 ![swap05](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswap05.96b4dd23.jpg&w=3840&q=75) 您可以在交易页面底部的“订单历史”部分查看订单状态、汇率、创建日期、交易哈希和其他信息。 点击“交换”页面右上角的图标,可以打开图表以查看价格趋势。 ![swap06](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswap06.7aad5f58.jpg&w=3840&q=75) * * * **限价模式**[#](https://docs.dodoex.io/zh/product/tutorial/how-to-trade#xian-jia-mo-shi) ------------------------------------------------------------------------------------- DODO上的限价订单是指用户希望以特定的最低价格(称为限价)与目标代币进行交换的订单。只有当市场价格达到用户设定的限价时,交易才会被执行。 DODO上提交限价订单不会产生燃气费。 如果限价订单达到其限价,将由以下来源之一成交: * DODO上的流动性池 * 来自其他协议的聚合流动性池 * 其他用户发送的限价买入/卖出订单 要在DODO上进行限价模式交易,请按照以下步骤进行: ### **1\. 导航至交易页面**[#](https://docs.dodoex.io/zh/product/tutorial/how-to-trade#-object-object) 导航至DODO应用网站([https://app.dodoex.io/](https://app.dodoex.io/) )。默认情况下,您应该进入交易页面。如果没有,请点击左侧菜单栏上的“交易”选项卡以导航至该页面。 连接您的浏览器钱包。DODO支持许多常用的浏览器钱包,包括MetaMask、Trust、TokenPocket、imToken、SafePal和Coinbase Wallet。 点击“限价”选项卡开始交易。 ![swap07](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswap07.edfd399b.jpg&w=3840&q=75) ### 2\. 选择交易对[#](https://docs.dodoex.io/zh/product/tutorial/how-to-trade#2--xuan-ze-jiao-yi-dui) 以与交换模式相同的方式选择交易对。 ### 3\. 配置交易设置[#](https://docs.dodoex.io/zh/product/tutorial/how-to-trade#3--pei-zhi-jiao-yi-she-zhi) 您可以按顺序设置订单的数量、价格和截止时间。 限价订单截止时间是限价订单保持活动状态并有可能被执行的最长时间。超过此时间,限价订单将过期,并将不再被执行。 ### 4\. 批准和提交订单[#](https://docs.dodoex.io/zh/product/tutorial/how-to-trade#4--pi-zhun-he-ti-jiao-ding-dan) 首次在DODO上进行质押、存款或交易代币时,您需要点击钱包应用中的“批准”按钮,以让DODO获得访问您钱包中该代币的权限。 批准后,点击“限价订单”,然后按照钱包应用中的提示提交您的限价订单。提交限价订单不会产生燃气费。 请注意,为了支付交易执行的成本,限价订单的交易量必须不低于2000美元。 要取消限价订单,请转到“未成交订单”,点击订单右侧的“X”号,并按照钱包应用中的提示操作。 --- # DODO V1: DODO的第一步 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 💧 DODO V1: DODO的第一步 ==================== 2020年8月,DeFi领域中出现了DODO V1,这标志着DODO产品线的第一个版本。该平台的概念是为了解决当时领先的去中心化交易所Uniswap V2所面临的问题。DODO V1致力于解决以下特定问题: * 流动性提供者(LP)所遭受的暂时损失。 * LP需要存入两种类型的资产。 * 交易者承担的高交易费用。 创新的方法和演化[#](https://docs.dodoex.io/zh/product/dodo-v1-pools#chuang-xin-de-fang-fa-he-yan-hua) ---------------------------------------------------------------------------------------------- DODO V1引入了围绕预言机价格的集中流动性,以增强资本效率。该机制旨在通过收集足够的交易费用来弥补暂时损失。此外,它通过并分离了买单和卖单的流动性,使得LP可以存入和提取单一资产而不是两个资产。为了吸引更多用户,DODO V1动态调整交易费用,以最小化交易成本。 这种创新的方法迅速吸引了用户和风险投资人的关注,启发了许多新项目采用类似的概念,甚至持续到2023年。 应对挑战[#](https://docs.dodoex.io/zh/product/dodo-v1-pools#ying-dui-tiao-zhan) ---------------------------------------------------------------------------- 然而,随着平台的发展,显而易见的是,仅仅遵循预言机价格是不足以消除暂时损失的。这一认识导致决定逐渐淘汰大多数非稳定币交易池,以便采用更灵活的定价策略。因此,除了稳定币交易池外,DODO V1的交易池逐渐被废弃并迁移到更新的版本。 今天的DODO V1[#](https://docs.dodoex.io/zh/product/dodo-v1-pools#jin-tian-de-dodo-v1) ----------------------------------------------------------------------------------- 目前,DODO V1的稳定币交易池仍然是交易所上最活跃和成交量最大的。这些交易池已经实现了令人瞩目的资本效率和低交易费用,不断地为市场提供稳定且充足的流动性。 您可以在[此处](https://docs.dodoex.io/zh/developer/contracts/dodo-v1-v2) 找到池子列表和关于智能合约的更多详细信息。 单向存取操作[#](https://docs.dodoex.io/zh/product/dodo-v1-pools#dan-xiang-cun-qu-cao-zuo) ------------------------------------------------------------------------------------ DODO在V1中引入了单向存取功能。这个特性允许流动性提供者提供流动性而无需改变他们的现有暴露度(简单来说,他们可以在没有杠杆的情况下存入任何他们拥有的资产),大大方便了流动性提供。 然而,这个特性也使系统变得更加复杂。本节将重点介绍针对单向存取情景的特殊设计。如果您使用的产品没有此功能,没有使用单向存取和提取的产品,您可以忽略本节。 根据PMM公式,价格取决于偏离平衡价的短侧资产的大小,而任何对短侧资产的单向存取操作都会改变市场价格。我们以B小于B0的情况来举例。 ### 存款奖励[#](https://docs.dodoex.io/zh/product/dodo-v1-pools#cun-kuan-jiang-li) 回想一下PMM定价公式: P\=i(1−k+k(B0B)2)P = i(1-k + k(\\frac{B\_0}{B})^2) 当B0和B同时增加时,B0/B的值减小,价格将回到预言机价格i。 根据前面提到的固定参数规则,这意味着在花费所有多头仓位之后,回购的资产数量更多,流动性提供者会获得利润。 更直观的理解是:该存款使库存接近均衡状态,并扮演系统管理员的角色,因此获得一定的奖励。奖励的来源是使系统偏离均衡状态的交易者所支付的滑点费。 ### 提款手续费[#](https://docs.dodoex.io/zh/product/dodo-v1-pools#ti-kuan-shou-xu-fei) 类似地,如果流动性提供者提取的资产已经供不应求了,它将使系统偏离均衡状态更多。 在这种情况下,提款者需要支付一笔费用。该费用等于此提款引起的系统中的损失总和。该费用将分配给留在流动性池中的其他提供者。 考虑到上述存款奖励,如果做市商在存款后立即撤出,提取费用将大于存款奖励,从而消除无风险套利的可能。 值得注意的是,PMM池中的做市商只有在系统严重失衡且存取量非常大时才会支付显著的存款或提款费用。通常情况下,交易者不需要关注这些情况。 也就是说,交易者可以在系统失衡时存入并获得奖励,然后在系统平衡后提取代币以避免被收取费用。 > 注意:存款奖励和提款手续费仅适用于DODO V1 --- # Developer Docs Center - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) Developer Docs Center ===================== Learn about how to build with DODO's developer resources. Welcome to the DODO Developer Docs Center. This documentation introduces the DODO Developer Portal, Contracts and Data, you can learning how to build with DODO. [![image](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdeveloper-portal-intro03.9905c08c.png&w=3840&q=75)\ \ Developer Portal\ \ This section will guide developers how to quickly use DODO Developers Portal.](https://docs.dodoex.io/en/developer/developers-portal) [![image](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdeveloper-portal-intro04.ed0ea7e3.png&w=3840&q=75)\ \ Contracts\ \ This section help you to understand the DODO smart contracts.](https://docs.dodoex.io/en/developer/contracts) [![image](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdeveloper-portal-intro05.bcd7f318.png&w=3840&q=75)\ \ DODO Data\ \ This section help you to understand the DODO data.](https://docs.dodoex.io/en/developer/data) --- # Roadmap - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🗺 Roadmap ========== ### 2026[#](https://docs.dodoex.io/en/home/roadmap#2026) * ChainPilot V1.0 * Launch AI-native CLI * Support Token / Wallet / Protocol / Chain intelligence * Support on-chain swap execution * ChainPilot Evolution * Token creation * Multi-source data integration * SVM & BVM support * Non-EVM ecosystem expansion * More AI-native capabilities * EDGE AI * MVP completed * Telegram Agent + Mini App * AI strategy recommendation * Copy trading * AI Agent benchmark framework * DODO * Continue to onboard liquidity and integrate cross-chain routes ### 2025[#](https://docs.dodoex.io/en/home/roadmap#2025) * BirdLayer V1 Mainnet - Omni Liquidity Layer * BirdLayer Mainnet Launch * Omni-Trade Bridge Public Launch * Expand support for EVM & Non-EVM Chains * DODO * Continue to onboard liquidity and integrate cross-chain routes * Add support for Solana and SVM blockchains ### 2024[#](https://docs.dodoex.io/en/home/roadmap#2024) * Classic AMM v2 & v3 pools - Meet the basic needs of users for asset trading and market making * DEXpert V1 Launch - A one-stop tool kit for DEX on the public chain * PMM pool - aim for serving diverse assets * Stablecoin pair pools - Higher turnover rate * Single currency pools - Unilateral liquidity at low cost * Private asset pools - Tailored for high-end market makers to earn fees * Data display - Support Defillama, Coingecko, and Dune Analytics * DODO V3 Ready * DODO Route Service Support High Scalability * DODO Developer Portal * Support UniV4 Hook in DODOV3 * Support Gas Saving Pool * New Version UI * DODO Swap Pro Mode * DODO Wallet and Token list UI * DODO Developer Portal * Support Trading Fee Share (Invited Only) ### 2023[#](https://docs.dodoex.io/en/home/roadmap#2023) * DODO Developer Gateway * DODO Trading Widget Revenue Sharing Feature * UI/UX Upgrade * Limit Order V2 * Cross-chain Trading Widget * DODOV3 Pool Mode Test Phase * Deploy on Base * Deploy on Linea * Deploy on Scroll * Deploy on Manta * Improve DODOX User Experience Still Reading?[#](https://docs.dodoex.io/en/home/roadmap#still-reading) ------------------------------------------------------------------------ In this rapidly changing industry, it's obviously not realistic to plan a year's worth of development tasks in advance, so this list will change frequently. If you have any ideas about what changes or features DODO should implement in the future, you are welcome to submit a DIP. Click on the link below to find out more: [DIP Steps](https://blog.dodoex.io/dodo-improvement-proposals-steps-to-success-93f5a890e242) --- # 如何创建流动性池? - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 如何创建流动性池? ========= 1\. 导航到"[Pools](https://app.dodoex.io/pool) "页面[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-pools#1--dao-hang-dao--pools-ye-mian) -------------------------------------------------------------------------------------------------------------------------------------------------- ![createpool00](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcreatepool00.a0ed38c7.png&w=3840&q=75) 2\. 选择池类型[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-pools#2--xuan-ze-chi-lei-xing) ----------------------------------------------------------------------------------------------------- ![createpool01](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcreatepool01.2cb124cf.png&w=3840&q=75) 当前,DODO支持4种不同的流动性池类型: 标准池、锚定池、单币池和私有池。一旦创建,每个人都可以向池中提供流动性。 * 标准池: 标准池在资本配置和效率方面类似于Uniswap v2池。需要两种不同代币的流动性。 * 锚定池: 锚定池类似于Curve池,适用于合成资产。 * 单币池: 单币池仅使用一种代币类型创建。它们非常适用于出售项目代币以筹集资金。您可以使用您拥有的代币创建流动性市场,无需其他代币。 * 私有池: 只有池创建者可以为该池提供流动性,并且可以在创建后随时修改池参数。 3\. 配置池参数[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-pools#3--pei-zhi-chi-can-shu) ---------------------------------------------------------------------------------------------------- **标准池** * 输入您希望作为买入和卖出流动性的代币数量。 * 代币对的初始价格默认跟随市场价格。取消选择“以当前价格设定固定比例”将使您面临被套利的风险。 * 如果取消选择“以当前价格设定固定比例”,您的池的初始价格将由买入和卖出的流动性深度确定。例如,如果卖出侧流动性有1000个DODO,买入侧流动性有100个USDC,则初始价格将为1 DODO = 0.1 USDC(100 USDC / 1000 DODO)。 * 有三种费率选项: * 0.01%:适合稳定币交易对,如USDT/BUSD * 0.3%:适合主流资产,如BTC/ETH * 1%:适合异国情调的代币对 注意: 较低的交易费率往往会吸引更多的交易量进入池中。 **锚定池** * 输入您希望作为买入和卖出流动性的代币数量。 * 锚定汇率默认跟随当前市场价格。取消选择“以当前价格设定固定比例”将使您面临被套利的风险。 * 您可以取消选择“以当前价格设定固定比例”,并手动输入池的锚定汇率。卖出侧资产的初始价格将为手动输入的汇率。 * 有三种费率选项: * 0.01%:适合稳定币交易对,如USDT/BUSD * 0.3%:适合主流资产,如BTC/ETH * 1%:适合异国情调的代币对 注意: 较低的交易费率往往会吸引更多的交易量进入池中。 * 有三个滑点系数(k)的选项,默认值为1: * K = 0.5:适用于大多数交易对 * K = 0.01:适用于波动性较低的交易对,如BUSD/USDT * K = 1:适用于波动性较高的资产 注意: 滑点系数越小,交易者的滑点越低,市场深度越大。要了解更多信息,请观看我们关于滑点系数的教程视频。 **单币池** * 输入您希望提供卖出侧流动性的代币数量。 * 初始价格默认跟随当前市场价格。取消选择“以当前价格设定固定比例”将使您面临被套利的风险。 * 您可以取消选择“以当前价格设定固定比例”,并手动输入池的初始价格。您的卖出侧流动性将以手动输入的初始价格出售。 * 有三种费率选项: * 0.01%:适合稳定币交易对,如USDT/BUSD * 0.3%:适合主流资产,如BTC/ETH * 1%:适合异国情调的代币对 注意: 较低的交易费率往往会吸引更多的交易量进入池中。 * 有三个滑点系数(k)的选项,默认值为1: * K = 0.5:适用于大多数交易对 * K = 0.01:适用于波动性较低的交易对,如BUSD/USDT * K = 1:适用于波动性较高的资产 注意: 滑点系数越小,交易者的滑点越低,市场深度越大。要了解更多信息,请观看我们关于滑点系数的教程视频。 **私有池** * 输入您希望作为买入和卖出流动性的代币数量。目前只支持“标准池”和“单币池”创建。 * 代币对的初始价格默认跟随市场价格。取消选择“以当前价格设定固定比例”将使您面临被套利的风险。 * 有三种费率选项: * 0.01%:适合稳定币交易对,如USDT/BUSD * 0.3%:适合主流资产,如BTC/ETH * 1%:适合异国情调的代币对 注意: 较低的交易费率往往会吸引更多的交易量进入池中。 * 有三个滑点系数(k)的选项,默认值为1: * K = 0.5:适用于大多数交易对 * K = 0.01:适用于波动性较低的交易对,如BUSD/USDT * K = 1:适用于波动性较高的资产 注意: 滑点系数越小,交易者的滑点越低,市场深度越大。要了解更多信息,请观看我们关于滑点系数的教程视频。 4\. 检查池详情[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-pools#4--jian-cha-chi-xiang-qing) -------------------------------------------------------------------------------------------------------- 转到“我的池”页面,点击“管理”以查看池的详细信息,如交易量、交易费用收入等。 5\. 邀请朋友提供流动性[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-pools#5--yao-qing-peng-you-ti-gong-liu-dong-xing) ---------------------------------------------------------------------------------------------------------------------------- 点击“邀请”按钮将您的流动性池链接分享给您的朋友 6\. 存入/提取流动性[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-pools#6--cun-ru--ti-qu-liu-dong-xing) --------------------------------------------------------------------------------------------------------------- * 导航到“Pools” → “My Liquidity” * 找到流动性池 * 存入或提取流动性 了解不同池模型的特点[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-pools#le-jie-bu-tong-chi-mo-xing-de-te-dian) -------------------------------------------------------------------------------------------------------------------- 了解标准池的更多信息 标准池模型提供了一种经典的做市策略,让用户即使没有市场专业知识也可以参与其中。标准池的价格曲线模式由外部预言机控制,使得流动性始终集中在市场价格附近。 为了保持价格曲线,标准池需要频繁地更改中间价格,目前由Chainlink来维护中间价格。每次Chainlink更改价格时,标准池将重设价格曲线。 **其他参数** 除了引导价格**i**之外,还有两个由DODO控制的参数。这些参数是滑点系数**k**和手续费率**fee**,可以通过DODO的多签管理员钱包进行修改。未来,DODO将把所有对标准池参数的控制转移到DAO,以便社区管理做市策略。 了解锚定池的更多信息 锚定池是针对合成资产进行优化的流动性池。合成资产是一类通过各种机制将其价格锚定在特定目标上的资产。例如,USDT、USDC、BUSD、DAI都锚定在美元上;WBTC、RENBTC锚定在比特币上。相似锚定币之间的汇率非常稳定,通常在1:1左右波动。DODO锚定池定义了一个曲线,将流动性集中在锚定价格附近,符合合成资产市场模式,从而提供充足的流动性。 使用DODO,任何人都可以创建锚定池,并设置交换比率、滑点系数和手续费率以满足他们的需求。该池由PPM算法进行调控。 **锚定池优化了合成资产** 如果您的项目发行自己的USD稳定币或其他合成资产(例如sBTC),可以使用锚定池为其提供流动性。与常规AMM池相比,该曲线可以使您的稳定币以相同的TVL获得10倍甚至100倍的流动性。 即使合成代币与基础资产没有1:1的锚定,也可以实现这一点。例如,可以推出一个锚定在0.1美元的代币。 **参数不能修改** 合成资产与目标代币之间的市场通常非常稳定,为了给用户提供可靠的期望,锚定池的参数一旦设定就无法更改。 **现实生活中的例子** DODO维护了一个DAI-USDT的锚定池。该池的日换手率经常达到50%到100%,比竞争产品高出5到10倍。 了解单币池的更多信息 许多项目所有者在使用AMM提供流动性时面临以下问题: * 您必须拥有项目方的代币才能提供流动性 * 购买项目方的代币需要有良好的流动性 为了解决这些问题,项目所有者必须依靠一个复杂的发行流程。无论是拍卖、流动性挖矿还是自己提供初始流动性,都会消耗大量的项目所有者的精力,增加用户参与的门槛。 DODO创造了一种单方初始流动性解决方案,使整个流程变得简单,称为单币池模型。让我们看看它是如何工作的。 **DODO的单币池模型** 单币池可以类比为一个自动售货机,允许您将从其中购买的资产退回。您购买商品的金额将存储在池子里,当您不需要所购买的资产时,可以按照当前价格将其退还。 单币池的价格曲线由PMM算法定义,是一个具有最低价格的价格曲线,也就是从池中购买的第一件物品的价格。 任何人都可以建立一个单令牌池并设置其中包含的商品种类。您可以使用比特币(BTC)和以太坊(ETH)等主流资产进行设置,或者使用您自己发行的新资产。 您无需提供任何计价资产,只需用商品填充自动贩卖机。这种设计允许您在仅需五分钟的时间内,在DODO上为您的代币创造充足的流动性,而无需花一分钱。 与AMM的相似之处 如果使用滑点因子K=1创建单令牌池,并且指导价格i是一个非常小的数字,那么它几乎和AMM行为完全相同。您可以将单令牌池曲线视为AMM价格曲线,并截取所有小于i的部分。i越小,单令牌池曲线与真实的AMM曲线越接近。可以通过设置来实现。 有关这些计算的更多信息,请参阅[PMM概述](https://docs.dodoex.io/zh/product/pmm-algorithm) 部分。 任何人都可以参与 任何人都可以像参与AMM一样,向单令牌池提供双方的资产以参与提供流动性。区别在于,在重新增加流动性时,两种资产的价值无需为1:1。 任何人都可以参与添加流动性,因此有时将这些池称为公共池。 使用案例 构建高交易量市场的初始流动性 假设您是一个区块链开发人员,想要构建一个社区驱动的项目。您可以发行1000万个代币,其中1%(即10万)为项目团队保留。余下的(即990万个代币)将分发给社区。 假设您将代币价格设置为1美元。如果您想在AMM上为所有990万个代币创建一个流动性市场,您需要另外提供990万美元作为报价端的流动性 - 这是一笔您可能没有的巨大金额,因此该项目变得不可行。 您的替代选择是在一个更少的代币和更少的流动性的简单AMM池中创建流动性市场,例如1000美元和1000个代币,但是如果有人想要投资10万美元购买您的项目代币,他将支付10万美元,并仅获得1000个代币作为回报。这相当于每个代币100美元,是您设置的市场价格的100倍!显然,这是不可取的,该市场肯定不是一个高效的市场。 然而,您可以选择以1美元的初始价格和k值设为1的方式构建一个包含990万个代币的单令牌池。如果社区成员看好您的项目并购买10万个代币,他的平均价格仅为每个代币1.005美元! 快速提高流动性 例如,假设一个算法稳定币项目的以美元计价的代币已经跌破1美元。该项目需要尽快增加流动性以防止进入死亡螺旋。如果您能够在0.9美元时逆转价格下跌,这将极大地增强市场信心;但如果只在0.5美元时逆转,可能导致对您的代币信心的永久性损失。 这个假设的项目有一个简单的解决方案!假设项目代币名为X。创建一个DAI-X的池子,将指导价格设置为1,并将k值设为0.01。此外,您还可以以X作为奖励激励,鼓励流动性提供者将其LP代币存入该池中。通过这种方式,您可以确保提供在1 X = 1 DAI附近分配的充足的报价端流动性,这比传统AMM更具资本效率的融资模式。 即使不是一个算法稳定币项目,您仍然可以使用单令牌池以关键支撑价位为您的代币筹集资金,并结合奖励激励计划来鼓励提供流动性。 有关风险免责声明 提供流动性挖矿并非没有风险,总有可能损失资金。在进行操作之前,请谨慎并确保您了解风险。 --- # 如何创建代币? - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 如何创建代币? ======= 1\. 导航到“[创建代币](https://app.dodoex.io/erc20) ”页面[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-tokens#1--dao-hang-dao--chuang-jian-dai-bi--ye-mian) ----------------------------------------------------------------------------------------------------------------------------------------------------------------- ![createtoken00](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcreatetoken00.bf206670.png&w=3840&q=75) 2\. 输入代币参数[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-tokens#2--shu-ru-dai-bi-can-shu) -------------------------------------------------------------------------------------------------------- * 代币符号 * 总供应量:代币的总供应量 * 代币名称:代币的名称 * 小数位数 ![createtoken01](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcreatetoken01.8378bdbc.png&w=3840&q=75) 3\. 特殊功能[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-tokens#3--te-shu-gong-neng) ------------------------------------------------------------------------------------------------- 目前,DODO支持以下特殊功能的链上代币创建:"销毁"、"交易费"和"供应增加"。 这三个特殊功能都是代币创建过程中可选的。 * 如果启用了销毁功能,每次链上转账都会发送一定比例的代币到销毁地址 * 如果启用了交易费功能,每次链上转账都会发送一定比例的代币到创建者的地址 * 供应增加功能允许创建者在代币创建后发行额外的代币 4\. 在钱包中确认代币创建[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-tokens#4--zai-qian-bao-zhong-que-ren-dai-bi-chuang-jian) ------------------------------------------------------------------------------------------------------------------------------------ 查看您的代币参数,点击“创建” → 在您的钱包中确认” → 完成代币创建。 5\. 管理您的代币[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-tokens#5--guan-li-nin-de-dai-bi) -------------------------------------------------------------------------------------------------------- 要查看代币的信息,请转到“我的代币列表” → “管理”。 如果您的代币启用了“供应增加”功能,还可以向您的代币发行额外的供应。 6\. 放弃对代币合约的所有权[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-tokens#6--fang-qi-dui-dai-bi-he-yue-de-suo-you-quan) --------------------------------------------------------------------------------------------------------------------------------- 目前,DODO不支持此功能。请关注未来的产品更新。 7\. 代币创建服务费[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-tokens#7--dai-bi-chuang-jian-fu-wu-fei) ---------------------------------------------------------------------------------------------------------------- 目前,DODO对平台上创建的每个代币收取服务费。不同网络的代币创建服务费率如下: ![createtoken02](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcreatetoken02.a0d3ac3c.png&w=3840&q=75) --- # 如何创建一个众筹池? - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 如何创建一个众筹池? ========== 1\. 导航到 “[众筹池](https://app.dodoex.io/cp/all) " 页面[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-a-crowdpooling-event#1--dao-hang-dao---zhong-chou-chi---ye-mian) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ![createCP00](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FcreateCP00.74cd7612.png&w=3840&q=75) ![createCP01](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FcreateCP01.f6e70778.png&w=3840&q=75) 2\. 配置您的池参数[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-a-crowdpooling-event#2--pei-zhi-nin-de-chi-can-shu) ---------------------------------------------------------------------------------------------------------------------------- **设置价格** * 选择您要为之启动众筹活动的代币,并输入您要存入的代币总量。注意:在首次与DODO上的代币交互时,您需要授权DODO平台在您的钱包中访问您的代币。点击“解锁”图标并在您的钱包中确认此操作。 * 选择出售的代币比例(此参数不得大于50%)。出售的代币总数 = 总代币数量 \* 出售代币比例。众筹活动结束后,剩余的代币将被存入流动性池,并可以在流动性保护期结束后提取。注意:对于启用通缩功能(例如“销毁”和“交易费”功能)的代币,请将Init Sales Ratio设置如下:期望销售代币的百分比(1-通缩百分比)\* * 设置出售价格。使用单位代币和金额设置代币的销售价格。 **设置时间** * 设置众筹活动的开始时间:参与者只能在众筹活动期间开始质押 * 设置众筹活动的结束时间:参与者将在此时间之后收到他们的代币 * 流动性保护期:在众筹活动结束后,会有一个流动性保护期。在此期间,众筹活动的创建者资金将被锁定,以确保足够的市场深度和流动性。 **可选功能** * 线性释放:如果选择此选项,代币将以线性方式被锁定并释放,而不是在众筹活动结束时完全可领取。 * 初始领取比例:要最初领取的代币的百分比。 * 初始领取的时间延迟:众筹活动结束后,用户可以开始为其代币进行初始领取的天数;默认设置为0,这意味着用户可以在众筹活动结束后立即开始进行初始领取。 * 线性释放期:在初始领取后的指定期限内,锁定的代币将以线性方式释放;默认设置为0,这意味着所有代币可以在初始领取阶段领取。 * 允许过度募资:如果选择此选项,则在达到众筹上限后,将不再接受新的参与者,所有现有参与者将无法提取他们已经贡献的资金。 * 交易费用:这是在众筹活动结束时生成的流动性池的交易费率;默认设置为0.3%。 * 白名单:DODO众筹允许项目自行配置白名单,列入名单的人有资格参与众筹活动。但是,此功能默认情况下不可用,因此项目方必须联系铀鞋团队在后端设置相关联想配置。 ### 2.1 配置白名单[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-a-crowdpooling-event#2-1-pei-zhi-bai-ming-dan) DODO众筹允许项目方配置白名单,从而指定允许参与众筹活动的用户列表。此功能不默认从众筹前端提供,因此希望使用此功能的项目所有者需要通过电子邮件联系DODO。 **联系DODO以配置白名单** 要为您的众筹活动配置白名单,请发送电子邮件至[\[email protected\]](https://docs.dodoex.io/cdn-cgi/l/email-protection#7b191f3b1f141f141e03551214) 。 该电子邮件的内容可以按照以下模板进行编写: * 项目名称 * 项目描述 * 众筹信息(众筹网络、开放时间和持续时间等) * 白名单合约地址 **创建白名单合约** 为了让项目方能够轻松部署他们自己的白名单合约,DODO提供了一个白名单合约模板,位于[此处](https://github.com/DODOEX/contractV2/blob/main/contracts/DODOFee/UserQuota.sol) 。 项目所有者创建白名单合约后,可以通过setUserQuota函数设置用户的最大订阅额度(例如,如果选择USDT众筹,则为USDT)。对于白名单函数,在白名单中的用户地址设置相应的配额,对于其他用户地址,默认为0。 上述仅是提供的示例合约,但项目所有者可以根据自己的需求进行灵活开发。然而,项目所有者仍必须严格按照IQuota接口规范(getUserQuota)执行,并在开源许可下发布合约。此时,所有者可以在众筹开始前的半天时间内提供给DODO进行与合约相关的配置。 3\. 邀请您的朋友参加您的众筹活动[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-a-crowdpooling-event#3--yao-qing-nin-de-peng-you-can-jia-nin-de-zhong-chou-huo-dong) -------------------------------------------------------------------------------------------------------------------------------------------------------------------- 点击“邀请”按钮,与您的朋友和社区成员分享您的活动链接。 4\. 结算众筹活动[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-a-crowdpooling-event#4--jie-suan-zhong-chou-huo-dong) ----------------------------------------------------------------------------------------------------------------------------- 在配置的结束时间众筹活动结束后,任何人都可以选择结算众筹活动。结算众筹活动意味着结束活动并将代币分发给参与者,同时相应的流动性池会立即创建并开放交易。成功结算众筹活动的钱包地址将获得0.2 ETH(如果是ERC-20代币)或0.2 BNB(如果是BEP-20/BSC代币),但请注意,结算交易需要提交燃气费。 5\. 在流动性保护期结束后,解锁LP代币[#](https://docs.dodoex.io/zh/product/tutorial/how-to-create-a-crowdpooling-event#5--zai-liu-dong-xing-bao-hu-qi-jie-shu-hou--jie-suo-lpdai-bi) --------------------------------------------------------------------------------------------------------------------------------------------------------------------- * * * **风险提示** 参与众筹活动并非无风险,始终存在损失的可能性。在操作之前请谨慎,并确保您理解相关风险。DODO不对由项目运营不善、代币供应增加、二级市场崩盘等因素导致的财务损失负责。 --- # Tuorial - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) This chapter will systematically introduce how to use various features of DODO's products. You can navigate to specific tutorials by clicking on the corresponding titles below. [How to switch and connect to different networks?\ \ Details](https://docs.dodoex.io/en/product/tutorial/how-to-switch-and-connect-to-different-networks) [How to swap tokens?\ \ Details](https://docs.dodoex.io/en/product/tutorial/how-to-trade) [How to conduct cross-chain transactions?\ \ Details](https://docs.dodoex.io/en/product/tutorial/how-to-conduct-cross-chain-transactions) [How to add liquidity?\ \ Details](https://docs.dodoex.io/en/product/tutorial/how-to-provide-liquidity) [How to participate in liquidity mining?\ \ Details](https://docs.dodoex.io/en/product/tutorial/how-to-join-liquidity-mining) [How to join a crowdpooling event?\ \ Details](https://docs.dodoex.io/en/product/tutorial/how-to-join-a-crowdpooling-event) [How to create tokens?\ \ Details](https://docs.dodoex.io/en/product/tutorial/how-to-create-tokens) [How to create a mining campaign?\ \ Details](https://docs.dodoex.io/en/product/tutorial/how-to-create-a-mining-campaign) [How to create a crowdpooling event?\ \ Details](https://docs.dodoex.io/en/product/tutorial/how-to-create-a-crowdpooling-event) [How to create a liquidity pool?\ \ Details](https://docs.dodoex.io/en/product/tutorial/how-to-create-pools) [How to become a DODO V3 strategy provider(SP)?\ \ Details](https://docs.dodoex.io/en/product/tutorial/how-to-be-dodov3-sp) [How to participate in projects through the Starter function?\ \ Details](https://docs.dodoex.io/en/product/tutorial/how-to-participate-in-projects-through-the-starter-function) --- # DODO X: A Pioneering Product for Superior Trading Experience - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🔁 DODO X: A Pioneering Product for Superior Trading Experience =============================================================== DODO X emerges as a cutting-edge solution in the world of decentralized finance, serving as both a super aggregator and a cross-chain trading platform. At its core, DODO X is committed to delivering the ultimate trading experience, which encompasses not just the best pricing but also factors like high on-chain success rates, smooth user experience, and convenient operation. Search for liquidity across the entire network[#](https://docs.dodoex.io/en/product/dodox#search-for-liquidity-across-the-entire-network) ------------------------------------------------------------------------------------------------------------------------------------------ A standout feature of DODO X is its comprehensive liquidity utilization. The platform harnesses liquidity not only from DODO pools but also from various other sources, including prominent platforms like Uniswap. Additionally, DODO X integrates quotes from third-party aggregators such as 1inch and 0xAPI, ensuring users have access to the most competitive rates available across the market. Best price for cross-chain swap[#](https://docs.dodoex.io/en/product/dodox#best-price-for-cross-chain-swap) ------------------------------------------------------------------------------------------------------------ When it comes to cross-chain transactions, DODO X truly shines by aggregating multiple cross-chain bridges. This functionality enables the platform to identify the most optimal routes for users, ensuring transactions are completed with minimal waiting time and fees. This approach highlights DODO X's commitment to efficiency and user satisfaction, making it a formidable player in the cross-chain trading space. Integrate DODO X into your dapp[#](https://docs.dodoex.io/en/product/dodox#integrate-dodo-x-into-your-dapp) ------------------------------------------------------------------------------------------------------------ Additionally, DODO X provides developer tools such as [Trading API](https://docs.dodoex.io/en/developer/developers-portal/api) and [Trading Widget](https://docs.dodoex.io/en/developer/developers-portal/widget) , enabling any protocol to quickly integrate all the functionalities of DODO X into their products. DODO X has been deployed on multiple chains. You can check the supported networks, liquidity sources, and bridges in the [next section](https://docs.dodoex.io/en/product/dodox/bridge---liquidity-sources) . --- # DODO X:卓越交易体验的先锋产品 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🔁 DODO X:卓越交易体验的先锋产品 ===================== DODO X是去中心化金融领域的尖端解决方案,既是一个超级聚合器,又是一个跨链交易平台。DODO X致力于提供终极的交易体验,不仅包括最优价格,还包括高链上成功率、流畅的用户体验和方便的操作。 在整个网络中寻找流动性[#](https://docs.dodoex.io/zh/product/dodox#zai-zheng-ge-wang-luo-zhong-xun-zhao-liu-dong-xing) ----------------------------------------------------------------------------------------------------------- DODO X的一个显著特点是其全面的流动性利用。该平台不仅利用来自DODO池的流动性,还利用来自其他各种来源的流动性,包括Uniswap等知名平台。此外,DODO X整合了来自第三方聚合器如1inch和0xAPI的报价,确保用户能够获得市场上最具竞争力的利率。 跨链兑换的最佳价格[#](https://docs.dodoex.io/zh/product/dodox#kua-lian-dui-huan-de-zui-jia-jia-ge) ------------------------------------------------------------------------------------------ 在跨链交易方面,DODO X通过聚合多个跨链桥梁而表现出色。这种功能使平台能够为用户识别最优路径,确保交易在最短的等待时间和费用下完成。这种方法突显了DODO X对效率和用户满意度的承诺,使其成为跨链交易领域中不可忽视的参与者。 将DODO X集成到您的dapp中[#](https://docs.dodoex.io/zh/product/dodox#jiang-dodo-xji-cheng-dao-nin-de-dappzhong) -------------------------------------------------------------------------------------------------------- 此外,DODO X还提供开发者工具,如[交易API](https://docs.dodoex.io/zh/developer/developers-portal/api) 和[交易小部件](https://docs.dodoex.io/zh/developer/developers-portal/widget) ,使任何协议都能够快速将DODO X的所有功能集成到其产品中。 DODO X已部署在多个链上。您可以在[下一节](https://docs.dodoex.io/zh/product/dodox/bridge---liquidity-sources) 中查看支持的网络、流动性来源和桥梁。 --- # DODO开发者门户网站 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) ⛺ 开发者门户 ======= 世界上最好的DApp开发者门户网站 欢迎来到 DODO 开发者门户!我们非常荣幸能够与您合作。为了满足您在利用 DODO API 方面的需求,请使用您的 Web3 钱包登录我们的开发者门户。通过这样做,您将获得我们一流的服务和支持。 此文档包含以下内容: * [介绍](https://docs.dodoex.io/zh/developer/developers-portal/introduction) : 本部分将指导开发者快速使用 DODO 开发者门户。 * [交易小部件](https://docs.dodoex.io/zh/developer/developers-portal/widget) : 本部分将介绍如何使用交易小部件以及交易小部件的技术细节。 [![image](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdeveloper-portal-intro05.bcd7f318.png&w=3840&q=75)\ \ 交易小部件\ \ 快速将 DODO 交易集成到您的应用和服务中!](https://docs.dodoex.io/zh/developer/developers-portal/widget) * [API](https://docs.dodoex.io/zh/developer/developers-portal/api) : 本部分将介绍 DODO 的开放 API。 [![image](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdeveloper-portal-intro02.a6d5bab7.png&w=3840&q=75)\ \ 智能路由\ \ 支持任意代币对之间的交换](https://docs.dodoex.io/zh/developer/developers-portal/introduction) [![image](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdeveloper-portal-intro04.ed0ea7e3.png&w=3840&q=75)\ \ Web3 数据支持\ \ 提供链上数据查询:代币信息/交易对信息/代币法币价格/子图等](https://docs.dodoex.io/zh/developer/developers-portal/api/web3-data) [![image](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdeveloper-portal-intro03.9905c08c.png&w=3840&q=75)\ \ 限价订单\ \ 基于 DODO 智能路由实现的链原生限价订单功能](https://docs.dodoex.io/zh/developer/developers-portal/api/limit-order) [![image](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdeveloper-portal-intro06.fb09d5b1.png&w=3840&q=75)\ \ 跨链交易\ \ 支持多链上的跨链交易](https://docs.dodoex.io/zh/developer/developers-portal/api/cross-chain-trading) 通过以下链接访问我们的开发者门户:[https://developer.dodoex.io/](https://developer.dodoex.io/) 。如果您有任何问题或疑虑,请随时通过 [\[email protected\]](https://docs.dodoex.io/cdn-cgi/l/email-protection#4622292229192223300622292229233e682f29) 联系我们。我们的专业团队将全程支持您。 感谢您选择 DODO 开发者门户。我们期待与您合作,共同实现卓越的发展里程碑! --- # How to participate in projects through the Starter function? - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) How to participate in projects through the Starter function? ============================================================ 1\. Access to the "[Starter](https://app.dodoex.io/ido) " pages[#](https://docs.dodoex.io/en/product/tutorial/how-to-participate-in-projects-through-the-starter-function#1--access-to-the--starter--pages) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ The Starter feature is in Beta stage, currently only supports BNBChain, other networks will be supported soon. 2\. Choose the project you'd like to join[#](https://docs.dodoex.io/en/product/tutorial/how-to-participate-in-projects-through-the-starter-function#2--choose-the-project-you-d-like-to-join) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Access the Starter homepage through the feature list on the left. On the right side of the page you can see: * Ongoing: For projects that have already started, you can participate in the starter * Upcoming: For projects that have not yet started, you can preview project’s information and apply for whitelist 3\. Make sure the network of your current wallet is the same as the project’s network[#](https://docs.dodoex.io/en/product/tutorial/how-to-participate-in-projects-through-the-starter-function#3--make-sure-the-network-of-your-current-wallet-is-the-same-as-the-project-s-network) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- If the network does not match, then your whitelist status, hardcap, token balance, etc. will not be read. Also, you will not be able to participate in the starter. Please switch the wallet network before you participate. 4\. Check project information[#](https://docs.dodoex.io/en/product/tutorial/how-to-participate-in-projects-through-the-starter-function#4--check-project-information) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- Click on the project you want to participate in, then you can find details of the project. Once you enter the project page, The project information is displayed on the left side, where you can browse the various rules and time information about the project. * Whitelist: "Whitelist" in the upper left corner represents the wallet address you are currently connected to and whether it is eligible to join the project starter. Addresses that are not whitelisted will not be able to participate in the project starter. You can try to qualify by following the project’s requirements through the Apply Now button. * Allocation: ”Allocation” represents the maximum investing amount for the wallet address you are currently connected to, and you cannot invest more than that amount. * Project information: You can confirm the details of the project tokens, as well as the real-time status of the token fundraising. * Schedule: You can confirm the schedule of the project, also the claim time, distribution time and vesting mechanism of the tokens after the fundraising is over. * Project Intro: The project team will introduce their project, such as team, roadmap, investors here. 5、Investing[#](https://docs.dodoex.io/en/product/tutorial/how-to-participate-in-projects-through-the-starter-function#5-investing) ----------------------------------------------------------------------------------------------------------------------------------- Once you enter the project page, the action area is on the right side, where you can purchase with the accpeted token and claim the project tokens after. The project status is displayed at the top of the operation area. Moving the mouse pointer over the corresponding stage to see what stage the subscription is currently in and what actions are available for that stage. * Upcoming: This stage means the project is not yet started, so you can preview information about the project and try to qualify for the whitelist. * Ongoing: At this stage, you can invest your asset. Please pay attention to the token price and the deadline for investing. For fixed-price projects, funds can be moved out at any time before it ends; for variable price mode, funds cannot be moved out. The record of funds, and the token claiming record can be viewed through the Operations Records at the bottom. * Completed This stage means that investing process is ended, but the release of the tokens has not yet begun. You can check the number of tokens you have invested. * Claim This stage identifies that you have following number of tokens available to claim at the current time. Moving the mouse pointer to view the tokens you have claimed and tokens to be released. Click on the “Claim” button below and check your wallet transaction to receive tokens. If the project allows over-raising, the over-invested funds will be taken out simultaneously with the first claiming. --- # How to switch and connect to different networks? - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) How to switch and connect to different networks? ================================================ 1. Click on the top right corner and select the network you want to switch to. ![switch00](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswitch00.a12d3e0c.png&w=3840&q=75) 2. If you have already added the network to your wallet, you can simply click “Switch network” in the pop-up window. ![switch01](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswitch01.b3633ee4.png&w=3840&q=75) 3. If your wallet doesn't have the network you want to switch to, please authorize your wallet to add that network first. ![switch02](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswitch02.67c00fe8.png&w=3840&q=75) ![switch03](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswitch03.e6cd3bbb.png&w=3840&q=75) 4. You can also add a network in your wallet's settings by searching for it or manually adding it. We recommend obtaining the necessary information for adding a network from official sources. ![switch04](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswitch04.0c85e47b.png&w=3840&q=75) ![switch05](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswitch05.5c3bc031.png&w=3840&q=75) ![switch06](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswitch06.863b8809.png&w=3840&q=75) --- # How to conduct cross-chain transactions? - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) How to conduct cross-chain transactions? ======================================== 1\. Navigate to the "[DODOX](https://app.dodoex.io/) "[#](https://docs.dodoex.io/en/product/tutorial/how-to-conduct-cross-chain-transactions#1--navigate-to-the--dodox) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Head over to DODO's DODOX Trading page on their website. Connect your browser wallet to get started. ![crosschain000](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcrosschain000.bb34cd85.png&w=3840&q=75) 2\. Choose a Trading Pair[#](https://docs.dodoex.io/en/product/tutorial/how-to-conduct-cross-chain-transactions#2--choose-a-trading-pair) ------------------------------------------------------------------------------------------------------------------------------------------ Select the currency of the current blockchain you're on and the amount you wish to trade. Next, choose the currency of the destination blockchain, where you want to receive your new assets. ![crosschain001](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcrosschain001.0dd16a40.png&w=3840&q=75) --------------------------------------------------------------------------------------------------------------------------- ![crosschain002](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcrosschain002.cadd2f48.png&w=3840&q=75) --------------------------------------------------------------------------------------------------------------------------- ![crosschain002](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcrosschain003.361d8f64.png&w=3840&q=75) 3\. Submit Transaction[#](https://docs.dodoex.io/en/product/tutorial/how-to-conduct-cross-chain-transactions#3--submit-transaction) ------------------------------------------------------------------------------------------------------------------------------------ Once you've made your selections, click "**Send**" to preview the transaction. Make sure you have enough mainnet tokens in your wallet to cover the gas fee. For instance, if you're using the Arbitrum chain, you'll need some ETH for the gas fee. 4\. Confirm Order[#](https://docs.dodoex.io/en/product/tutorial/how-to-conduct-cross-chain-transactions#4--confirm-order) -------------------------------------------------------------------------------------------------------------------------- Confirm the order information for the transaction, and then click "**Transfer**" to submit the order to the token bridge. ![crosschain02](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcrosschain004.aeb99f17.png&w=1920&q=75) 5\. Check Transaction Status[#](https://docs.dodoex.io/en/product/tutorial/how-to-conduct-cross-chain-transactions#5--check-transaction-status) ------------------------------------------------------------------------------------------------------------------------------------------------ Your order will start processing after submission. To check its progress, click on "Tx" to view the status of your transaction on the blockchain explorer. After the transaction is processed successfully, you'll see a reassuring "Transaction Completed" message. Now you've successfully performed a cross-chain trade on DODO! Embrace the power of cross-chain trading to access a diverse array of tokens across various blockchains with ease. Happy swapping! --- # Trading Widget - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🔩 Swap Widget ============== Trading Widget DODO offers a set of trading component features, precisely engineered to cater to the most prevalent trading needs, helping you to build better products and boost your profitability. DODO trading Widget allows you to build customized front-end interfaces for the DODO protocol, and embed widgets in DeFi applications for quick asset exchange and other uses. ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2F03.d235361f.gif&w=640&q=75) ### Features[#](https://docs.dodoex.io/en/developer/developers-portal/widget#features) #### Best Price[#](https://docs.dodoex.io/en/developer/developers-portal/widget#best-price) Benefit from DODO’s superior routing algorithm, enabling users to relish the best swap price seamlessly, without navigating away from your dApps. #### Cross-chain Support[#](https://docs.dodoex.io/en/developer/developers-portal/widget#cross-chain-support) Easily Swap thousands of crypto assets across more than 10 blockchains, all with a single click. #### Revenue sharing[#](https://docs.dodoex.io/en/developer/developers-portal/widget#revenue-sharing) The DODO widget empowers dApps to set their own fees, creating an additional revenue stream through DODO. #### Effortless and Seamless Integration[#](https://docs.dodoex.io/en/developer/developers-portal/widget#effortless-and-seamless-integration) Experience effortless integration with the DODO widget within minutes. Customize to your heart's content to align with your specific needs. #### Performance analytics[#](https://docs.dodoex.io/en/developer/developers-portal/widget#performance-analytics) DODO provides a dynamic dashboard, offering you insightful analytics to enhance your business performance. ### Possibilities with the DODO Widget[#](https://docs.dodoex.io/en/developer/developers-portal/widget#possibilities-with-the-dodo-widget) #### For All Projects[#](https://docs.dodoex.io/en/developer/developers-portal/widget#for-all-projects) Swap your token directly inside your application. Making swaps a new revenue source. #### NFT Marketplaces[#](https://docs.dodoex.io/en/developer/developers-portal/widget#nft-marketplaces) Empower users to purchase an NFT with any asset on any supported chain directly within your app, enhancing their user experience. #### LaunchPads[#](https://docs.dodoex.io/en/developer/developers-portal/widget#launchpads) Aggregate liquidity from multiple sources while offering your users custom UI, token list, and fee rate. ### Supported Chains[#](https://docs.dodoex.io/en/developer/developers-portal/widget#supported-chains) DODO currently supports 11 chains in total, including Ethereum, BNB Chain, Polygon, Arbitrum, Avalanche, Moonriver, OKTC, BOBA, Optimism, Aurora and Conflux eSpace. We intend to add support for more chains in the future. ### Fees[#](https://docs.dodoex.io/en/developer/developers-portal/widget#fees) 1. Transaction fees incurred by the user through the DODO exchange will go towards the liquidity provider of the DEX protocol. And 0.15% routing fee will be charged. 2. The user can set an additional routing fee, with the default being 0. If a routing fee is set, DODO will not take any profit from it and all profits will belong to the user. For details on how to use the Swap Widget, please take a look at the "[Instructions](https://docs.dodoex.io/en/developer/developers-portal/widget/getting-started) " page of this section - it only takes about 2 minutes to learn. --- # How to create a liquidity pool? - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) How to create a liquidity pool? =============================== 1\. Navigate to the "[Pools](https://app.dodoex.io/pool) " page[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-pools#1--navigate-to-the--pools--page) ------------------------------------------------------------------------------------------------------------------------------------------------------------------- ![createpool00](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcreatepool00.a0ed38c7.png&w=3840&q=75) 2\. Select Pool Type[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-pools#2--select-pool-type) ------------------------------------------------------------------------------------------------------------ ![createpool01](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcreatepool01.2cb124cf.png&w=3840&q=75) Currently, DODO supports 4 different liquidity pool types: standard, pegged, single-token and private pool. You cannot modify your pool’s parameters once it's being created. Upon creation, everyone will be able to deposit liquidity into the pool. * Standard: Standard pools are similar to Uniswap v2 pools in terms of capital allocation and efficiency. Requires liquidity for two different tokens. * Pegged: Pegged pools are similar to Curve pools, and are suitable for synthetic assets. * Single-token: Single-Token pools are created with one token type only. They are useful for selling project tokens to raise funds. You can create liquidity markets with the tokens you have and nothing more. * Private Pool: Only the pool creator can provide liquidity for this pool, and the pool parameters can be modified at any time after creation 3\. Configure the Pool Parameters[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-pools#3--configure-the-pool-parameters) -------------------------------------------------------------------------------------------------------------------------------------- **Standard** * Enter the amount of tokens you would like to supply as buy and sell side liquidity. * The initial price of the token pair follows the market price by default. Unchecking the “Fixed ratio at current price” will expose you to the risk of being arbitraged. * If the “Fixed ratio at current price” is unchecked, the initial price of your pool will be determined by the buy and sell sides’ liquidity depths. For example, if there are 1000 DODO as sell side liquidity, and 100 USDC as buy side liquidity, then the initial price would be 1 DODO = 0.1 USDC (100 USDC / 1000 DODO). * There are three options for fee rate: * 0.01%: suitable for stablecoin trading pairs, such as USDT/BUSD * 0.3%: suitable for mainstream assets, such as BTC/ETH * 1%: suitable for exotic token pairs Note: a low trading fee rate tends to attract more trading volume in the pool. **Pegged Pool** * Enter the amount of tokens you would like to supply as buy and sell side liquidity. * The pegged exchange rate follows the current market price by default. Unchecking the “Fixed ratio at current price” will expose you to the risk of being arbitraged. * You can uncheck the “Fixed ratio at current price” and enter the pegged exchange rate for your pool manually. The initial price of your sell side asset will the the manual entered exchange rate. * There are three options for fee rate: * 0.01%: suitable for stablecoin trading pairs, such as USDT/BUSD * 0.3%: suitable for mainstream assets, such as BTC/ETH * 1%: suitable for exotic token pairs Note: a low trading fee rate tends to attract more trading volume in the pool. * There are three options for the Slippage Coefficient (k), and the value is set a 1 by default: * K = 0.5: suitable for most trading pairs * K = 0.01: suitable for trading pairs with low volatility, such as BUSD/USDT * K = 1: suitable for volatile assets Note: the smaller the slippage coefficient, the lower the slippage for traders, and the deeper the market depth. To learn more, watch our tutorial video on slippage coefficient on DODO. **Single-Token** * Enter the amount of tokens you would like to supply as sell side liquidity。 * The initial price follows the current market price by default. Unchecking the “Fixed ratio at current price” will expose you to the risk of being arbitraged. * You can uncheck the “Fixed ratio at current price” and enter initial price for your pool manually. Your sell side liquidity will be sold at the manually entered initial price. * There are three options for fee rate: * 0.01%: suitable for stablecoin trading pairs, such as USDT/BUSD * 0.3%: suitable for mainstream assets, such as BTC/ETH * 1%: suitable for exotic token pairs Note: a low trading fee rate tends to attract more trading volume in the pool. * There are three options for the Slippage Coefficient (k), and the value is set a 1 by default: * K = 0.5: suitable for most trading pairs * K = 0.01: suitable for trading pairs with low volatility, such as BUSD/USDT * K = 1: suitable for volatile assets Note: the smaller the slippage coefficient, the lower the slippage for traders, and the deeper the market depth. To learn more, watch our tutorial video on slippage coefficient on DODO. **Private Pool** * Enter the amount of tokens you would like to supply as buy and sell side liquidity. Currently “Standard” and “Single-Token” pool creations are supported for Market Maker Pools. * The initial price of the token pair follows the market price by default. Unchecking the “Fixed ratio at current price” will expose you to the risk of being arbitraged. * There are three options for fee rate: * 0.01%: suitable for stablecoin trading pairs, such as USDT/BUSD * 0.3%: suitable for mainstream assets, such as BTC/ETH * 1%: suitable for exotic token pairs Note: a low trading fee rate tends to attract more trading volume in the pool. * There are three options for the Slippage Coefficient (k), and the value is set a 1 by default: * K = 0.5: suitable for most trading pairs * K = 0.01: suitable for trading pairs with low volatility, such as BUSD/USDT * K = 1: suitable for volatile assets Note: the smaller the slippage coefficient, the lower the slippage for traders, and the deeper the market depth. To learn more, watch our tutorial video on slippage coefficient on DODO. 4\. Check Pool details[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-pools#4--check-pool-details) ---------------------------------------------------------------------------------------------------------------- Go to “My Pool”, and click “Manage” to view the details of the pool, such as its trading volume, trading fee revenue, etc. 5\. Invite your friend to provide liquidity[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-pools#5--invite-your-friend-to-provide-liquidity) ---------------------------------------------------------------------------------------------------------------------------------------------------------- Click “Invite” to share the link of your liquidity pool to your friends 6\. Deposit/Withdraw Liquidity[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-pools#6--deposit-withdraw-liquidity) -------------------------------------------------------------------------------------------------------------------------------- * Navigate to “Pools” → “My Liquidity” * Find the liquidity pool * Deposit or withdraw your liquidity Learn more about the characteristics of different pool models[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-pools#learn-more-about-the-characteristics-of-different-pool-models) ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Learn more about Standard Pool The Standard Pool model offers a classic market making strategy, allowing users to participate without any expertise in the market. The price curve pattern of the Standard Pool is controlled by an external oracle, allowing liquidity to always be concentrated around the market price. In order to maintain the price curve, the Standard Pool needs to frequently change the mid price, which is currently maintained by Chainlink. It is understood that each time Chainlink changes its price, the Standard Pool resets the price curve. **Other Parameters** In addition to the guide price **i**, there are two other parameters controlled by DODO. These are the slippage factor **k** and the commission rate **fee**, which can be modified by DODO's multisig admin wallet. In the future, DODO will transfer all control of the Standard Pool's parameters to a DAO, so that market-making strategies will be managed by the community. Learn more about Pegged Pool Pegged Pools are liquidity pools that are optimized for synthetic assets. Synthetic assets are a large class of assets that anchor their price to a certain target through various mechanisms. For example, USDT, USDC, BUSD, DAI are all anchored to USD; WBTC, RENBTC are anchored to Bitcoin. The exchange rates between similarly anchored coins are very stable and usually hover around 1:1. A DODO Pegged Pool defines a curve that concentrates liquidity at the anchored price, which fits the synthetic asset market pattern, and therefore provides ample liquidity. With DODO, anyone can create a Pegged Pool and set the exchange ratio, slippage factor and commission rate to suit their needs. This pool is regulated by the PPM algorithm. **Pegged Pools are Optimized for Synthetic Assets** If your project issues its own USD stablecoin or other synthetic asset (e.g. sBTC), it can use a Pegged Pool to provide liquidity to it. Compared to a regular AMM pool, this curve can help your stablecoin gain 10x or even 100x more liquidity with the same TVL. This is possible even if the synthetic token is not pegged 1:1 to an underlying asset. For example, it is possible to launch a token that is anchored to $0.1 USD. **Parameters Cannot be Modified** The market between the synthetic asset and the target token is usually very stable, and in order to give users reliable expectations, the parameters of the Pegged Pool cannot be changed once set. **Real Life Examples** DODO maintains a Pegged Pool for DAI-USDT. This pool can often have a daily turnover rate of 50% to 100%, which is 5 to 10 times higher than competing products. Learn more about Single-Token Pool Many project owners face the following problems when using AMMs to provide liquidity: * You must have project-side tokens to provide liquidity * Buying project-side tokens requires good liquidity To solve these problems, project owners must rely on a complex issuance process. Whether it's an auction, liquidity mining, or providing initial liquidity themselves, it takes up a lot of the project owner's energy and increases the barrier to user participation. DODO has created a unilateral initial liquidity solution to make the whole process simple, called the Single-Token Pool model. Let's see how it works. **DODO's Single-Token Pool Model** A Single-Token Pool can be compared to a vending machine that allows you to return assets purchased from it. The more units you buy, the more expensive each one becomes. The money you pay for the goods is stored in the pool, and when you don't want the assets you purchased, you can return them at the current price. The price curve of a Single-Token Pool is defined by the PMM algorithm as a price curve with a minimum price, which is the price of the first item purchased from the pool. Anyone can set up a Single-Token Pool and set the variety of goods it contains. You can set it up with mainstream assets like BTC and ETH, or with new assets that you issue yourself. You don't need to provide any denominated assets at first, just fill the vending machine with goods. This design allows you to create ample liquidity for your tokens on DODO, without spending a dime, in just 5 minutes. **Similarity to AMMs** If a Single-Token Pool is created with the slippage factor **K=1** and the guide price **i** is a very small number, then it behaves almost the same as an AMM. You can think of the Single-Token Pool curve as an AMM price curve that truncates the parts that are smaller than **i**. The smaller **i** is, the closer it is to a true AMM curve. This can be accomplished by setting . For more information on these calculations, see the [PMM Overview](https://docs.dodoex.io/en/product/pmm-algorithm) section. **Anyone Can Participate** Anyone can supply the Single-Token Pool with both sides' assets to participate in the liquidity supply, just as with an AMM. The difference here is that the value of the two assets need not be 1:1 when resupplying. Anyone can participate in adding liquidity, which is these pools are sometimes referred to as public pools. **Use Cases** Build Initial Liquidity for High Volume Markets Suppose you are a blockchain developer and want to build a community-driven project. You can issue 10 million tokens, of which 1%, or 100 thousand, are reserved for the project team. The rest (i.e. 9.9 million tokens) are distributed to the community. Let’s say you set the token price to 1.Ifyouwanttocreatealiquiditymarketforall9.9milliontokensonanAMM,youneedanother1\. If you want to create a liquidity market for all 9.9 million tokens on an AMM, you need another 9.9 million as the bid-side liquidity to do it - a huge amount of money that you probably don’t have, and so this project becomes infeasible. Your alternative is to create a simple AMM pool with much fewer tokens and less liquidity in it, say 1,000and1,000tokens,butifsomeonewantstoinvest1,000 and 1,000 tokens, but if someone wants to invest 100,000 in your project token, he will have to pay 100,000andreceiveonly1,000tokensinreturn.Thisamountsto100,000 and receive only 1,000 tokens in return. This amounts to 100 per token, 100x the market price you set! This is, of course, not desirable, and this market is definitely not an efficient market. However, you can choose to build a Single-Token Pool with these 9.9 million tokens at an initial price of 1andwiththekvaluesetto1.Ifacommunitymemberisbullishonyourprojectandbuys100,000tokens,hisaveragepriceisonly1 and with the k value set to 1. If a community member is bullish on your project and buys 100,000 tokens, his average price is only 1.005 per token! Raising Liquidity Fast Imagine, for example, an algorithmic stablecoin project whose USD-pegged coin has dipped below 1.Theprojectneedstoraiseliquidityassoonaspossibletopreventadeathspiral.Ifyoucanreversethepricedeclineat1\. The project needs to raise liquidity as soon as possible to prevent a death spiral. If you can reverse the price decline at 0.9, it will greatly strengthen market confidence, but if it reverses only at $0.5, it may have led to a permanent loss of confidence in your token. This hypothetical project has an easy solution to its woes! Suppose the project token is called X. Create a DAI-X pool, set the guide price to 1, and **k=0.01**. In addition, you incentivize liquidity providers to deposit their LP tokens into this pool with rewards in X. This way, you can ensure ample bid-side liquidity that is allocated near 1 X = 1 DAI, which is a much more capital-efficient funding model than traditional AMMs. Even if it’s not an algorithmic stablecoin project, you can still raise funds for your token at key support price levels with Single-Token Pools, coupled with a reward incentive program to encourage liquidity provision. Learn more about Pegged Pool The DODO Market Maker Pool is a product that is geared towards professional market makers with special requirements that cannot be satisfied by the regular liquidity pool models available on DODO (these being the Standard, Pegged, and Single-Token Pools). A Market Maker Pool differ from the other liquidity pool models available on DODO in two major ways: * only the pool creator can supply liquidity to the pool, and * The Market Maker Pool's parameters can be adjusted by the pool creator at any time after the pool is created. In other words, you can set the price curve any way you want and provide any amount of money, just like with a grid trading instrument. **Examples** Imagine that, as a market maker, you predict that ETH is going to fluctuate around $X and set the price curve for that point, making your liquidity provision very competitive with very little capital - and earning you large fees. Or, you may sense that ETH is about to rise and withdraw your ETH inventory to reduce your one-sided risk. Or perhaps you go even further and withdraw some of your USDT to invest in more ETH. Perhaps you want to raise money to buy a CryptoPunk worth 1000 ETH, you can issue 1000 MINIPUNK tokens and sell them at a constant price of 1 MINIPUNK = 1 ETH. After the sale, the 1000 ETH in the pool can be withdrawn immediately and used to buy the CryptoPunk. **Real-World Examples** Wootrade has created a Market Maker Pool on DODO, using the PMM algorithm to provide liquidity on the chain. It also hedges positions on other exchanges to generate stable returns. In the eight month period between March and November 2021, Wootrade provided over 10millioninTVLandgeneratedover10 million in TVL and generated over 10 billion in trading volume and $7 million in fee income! **How Does This Work?** Most on-chain liquidity is currently provided by AMMs, but this type of market making is very rudimentary. It is essentially a grid trading strategy that ranges from 0 to infinity. Professionals can often provide liquidity more efficiently based on some market information, and in turn get far better capital utilization than with AMMs, securing a large number of trades with a relatively small amount of capital. The PMM algorithm provided by DODO is more flexible than the AMM algorithm and can give professional market makers a major competitive advantage. You can adjust the parameters to make PMM quotes fit to your own price models. In addition, DODO's liquidity pools are accessed by all major aggregators, including 1inch, Matcha, Paraswap, and others. These diverse distribution channels can help you deliver liquidity to more users. **Best Practices** Private pools are very flexible and the ways to use them are still being explored. However, many people have adopted a fully or partially hedged approach to using private pools. There is always risk involved when operating a liquidity pool. However, building an automated market-making bot to reduce this risk requires coding experience. **Other Use Cases** Avoiding Downside Risk When market conditions change, market makers need to take measures to avert and reduce downside risk, which is the estimated amount of loss in value of their assets that could be sustained as a result of market movements. With a Private Pool, they can do so easily by removing some of their bid-side liquidity (i.e. withdrawing the tokens opposite the token asset that is expected to depreciate in value). Active Price Discovery You are a market maker for the apple market. You feel that apples have a lot of potential and their price will go up. Not wanting to sell apples at a low price, you have two options on AMMs: * Buy apples yourself - you need a lot of capital to do this. * Reduce the size of the pool by withdrawing apples from the market - market liquidity will be negatively affected. Neither option is ideal, because you do not have the power to actively influence the price discovery process within the AMM framework. The process of determining the price of apples happens passively as buyers and sellers interact. You believe you have a sound market thesis, but unfortunately you don’t get to apply it. Using a DODO Private Pool drastically improves the market making experience. It allows them to intervene and adjust the market price directly. This is what we call active price discovery, because market makers actively get involved in the price discovery process, which renders it more efficient. Constant Price Market You just issued a new stablecoin, X, that is pegged to 1 USDT. To create a liquid stablecoin market for X and USDT, you can add some USDT and a much larger amount of X to a Private Pool, and set **k=0**. This market will guarantee that 1 X is always swapped for exactly 1 USDT. You could also set k to a very small non-zero value (e.g. **k=0.001**) to get an “approximately constant” pricing curve as seen on Curve. Reversion to Traditional AMM Set **k=1**, and deposit both base and quote tokens with a price ratio **i**, to get a market that behaves and performs in the exact same manner as traditional AMMs. For example, if the initial price i is 1 base token = 3 quote tokens, then simply deposit base and quote tokens at a 1:3 ratio. Market Value Management If the main liquidity of the market is provided by you, you can set the price and depth as needed. This allows you to provide price support and curb speculation. * * * **Risk Disclaimer** Liquidity mining is not risk-free, and there is always a possibility of loss. Please be careful when proceeding and make sure you understand the risks. --- # How to create tokens? - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) How to create tokens? ===================== 1\. Navigate to the “[Create Token](https://app.dodoex.io/erc20) ” page[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-tokens#1--navigate-to-the--create-token--page) ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ![createtoken00](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcreatetoken00.bf206670.png&w=3840&q=75) 2\. Enter the Token Parameters[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-tokens#2--enter-the-token-parameters) --------------------------------------------------------------------------------------------------------------------------------- * Token Symbol * Total Supply: the total supply of your token * Token Name: the name of your token * Decimals ![createtoken01](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcreatetoken01.8378bdbc.png&w=3840&q=75) 3\. Special Features[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-tokens#3--special-features) ------------------------------------------------------------------------------------------------------------- Currently, DODO supports on-chain token creations with the following special features: "Burn", "Trading Fees", and "Supply Increase". All three special features are optional to the token creation process. * If the Burn feature is enabled, a percentage of tokens will be sent to the burn address for each on-chain transfer * If the trading fees feature is enabled, a percentage of tokens will be sent to the creator's address for each on-chain transfer * The Supply Increase feature allows the creator to issue additional tokens after the token creation 4\. Confirm Token Creation in Your Wallet[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-tokens#4--confirm-token-creation-in-your-wallet) ------------------------------------------------------------------------------------------------------------------------------------------------------- Review your token parameters, and click “Create” → confirm in your wallet” → complete the token creation. 5\. Manage Your Token[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-tokens#5--manage-your-token) --------------------------------------------------------------------------------------------------------------- To view the info of your token, go to “My Token List” → “Manage”. You can also issue additional supply to your token If your token has the “Supply Increase” feature enabled. 6\. Give up Ownership of Your Token Contracts[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-tokens#6--give-up-ownership-of-your-token-contracts) --------------------------------------------------------------------------------------------------------------------------------------------------------------- Currently, DODO does not support such a feature. Please stay tuned for future product updates. 7\. Token Creation Service Fee[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-tokens#7--token-creation-service-fee) --------------------------------------------------------------------------------------------------------------------------------- Currently, DODO charges a service fee for each token created on the platform. The token creation service fee rates on different networks are as follows: ![createtoken02](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcreatetoken02.a0d3ac3c.png&w=3840&q=75) --- # How to create a crowdpooling event? - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) How to create a crowdpooling event? =================================== 1\. Navigate to the "[Crowdpooling](https://app.dodoex.io/cp/all) " page[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-a-crowdpooling-event#1---navigate-to-the--crowdpooling--page) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ![createCP00](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FcreateCP00.74cd7612.png&w=3840&q=75) ![createCP01](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FcreateCP01.f6e70778.png&w=3840&q=75) 2\. Configure your pool parameters[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-a-crowdpooling-event#2--configure-your-pool-parameters) ------------------------------------------------------------------------------------------------------------------------------------------------------- **Set Price** * Select the token you would like to launch a Crowdpooling campaign for, and enter the total amount of tokens you would like to deposit. Note: when interacting with a token on DODO for the first time, you need to grant the DODO platform access to your tokens in your wallet. Click the “unlock” icon and confirm the action in your wallet. * Select the % of tokens for sale (this parameter can not be greater than 50%). Total number of tokens for sale = total number of tokens \* % of token for sale. The rest of the tokens will be deposited into the liquidity pool after the Crowdpooling campaign ends, and will be available for withdrawal after the liquidity protection period. Note: For tokens with deflationary features enabled (such as the “Burn” and the “Trading Fees” features), please set the Init Sales Ratio as follows: _Desired % of tokens for sale(1- deflationary percentage)_\* * Select sale price. Set the token sale price with the unit token and the amount. **Set Time** * Set Crowdpooling start time: participants can only stake after the Crowdpooling period starts * Set Crowdpooling end time: Participants will receive their tokens after this time * Liquidity Protection: After the end of a Crowdpooling campaign, there is a Liquidity Protection period. During this period, the Crowdpooling campaign creator's funds will be locked to guarantee sufficient market depth and liquidity. **Optional features** * Linear Release: If this option is selected, the tokens will be locked up and released in a linear fashion instead of being fully claimable at the end of the Crowdpooling campaign. * Initial claim percentage: The percentage of tokens to be claimed initially. * Time delay for initial claims: The number of days after the end of the campaign that users can start to make initial claims for their tokens; by default this is set to 0, which means that users can start to make initial claims right after the end of the Crowdpooling campaign. * Linear release period: Locked-up tokens will be released in a linear fashion during the period specified after the initial claim; by default this is set to 0, which means that all tokens can be claimed with the initial claim. * Overfunding now allowed: If this option is selected, new participants will not be accepted after the Crowdpooling cap is reached, and all existing participants will not be able to withdraw the funds they have contributed. * Trading fee: This is the trading fee rate of the liquidity pool generated at the end of the Crowdpooling campaign; by default this is set to 0.3%. * Whitelist: DODO Crowdpooling allows projects to configure Whitelist by themselves, and those who are on the list are eligible to participate in the Crowdpooling campaign. However, this function is not by default, so projects have to contact the DOOD team to set up relevant association configuration on the backend. ### 2.1 Configure Whitelist[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-a-crowdpooling-event#2-1-configure-whitelist) DODO Crowdpooling allows the project side to configure a whitelist, and thereby specify the list of users who are allowed to participate in the crowdfunding campaign. This feature is not available from the Crowdpooling front-end by default, so a project owner who wants to use this feature would need to contact DODO by email. **Contact DODO to Configure a Whitelist** To configure a whitelist for your Crowdpooling campaign, send an email to [\[email protected\]](https://docs.dodoex.io/cdn-cgi/l/email-protection#bddfd9fdd9d2d9d2d8c593d4d2) . The content of this email can follow this template: * Project name * Project description * Crowdfunding information (crowdfunding network, opening time and duration, etc) * Whitelist contract address **Creating a Whitelist Contract** To allow projects to deploy their own whitelist contracts with ease, DODO provides a whitelist contract template, located [here](https://github.com/DODOEX/contractV2/blob/main/contracts/DODOFee/UserQuota.sol) . After the project owner creates a whitelist contract, they can set the user's maximum subscription quota (e.g. USDT if USDT Crowdpooling is selected) through the setUserQuota function. For the whitelist function, set the corresponding quota for the users in the whitelist, and default to 0 for other user addresses. The above is only a template contract provided, but the project owner can flexibly develop it according to their own needs. However, the project owner must still strictly implement the IQuota interface specification (getUserQuota), and release the contract under an open source license. At this point, the owner can provide it to DODO for contract-related configuration up to half a day before the crowdfunding starts. 3\. Inviting Your Friends to Your Crowdpooling Campaign[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-a-crowdpooling-event#3--inviting-your-friends-to-your-crowdpooling-campaign) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Click “Invite” to share the link of your campaign with your friends and community members. 4\. Settling the Crowdpooling campaign\*\*[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-a-crowdpooling-event#4--settling-the-crowdpooling-campaign-) -------------------------------------------------------------------------------------------------------------------------------------------------------------------- After the Crowdpooling campaign ends at the configured end time, anyone can choose to settle the campaign. Settling a campaign means concluding it so that tokens can be distributed to participants and the corresponding liquidity pool will be created immediately and open for spot trading. The wallet address that successfully settles a campaign will receive 0.2 ETH (if the campaign is for an ERC-20 token), or 0.2 BNB (if the campaign is for a BEP-20/BSC token), but please note that the settle transaction requires a gas fee to be submitted. 5\. After the liquidity protection period, unstable the LP tokens.\*\*[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-a-crowdpooling-event#5--after-the-liquidity-protection-period--unstable-the-lp-tokens--) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * * * **Risk Warning** Participating in Crowdpooling is not risk-free, and there is always a possibility of loss. Please be careful when proceeding and make sure you understand the risks. DODO is not responsible for financial losses caused by poor project operations, token supply increases, secondary market crashes and other factors. --- # API - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) ⛏ API ===== DODO开发者门户目前提供以下三种类型的API: 1. [智能交易路径](https://docs.dodoex.io/zh/developer/developers-portal/api/smart-trade) :智能交易路径API旨在提供高效可靠的交易路径服务。通过该API,您可以快速获取最佳交易路径。我们的智能路由算法会自动选择最佳流动性来源,确保您可以以最有利的价格进行交易。 2. [Web3数据](https://docs.dodoex.io/zh/developer/developers-portal/api/web3-data) :Web3数据API提供与DODO平台相关的实时数据和统计信息。通过该API,您可以访问交易对的最新价格、深度图和交易历史等数据。这些数据对于市场分析、决策和监控交易进展非常有价值。Web3数据API能够提供准确及时的数据,有助于更好地了解市场动态。 3. [限价订单](https://docs.dodoex.io/zh/developer/developers-portal/api/limit-order) :限价订单API允许您按指定价格提交交易订单。您可以设置买入或卖出价格并指定交易数量。通过该API,您的订单将在指定价格下执行,并在市场状况允许时完成。限价订单API使您能够更好地控制执行价格,与您的交易策略和需求保持一致。 4. [跨链交易](https://docs.dodoex.io/zh/developer/developers-portal/api/cross-chain-trading) :跨链交易API允许您使用dodo汇总的多个跨链桥获取有利的报价、提交跨链交易以及跟踪跨链交易的状态。 5. [Widget配置中心](https://docs.dodoex.io/zh/developer/developers-portal/api/config-center) :通过API帮助用户控制其小部件。 这些API为开发者提供了强大的工具和信息,以增强他们在DODO开发者门户上的交易体验和策略。 --- # DODO Developer Portal - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) ⛺ Developers Portal =================== Best DApp Developer Portal in the world Welcome to the DODO Developer Portal! We're thrilled to have you on board. To meet your needs in utilizing the DODO API, please log in to our Developer Portal using your Web3 wallet. By doing so, you'll gain access to our top-notch services and support. This documentation consists of the following sections: * [Introduction](https://docs.dodoex.io/en/developer/developers-portal/introduction) : This section will guide developers how to quickly use DODO Developers Portal. * [Trading Widget](https://docs.dodoex.io/en/developer/developers-portal/widget) : This section will introduce how to use Trading Widget and the technical details of Trading Widget. [![image](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdeveloper-portal-intro05.bcd7f318.png&w=3840&q=75)\ \ Trading Widget\ \ Integrate DODO swap trading into your app and service quickly!](https://docs.dodoex.io/en/developer/developers-portal/widget) * [API](https://docs.dodoex.io/en/developer/developers-portal/api) : This section will introduce DODO’s open APIs. [![image](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdeveloper-portal-intro02.a6d5bab7.png&w=3840&q=75)\ \ Smart Route\ \ Support swap between any token pair](https://docs.dodoex.io/en/developer/developers-portal/introduction) [![image](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdeveloper-portal-intro04.ed0ea7e3.png&w=3840&q=75)\ \ Web3 Data Support\ \ provide easy on-chain data query: Token Info / Trading Pair Info / Token Fiat Price / Subgraph etc](https://docs.dodoex.io/en/developer/developers-portal/api/web3-data) [![image](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdeveloper-portal-intro03.9905c08c.png&w=3840&q=75)\ \ Limit Order\ \ Chain-native limit order feature implemented based on DODO Smart Route](https://docs.dodoex.io/en/developer/developers-portal/api/limit-order) [![image](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdeveloper-portal-intro06.fb09d5b1.png&w=3840&q=75)\ \ Cross Chain Trading\ \ Support cross-chain transactions on multiple chains](https://docs.dodoex.io/en/developer/developers-portal/api/cross-chain-trading) Access our Developer Portal through the following link: [https://developer.dodoex.io/](https://developer.dodoex.io/) . If you have any questions or concerns, feel free to reach out to us at [\[email protected\]](https://docs.dodoex.io/cdn-cgi/l/email-protection#197d767d76467d7c6f597d767d767c61377076) . Our dedicated team is here to support you every step of the way. Thank you for choosing the DODO Developer Portal. We're excited to collaborate with you and achieve remarkable development milestones together! --- # Web3 数据 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) Web3 数据 ======= Web3 数据 这个部分包括以下文章: * [交易对数据](https://docs.dodoex.io/zh/developer/developers-portal/api/web3-data/trading-pair-data) * [子图数据](https://docs.dodoex.io/zh/developer/developers-portal/api/web3-data/subgraph-data) * [流动性列表](https://docs.dodoex.io/zh/developer/developers-portal/api/web3-data/liquidity-list) * [挖矿列表](https://docs.dodoex.io/zh/developer/developers-portal/api/web3-data/mining-list) --- # 桥梁与流动性来源 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 桥梁与流动性来源 ======== 流动性来源[#](https://docs.dodoex.io/zh/product/dodox/bridge---liquidity-sources#liu-dong-xing-lai-yuan) ---------------------------------------------------------------------------------------------------- 以下是 DODO 的路由算法使用来执行交易的流动性来源列表: **Ethereum**: DODO V1, DODO V2, DODO V3, UniSwap V2, UniSwap V3, SushiSwap V2, ShibaSwap, Curve V1 Partial Stable Coin Pools, Balancer V2, Native Hybrid, DODO AMM V2, DODO AMM V3 **BSC**: DODO V1, DODO V2, DODO V3, Pancake V1, Pancake V2, Pancake V3, MDEX, BakerySwap, BiSwap, ApeSwap, BabySwap, Woo V2, Impossible, Thena, Native Hybrid, DODO AMM V2, DODO AMM V3 **Arbitrum One**: DODO V1, DODO V2, DODO V3, SushiSwap V2, UniSwap V3, GamBit, Curve V1 Partial Stable Coin Pools, Balancer V2, GamBit, Woo V2, Native Hybrid, DODO AMM V2, DODO AMM V3 **Polygon**: DODO V1, DODO V2, DODO V3, QuickSwap V2, QuickSwap V3, SushiSwap V2, Uniswap V2, Uniswap V3, Curve V1 Partial Stable Coin Pools, Balancer V2, Woo V2, DODO AMM V2, DODO AMM V3 **Aurora**: DODO V1, DODO V2, Trisolaris, WannaSwap **Avax**: DODO V1, DODO V2, DODO V3, TraderJoe, Pangolin, SushiSwap V2, Curve V1 Partial Stable Coin Pools, GamBit, Woo V2 **Base**: DODO V1, DODO V2, BaseSwap, KokonutSwap, RocketSwap, UniSwap V2, UniSwap V3, Woo V2, SushiSwap V3, LeetSwap, Aerodrome, Native Hybrid, DODO AMM V2, DODO AMM V3 **Conflux**: DODO V1, DODO V2, Swappi **Sepolia**: DODO V1, DODO V2, DODO V3 **Linea**: DODO V1, DODO V2, Woo V2, SyncSwap, Izumi, Kyber-elastic **Manta**: DODO V2, aperture adapter **Mantle**: DODO V2, Woo V2, Izumi, FusionX V2, FusionX V3, Agni, Merchant Moe V1 **Optimism**: DODO V1, DODO V2, DODO V3, UniSwap V3, Curve V1 Partial Stable Coin Pools, Woo V2, Velodrome **Scroll**: DODO V2, SyncSwap, Izumi, Zebra V1, Zebra V2, Skydrome **Bitlayer**: DODO V2, Macaron, BitCow **Zircuit**: DODO V2 **Zircuit Testnet**: DODO V2 **X Layer**: DODO V2 **Arb Sepolia**: DODO V2 **Hashkey**: DODO V2 **Hashkey Testnet**: DODO V2 **Zero**: DODO V2 **Zero Testnet**: DODO V2 **Taiko**: DODO V2, Uniswap V2, Uniswap V3 **Taiko Testnet**: DODO V2 **Morph**: DODO V2 **Plume**: DODO V2, Uniswap V2 **Plume Testnet**: DODO V2, Uniswap V2 **Neox**: DODO V2, Uniswap V2 **Hemi**: DODO V2 **BeraChain**: DODO V2, Algebra, Native Hybrid **Berachain Testnet**: DODO V2, Algebra **Monad Testnet**: DODO V2, DODO AMM V2, DODO AMM V3 **Rise Testnet**: DODO V2, DODO AMM V2, DODO AMM V3 **Morph Holesky**: Velodrome, Uniswap V3 **Nero**: DODO V2, DODO AMM V2, DODO AMM V3 **Zetachain Testnet**: DODO V2 **Pharos Testnet**: DODO V2, DODO AMM V2, DODO AMM V3 * * * 桥梁[#](https://docs.dodoex.io/zh/product/dodox/bridge---liquidity-sources#qiao-liang) ------------------------------------------------------------------------------------- 以下是 DODO 聚合的跨链桥产品列表: **Ethereum**: LIFI, Hyphen, Nabox, Bungee, Swft, Stargate, Connext, Squid, Across, Layerswap, OKX Bridge, Symbiosis **BSC**: LIFI, Hyphen, Nabox, Bungee, Swft, Stargate, Connext, Squid, Layerswap, OKX Bridge, Symbiosis **Arbitrum One**: LIFI, Hyphen, Nabox, Bungee, Swft, Stargate, Connext, Squid, Across, Layerswap, OKX Bridge, Symbiosis **Polygon**: LIFI, Hyphen, Nabox, Bungee, Swft, Stargate, Connext, Squid, Across, Layerswap, Symbiosis **Aurora**: LIFI, Bungee **Avax**: LIFI, Hyphen, Nabox, Bungee, Swft, Stargate, Squid, Layerswap, OKX Bridge, Symbiosis **Base**: LIFI, Nabox, Bungee, Swft, Across, Layerswap, OKX Bridge, Symbiosis **Boba**: LIFI, Symbiosis **Conflux**: Swft **Heco**: Nabox, Swft, Layerswap **Linea**: LIFI, Nabox, Layerswap, OKX Bridge, Symbiosis **MoonRiver**: LIFI **Ok**: LIFI, Nabox, Swft, Layerswap **Optimism**: LIFI, Hyphen, Nabox, Bungee, Swft, Stargate, Connext, Squid, Across, Layerswap, OKX Bridge, Symbiosis **Scroll**: Swft, Layerswap, Symbiosis **Manta**: Layerswap, Symbiosis, Manta **Mantle**: Squid, Layerswap, Symbiosis, Mantle Native * * * ### 桥梁提供者[#](https://docs.dodoex.io/zh/product/dodox/bridge---liquidity-sources#qiao-liang-ti-gong-zhe) **LIFI**: [https://li.fi/](https://li.fi/) **Hyphen**: [https://hyphen.biconomy.io](https://hyphen.biconomy.io/) **Nabox**: [https://nabox.io/](https://nabox.io/) **Bungee**: [https://www.bungee.exchange/](https://www.bungee.exchange/) **Swft**: [https://swap.swft.pro/#/](https://swap.swft.pro/#/) **Stargate**: [https://stargate.finance/](https://stargate.finance/) **Connext**: [https://bridge.connext.network/](https://bridge.connext.network/) **Squid**: [https://www.squidrouter.com/](https://www.squidrouter.com/) **Across**: [https://across.to/bridge](https://across.to/bridge) **Layerswap**: [https://www.layerswap.io/](https://www.layerswap.io/) **OKX Bridge**: [https://www.okx.com/web3/dex-swap](https://www.okx.com/web3/dex-swap) **Symbiosis**: [https://symbiosis.finance/](https://symbiosis.finance/) **Manta**: [https://pacific-bridge.manta.network/](https://pacific-bridge.manta.network/) **Mantle Native**: [https://bridge.mantle.xyz/](https://bridge.mantle.xyz/) --- # Bridge & Liquidity Sources - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) Bridge & Liquidity Sources ========================== Liquidity sources[#](https://docs.dodoex.io/en/product/dodox/bridge---liquidity-sources#liquidity-sources) ----------------------------------------------------------------------------------------------------------- The following is a list of liquidity sources that are used to execute trades by DODO's routing algorithm: **Ethereum**: DODO V1, DODO V2, DODO V3, UniSwap V2, UniSwap V3, SushiSwap V2, ShibaSwap, Curve V1 Partial Stable Coin Pools, Balancer V2, Native Hybrid, DODO AMM V2, DODO AMM V3 **BSC**: DODO V1, DODO V2, DODO V3, Pancake V1, Pancake V2, Pancake V3, MDEX, BakerySwap, BiSwap, ApeSwap, BabySwap, Woo V2, Impossible, Thena, Native Hybrid, DODO AMM V2, DODO AMM V3 **Arbitrum One**: DODO V1, DODO V2, DODO V3, SushiSwap V2, UniSwap V3, GamBit, Curve V1 Partial Stable Coin Pools, Balancer V2, GamBit, Woo V2, Native Hybrid, DODO AMM V2, DODO AMM V3 **Polygon**: DODO V1, DODO V2, DODO V3, QuickSwap V2, QuickSwap V3, SushiSwap V2, Uniswap V2, Uniswap V3, Curve V1 Partial Stable Coin Pools, Balancer V2, Woo V2, DODO AMM V2, DODO AMM V3 **Aurora**: DODO V1, DODO V2, Trisolaris, WannaSwap **Avax**: DODO V1, DODO V2, DODO V3, TraderJoe, Pangolin, SushiSwap V2, Curve V1 Partial Stable Coin Pools, GamBit, Woo V2 **Base**: DODO V1, DODO V2, BaseSwap, KokonutSwap, RocketSwap, UniSwap V2, UniSwap V3, Woo V2, SushiSwap V3, LeetSwap, Aerodrome, Native Hybrid, DODO AMM V2, DODO AMM V3 **Conflux**: DODO V1, DODO V2, Swappi **Sepolia**: DODO V1, DODO V2, DODO V3 **Linea**: DODO V1, DODO V2, Woo V2, SyncSwap, Izumi, Kyber-elastic **Manta**: DODO V2, aperture adapter **Mantle**: DODO V2, Woo V2, Izumi, FusionX V2, FusionX V3, Agni, Merchant Moe V1 **Optimism**: DODO V1, DODO V2, DODO V3, UniSwap V3, Curve V1 Partial Stable Coin Pools, Woo V2, Velodrome **Scroll**: DODO V2, SyncSwap, Izumi, Zebra V1, Zebra V2, Skydrome **Bitlayer**: DODO V2, Macaron, BitCow **Zircuit**: DODO V2 **Zircuit Testnet**: DODO V2 **X Layer**: DODO V2 **Arb Sepolia**: DODO V2 **Hashkey**: DODO V2 **Hashkey Testnet**: DODO V2 **Zero**: DODO V2 **Zero Testnet**: DODO V2 **Taiko**: DODO V2, Uniswap V2, Uniswap V3 **Taiko Testnet**: DODO V2 **Morph**: DODO V2 **Plume**: DODO V2, Uniswap V2 **Plume Testnet**: DODO V2, Uniswap V2 **Neox**: DODO V2, Uniswap V2 **Hemi**: DODO V2 **BeraChain**: DODO V2, Algebra, Native Hybrid **Berachain Testnet**: DODO V2, Algebra **Monad Testnet**: DODO V2, DODO AMM V2, DODO AMM V3 **Rise Testnet**: DODO V2, DODO AMM V2, DODO AMM V3 **Morph Holesky**: Velodrome, Uniswap V3 **Nero**: DODO V2, DODO AMM V2, DODO AMM V3 **Zetachain Testnet**: DODO V2 **Pharos Testnet**: DODO V2, DODO AMM V2, DODO AMM V3[#](https://docs.dodoex.io/en/product/dodox/bridge---liquidity-sources#pharos-testnet--dodo-v2--dodo-amm-v2--dodo-amm-v3) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Bridges[#](https://docs.dodoex.io/en/product/dodox/bridge---liquidity-sources#bridges) --------------------------------------------------------------------------------------- The following is a list of cross-chain bridge products aggregated by DODO: **Ethereum**: LIFI, Hyphen, Nabox, Bungee, Swft, Stargate, Connext, Squid, Across, Layerswap, OKX Bridge, Symbiosis **BSC**: LIFI, Hyphen, Nabox, Bungee, Swft, Stargate, Connext, Squid, Layerswap, OKX Bridge, Symbiosis **Arbitrum One**: LIFI, Hyphen, Nabox, Bungee, Swft, Stargate, Connext, Squid, Across, Layerswap, OKX Bridge, Symbiosis **Polygon**: LIFI, Hyphen, Nabox, Bungee, Swft, Stargate, Connext, Squid, Across, Layerswap, Symbiosis **Aurora**: LIFI, Bungee **Avax**: LIFI, Hyphen, Nabox, Bungee, Swft, Stargate, Squid, Layerswap, OKX Bridge, Symbiosis **Base**: LIFI, Nabox, Bungee, Swft, Across, Layerswap, OKX Bridge, Symbiosis **Boba**: LIFI, Symbiosis **Conflux**: Swft **Heco**: Nabox, Swft, Layerswap **Linea**: LIFI, Nabox, Layerswap, OKX Bridge, Symbiosis **MoonRiver**: LIFI **Ok**: LIFI, Nabox, Swft, Layerswap **Optimism**: LIFI, Hyphen, Nabox, Bungee, Swft, Stargate, Connext, Squid, Across, Layerswap, OKX Bridge, Symbiosis **Scroll**: Swft, Layerswap, Symbiosis **Manta**: Layerswap, Symbiosis, Manta **Mantle**: Squid, Layerswap, Symbiosis, Mantle Native * * * ### Bridges Provider[#](https://docs.dodoex.io/en/product/dodox/bridge---liquidity-sources#bridges-provider) **LIFI**: [https://li.fi/](https://li.fi/) **Hyphen**: [https://hyphen.biconomy.io](https://hyphen.biconomy.io/) **Nabox**: [https://nabox.io/](https://nabox.io/) **Bungee**: [https://www.bungee.exchange/](https://www.bungee.exchange/) **Swft**: [https://swap.swft.pro/#/](https://swap.swft.pro/#/) **Stargate**: [https://stargate.finance/](https://stargate.finance/) **Connext**: [https://bridge.connext.network/](https://bridge.connext.network/) **Squid**: [https://www.squidrouter.com/](https://www.squidrouter.com/) **Across**: [https://across.to/bridge](https://across.to/bridge) **Layerswap**: [https://www.layerswap.io/](https://www.layerswap.io/) **OKX Bridge**: [https://www.okx.com/web3/dex-swap](https://www.okx.com/web3/dex-swap) **Symbiosis**: [https://symbiosis.finance/](https://symbiosis.finance/) **Manta**: [https://pacific-bridge.manta.network/](https://pacific-bridge.manta.network/) **Mantle Native**: [https://bridge.mantle.xyz/](https://bridge.mantle.xyz/) --- # 限价订单 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 限价订单 ==== 限价订单 在DODO上,限价订单是指用户以特定的最低价格(称为限价)交换代币以获得他们希望收到的代币的订单。只有当市场价格达到用户确定的限价时,交易才会执行。 在DODO上提交限价订单不会产生Gas费用。 如果DODO上提交的限价订单达到限价,将会有以下来源之一来填补订单: * DODO上的流动性池 * 来自其他协议的聚合流动性池 * 其他用户发送的限价买/卖订单 您可以使用DODO的API发起限价订单。有关如何通过DODO UI下达限价订单的详细信息,请参阅:[DODO限价订单](https://app.dodoex.io/limit) --- # 智能交易 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🚌 SmartTrade ============= DODO的智能路由算法 ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fsmart-trade-cover.d6e838cf.webp&w=3840&q=75) SmartTrade是DODO的去中心化流动性聚合服务,可路由和比较各种流动性来源,以报价两个任意代币之间的最佳兑换率。该服务使得在同一网络上两个任意代币之间的交易成为可能。在DODO上执行交易的用户还可以选择参与交易挖矿,以获取DODO代币作为奖励。 如果您发现SmartTrade在整个网络上报价不是最优的,请发送报告至[api@dodoex.io](mailto:api@dodoex.io) ,您将获得NFT奖励! 聚合算法[#](https://docs.dodoex.io/zh/developer/developers-portal/api/smart-trade#ju-he-suan-fa) --------------------------------------------------------------------------------------------- DODO协议既充当流动性提供者,也充当流动性分配者。通过在交易侧提供聚合功能,实现在同一网络上两个任意代币之间的交易。智能地从流动性来源中找到最佳的订单路径,为交易者提供最佳价格和最低滑点的代币交换。 DODO的内部路由算法通过聚合链上各个交易所的流动性,计算为用户找到最佳的交易路径。它支持在同一协议内部分割交易,也支持在不同协议之间分割交易。在获得路径之后,链上的智能合约将为用户执行交易操作。智能合约中的安全验证确保用户资金的安全性和报价的有效性。 DODO的路由策略有两种,一种是线性路由,另一种是分割订单路由。 ### 线性路由[#](https://docs.dodoex.io/zh/developer/developers-portal/api/smart-trade#xian-xing-lu-you) **线性路由**意味着在找到交易路径的过程中,所有正在交易的币都通过同一个池子,从而找到目标代币的最佳价格路径(类似于Uniswap V2的路由算法)。这个算法具有低复杂度,计算速度快,与合约的交互较少,使用的gas较少。 例如,如果用户需要交易ETH-USDC,线性路由找到的最佳路径可能是ETH-USDT-USDC,最终路径只经过两个池子,一次一个。这两个池子可能来自不同的协议,例如ETH-USDT是Uniswap V3的池子,USDT-USDC是DODO的池子。线性路由算法从每个协议中涉及输入代币、目标代币和通用中间代币的所有池子中收集信息,然后递归找到最佳路径。 ### 分割订单路由[#](https://docs.dodoex.io/zh/developer/developers-portal/api/smart-trade#fen-ge-ding-dan-lu-you) **分割订单路由**是指将用户的资金同时分配到不同的交易池中,找到交易路径的过程。这些代币在这些池子之间按照特定比例分割,以获得这些代币的最佳价格。这个算法具有较高的复杂度,计算速度较慢,与线性路由相比,交互的路径合约较多。这使得它消耗更多的gas,但价格要比线性路由更好。 同样以ETH-USDC为例,交易路径经过的代币可能是ETH-USDT-USDC。ETH和USDT的交易可能会经过两个池子:用户的30%的ETH通过Uniswap V3转换为USDT,用户的70%的ETH通过DODO V2转换为USDT。对于交易路径中的下一笔交易USDT-USDC,初始的USDT是上述两个来源的USDT的总和,然后在几个USDT-USDC交易池中最优地分割,得到最终的USDC数量。 为了控制gas的消耗并增加交易的成功率,每对交易只经过不超过三个池子。 支持的链和流动性源列表[#](https://docs.dodoex.io/zh/developer/developers-portal/api/smart-trade#zhi-chi-de-lian-he-liu-dong-xing-yuan-lie-biao) ------------------------------------------------------------------------------------------------------------------------------------- DODO已支持11个链,DODO在各个网络中聚合的流动性来源可以在[这里](https://docs.dodoex.io/zh/product/dodox/bridge---liquidity-sources) 找到。 ### 结论[#](https://docs.dodoex.io/zh/developer/developers-portal/api/smart-trade#jie-lun) **DODO内部的SmartTrade路由算法还有更多的优化空间,我们将继续优化交易路径和代币的分割,以获得更好的报价。** DODO将继续努力为用户提供更好的价格。 --- # 跨链交易 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 跨链交易 ==== 跨链交易 DODO的跨链交易功能使用户可以使用跨链令牌桥将一个链上的资产交换为另一个链上的不同资产。该功能支持多种不同链上的数十种代币的交换,并通过聚合多个平台和协议,让用户安全快速地转移资产。 DODO跨链交易API支持以下功能: * [**支持的跨链代币列表**](https://docs.dodoex.io/zh/developer/developers-portal/api/cross-chain-trading/cross-chain-supported-token-list) :该接口返回显示给用户的支持链、代币和通道产品数据。 * [**跨链路由**](https://docs.dodoex.io/zh/developer/developers-portal/api/cross-chain-trading/cross-chain-routes) :该接口根据用户选择的交易对和出售数量返回交换路由和价格报价。 * [**跨链交易编码**](https://docs.dodoex.io/zh/developer/developers-portal/api/cross-chain-trading/cross-chain-transaction-encoding) :用户选择通过跨链路由接口获取的路由后,调用该接口获取要发送的交易数据。该接口的'encodeParams'参数来自所选的路由。 * [**创建跨链订单**](https://docs.dodoex.io/zh/developer/developers-portal/api/cross-chain-trading/cross-chain-order-creation) :用户调用'web3.eth.sendTransaction'方法向链上发送交易后,调用该接口保存交易数据。 * [**跨链订单列表**](https://docs.dodoex.io/zh/developer/developers-portal/api/cross-chain-trading/cross-chain-order-list) :调用该接口获取用户最新的订单记录数据。如果接口未返回最新数据,则原因可能是接口数据有缓存,缓存持续约15秒。 * [**跨链订单详情**](https://docs.dodoex.io/zh/developer/developers-portal/api/cross-chain-trading/cross-chain-order-details) :该接口返回给定订单的详细数据,缓存时间约为15秒。 * [**跨链新订单状态**](https://docs.dodoex.io/zh/developer/developers-portal/api/cross-chain-trading/cross-chain-new-order-status) :该接口用于获取与用户跨链订单相关的状态变化信息,缓存时间约为15秒。 --- # Introduction - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) Introduction ============ Introduction Welcome to the DODO Developer Portal – your gateway to seamless integration and enhanced utilization of DODO's Widget and APIs. Designed with developers in mind, our portal aims to streamline the process of integrating DODO's innovative products into your projects, ensuring a swift and efficient experience. Our developer portal serves as a comprehensive resource hub, offering valuable insights and documentation to facilitate a deeper understanding of DODO's APIs and Widget. Whether you're a seasoned developer or just starting, our user-friendly interface provides you with the tools and information needed to integrate DODO's offerings seamlessly. Key Features: **Swift Integration**: The DODO Developer Portal is equipped with step-by-step guides and documentation, enabling developers to effortlessly integrate DODO's Widget and APIs into their applications. Say goodbye to complex integration processes and hello to a smoother development journey. **Comprehensive Documentation**: Dive into detailed documentation that covers every aspect of DODO's APIs and Widget. From setup instructions to advanced features, our documentation ensures you have all the information at your fingertips, empowering you to make the most of our products. **Real-Time Insights**: Stay informed about the performance and usage of DODO's APIs and Widget through real-time analytics. Monitor key metrics to optimize your implementation and deliver an enhanced user experience. **Interactive Sandbox**: Test and experiment with DODO's APIs and Widget in a risk-free environment using our interactive sandbox. Gain hands-on experience and ensure your integration meets the highest standards before deploying to production. Quick start[#](https://docs.dodoex.io/en/developer/developers-portal/introduction#quick-start) ----------------------------------------------------------------------------------------------- In order to quickly understand how to make an exchange using the protocol, we suggest you take a quick course: [Quick start](https://docs.dodoex.io/en/developer/developers-portal/introduction/quick-start) --- # Widget配置中心 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 小部件配置中心 ======= Widget配置中心 通过 API 帮助用户控制他们的小部件。 --- # Web3 Data - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) Web3 Data ========= Web3 Data Here are the articles in this section: * [Trading Pair Data](https://docs.dodoex.io/en/developer/developers-portal/api/web3-data/trading-pair-data) * [Subgraph Data](https://docs.dodoex.io/en/developer/developers-portal/api/web3-data/subgraph-data) * [Liquidity List](https://docs.dodoex.io/en/developer/developers-portal/api/web3-data/liquidity-list) * [Mining List](https://docs.dodoex.io/en/developer/developers-portal/api/web3-data/mining-list) --- # Cross Chain Trading - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) Cross Chain Trading =================== Cross Chain Trading DODO's Cross-Chain Trading feature enables users to exchange assets on one chain for different assets on another using a cross-chain token bridge. This feature supports the exchange of dozens of tokens across a variety of different chains, and allows users to transfer assets safely and quickly by aggregating multiple platforms and protocols. The DODO Cross-Chain Trading API supports the following functionalities: * [**Cross Chain Supported Token List**](https://docs.dodoex.io/en/developer/developers-portal/api/cross-chain-trading/cross-chain-supported-token-list) : This interface returns supported chains, tokens, and channel product data for display to users. * [**Cross Chain Routes**](https://docs.dodoex.io/en/developer/developers-portal/api/cross-chain-trading/cross-chain-routes) : This interface returns swap routes and price quotes based on the user's selected transaction pair and amount to sell. * [**Cross Chain Transaction Encoding**](https://docs.dodoex.io/en/developer/developers-portal/api/cross-chain-trading/cross-chain-transaction-encoding) : After the user selects one of the routes obtained via the Cross Chain Routes interface, they call the interface to obtain the sent transaction data. The 'encodeParams' parameter of this interface is obtained from the selected route. * [**Cross Chain Order Creation**](https://docs.dodoex.io/en/developer/developers-portal/api/cross-chain-trading/cross-chain-order-creation) : After calling the 'web3.eth.sendTransaction' method to send the transaction to the chain, the user calls this interface to save the transaction data. * [**Cross Chain Order List**](https://docs.dodoex.io/en/developer/developers-portal/api/cross-chain-trading/cross-chain-order-list) : This interface is called to obtain the user's latest order record data. If the interface did not return the latest data, the reason may be that the interface data has a cache, which lasts for about 15 seconds. * [**Cross Chain Order Details**](https://docs.dodoex.io/en/developer/developers-portal/api/cross-chain-trading/cross-chain-order-details) : This interface returns detailed data for a given order, with a cache time of approximately 15 seconds. * [**Cross Chain New Order Status**](https://docs.dodoex.io/en/developer/developers-portal/api/cross-chain-trading/cross-chain-new-order-status) : This interface is used to get information on status changes related to users' cross chain orders, with a cache time of approximately 15 seconds. --- # API - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) ⛏ API ===== The DODO Developer Portal currently provides the following three types of APIs: 1. [Smart Route](https://docs.dodoex.io/en/developer/developers-portal/api/smart-trade) : The Smart Route API aims to offer efficient and reliable trading route services. With this API, you can quickly obtain the optimal trading path. Our smart routing algorithm automatically selects the best liquidity sources to ensure that you can trade at the most favorable prices. 2. [Web3 Data](https://docs.dodoex.io/en/developer/developers-portal/api/web3-data) : The Web3 Data API provides real-time data and statistics related to the DODO platform. Through this API, you can access data such as the latest prices, depth charts, and transaction history for trading pairs. This data is valuable for market analysis, decision-making, and monitoring trade progress. The Web3 Data API enables you to obtain accurate and timely data, facilitating a better understanding of market dynamics. 3. [Limit Order](https://docs.dodoex.io/en/developer/developers-portal/api/limit-order) : The Limit Order API allows you to submit trading orders at specified prices. You can set the buying or selling price and specify the trade quantity. This API ensures that your orders are executed at the specified prices and completed when market conditions allow. The Limit Order API gives you better control over the execution prices, aligning with your trading strategies and requirements. 4. [Cross Chain Trading](https://docs.dodoex.io/en/developer/developers-portal/api/cross-chain-trading) : The Cross Chain Trading API allows you to use multiple cross-chain bridges aggregated by dodo to get advantageous quotes, submit cross-chain transactions, and track the status of cross-chain transactions. 5. [Widget Config Center](https://docs.dodoex.io/en/developer/developers-portal/api/config-center) : Help users control their Widget through APIs. These APIs empower developers with powerful tools and information to enhance their trading experiences and strategies on the DODO developer portal. --- # Limit Order - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) Limit Order =========== Limit Order A limit order on DODO is an order to swap tokens with a specific minimum price (known as the limit price) for the token the user wishes to receive. The trade will only be executed if the market price reaches the limit price, which is determined by the user. Submitting a limit order on DODO does not incur gas. Limit orders submitted on DODO will be filled by one of the following sources if they ever hit their limit price: * Liquidity pools on DODO * Aggregated liquidity pools from other protocols * Limit buy/sell orders sent by other users You can initiate limit orders on DODO using the API. For details on how Limit Orders can be placed via the DODO UI, see: [DODO Limit Orders](https://app.dodoex.io/limit) --- # 介绍 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 介绍 == 介绍 欢迎来到DODO开发者门户网站-您无缝集成和充分利用DODO小部件和API的入口。我们的门户网站专为开发者设计,旨在简化将DODO的创新产品集成到您的项目中的过程,确保快速高效的体验。 我们的开发者门户网站是一个全面的资源中心,提供有价值的见解和文档,以便更深入地了解DODO的API和小部件。无论您是经验丰富的开发者还是刚刚入门,我们用户友好的界面为您提供了工具和信息,助您无缝地集成DODO的产品。 主要特点: **快速集成**:DODO开发者门户网站配备了逐步指南和文档,使开发者能够轻松地将DODO的小部件和API集成到他们的应用程序中。告别复杂的集成过程,迎接更顺畅的开发之旅。 **全面的文档**:深入了解覆盖DODO的API和小部件的详细文档。从设置说明到高级功能,我们的文档确保您随时可以获取所有信息,助您充分利用我们的产品。 **实时洞察**:通过实时分析,了解DODO的API和小部件的性能和使用情况。监测关键指标以优化您的实施,并提供更好的用户体验。 **交互式沙盒**:使用我们的交互式沙盒在无风险环境中测试和实验DODO的API和小部件。获得亲身经历,并确保您的集成符合最高标准,然后再部署到生产环境中。 快速开始[#](https://docs.dodoex.io/zh/developer/developers-portal/introduction#kuai-su-kai-shi) -------------------------------------------------------------------------------------------- 为了快速了解如何使用该协议进行兑换,我们建议您参加一个快速课程:[快速开始](https://docs.dodoex.io/zh/developer/developers-portal/introduction/quick-start) --- # Getting Started - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) Getting Started =============== Widget Getting Started In this article, we will go over several use cases for DODO's Swap Widget. ### Using the Swap Widget[#](https://docs.dodoex.io/en/developer/developers-portal/widget/getting-started#using-the-swap-widget) To use the widget, the 'widgets' library must first be made accessible to the user, either by installing it locally with 'yarn', or by importing it in a TypeScript code file. #### Install[#](https://docs.dodoex.io/en/developer/developers-portal/widget/getting-started#install) yarn add @dodoex/widgets #### Importing ([React Project](https://github.com/DODOEX/widgets/tree/main/example/react-app) )[#](https://docs.dodoex.io/en/developer/developers-portal/widget/getting-started#importing----object-object--) import { SwapWidget } from "@dodoex/widgets"; function App() { return ; } #### Importing ([Angular Project](https://github.com/DODOEX/widgets/tree/main/example/angular-app) ) [#](https://docs.dodoex.io/en/developer/developers-portal/widget/getting-started#importing----object-object---) /** * Angular Component ts file * Initialize SwapWidget */ import { Component, OnInit } from "@angular/core"; import { InitSwapWidget } from "@dodoex/widgets"; @Component({ selector: "app-widgets", templateUrl: "./widgets.component.html", styleUrls: ["./widgets.component.scss"], }) export class WidgetsComponent { ngOnInit() { InitSwapWidget({ colorMode: "dark", // apikey: '55ea0a80b62316d9bc', // for default test }); } }
#### Importing ([JS Project](https://github.com/DODOEX/widgets/tree/main/example/js-app) )[#](https://docs.dodoex.io/en/developer/developers-portal/widget/getting-started#importing----object-object--) /** * main.js * Initialize SwapWidget */ "use strict"; import { InitSwapWidget } from "@dodoex/widgets"; function initDodoWidget() { InitSwapWidget({ colorMode: "dark", // other apis }); } initDodoWidget();
### Connect to a Wallet[#](https://docs.dodoex.io/en/developer/developers-portal/widget/getting-started#connect-to-a-wallet) The [configuration](https://github.com/DODOEX/widgets/blob/main/packages/dodoex-widgets/src/constants/chains.ts) of the currently supported chains can be viewed here\[add new link\]. You can also use the Swap Widget's built-in wallet connection module directly. #### RPC Node Configuration[#](https://docs.dodoex.io/en/developer/developers-portal/widget/getting-started#rpc-node-configuration) To customize the node configuration, run `jsonRpcUrlMap`, as shown below. You can also decide to use the [default configuration](https://github.com/DODOEX/widgets/blob/main/packages/dodoex-widgets/src/constants/chains.ts) . import { SwapWidget } from '@dodoex/widgets'; function App() { return ( ) } #### Default Chain Configuration[#](https://docs.dodoex.io/en/developer/developers-portal/widget/getting-started#default-chain-configuration) When using the Swap Widget's own wallet link, you may need to specify the default chain, which defaults to 1 if not specified. If the default chain is specified, and the connection turns out to be using MetaMask, you will be prompted to switch to your specified chain. import { SwapWidget } from "@dodoex/widgets"; function App() { return ; } ### Customize the Swap Widget[#](https://docs.dodoex.io/en/developer/developers-portal/widget/getting-started#customize-the-swap-widget) We support the following Swap Widget customizations: #### Customize Height and Width[#](https://docs.dodoex.io/en/developer/developers-portal/widget/getting-started#customize-height-and-width) Swap Widget's default width is set to `375px`, and the default height is `494px`, which are the dimensions of the Swap Widget if the width and height parameters are not customized. You can set the width and height to customize the display of the container according to your needs. The display elements automatically adjust based on the In order to adapt to different models and to avoid a misleading interface, the minimum width the interface can be set to is `292px`, and the minimum height is `494px`. If the height and width are set smaller than the minimum width and height, the change will not take effect. If height and width were set in`number` ,it would turn into `px` display. The `string` can be set to any of the [CSS attributes](https://drafts.csswg.org/css-sizing-3/#propdef-width) . import { SwapWidget } from "@dodoex/widgets"; function App() { return ; } ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fwidget-get-start01.56895d8e.png&w=1920&q=75) ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fwidget-get-start02.c86d12f2.png&w=1920&q=75) #### Customize Fonts[#](https://docs.dodoex.io/en/developer/developers-portal/widget/getting-started#customize-fonts) Swap Widget uses `mui/system` to establish the theme. Set the parameters in `theme` to set the font, as shown below. import { SwapWidget } from "@dodoex/widgets"; function App() { return ( ); } #### Customize Theme[#](https://docs.dodoex.io/en/developer/developers-portal/widget/getting-started#customize-theme) There are currently two themes, `light` and `dark`. When the `mode` is specified, `theme.palette` can be run to override the theme color. Note, the code only works when `theme.palette.mode` = `mode`. An example of this usage is shown below. import { SwapWidget } from '@dodoex/widgets'; function App() { return ( <SwapWidget colorMode="light" theme={{ palette: { // light | dark mode: 'light', primary: { // main color main: '#1A1A1B', }, secondary: { // secondary color(used for buttons or some window‘s background colors) main: '#FFE804', contrastText: '#1A1A1B', }, error: { main: '#EC5A7D', contrastText: '#FFFFFF', }, warning: { main: '#B15600', contrastText: '#1A1A1B', }, success: { main: '#2FBA90', contrastText: '#1A1A1B', }, purple: { main: '#6851B4', contrastText: '#1A1A1B', }, background: { default: '#F9F6E8', paper: '#FFFFFF', paperContrast: '#F6F6F6', backdrop: 'rgba(0, 0, 0, 0.9)', input: '#F0F0F0', tag: 'rgba(26, 26, 27, 0.1)', }, text: { primary: '#1A1A1B', secondary: 'rgba(26, 26, 27, 0.5)', disabled: 'rgba(26, 26, 27, 0.3)', placeholder: 'rgba(26, 26, 27, 0.3)', link: '#1A1A1B', }, border: { main: 'rgba(69, 72, 81, 0.1)', light: 'rgba(26, 26, 27, 0.3)', disabled: 'rgba(26, 26, 27, 0.1)', }, hover: { default: 'rgba(26, 26, 27, 0.04)', }, }, }} /> ) } #### Customize Style[#](https://docs.dodoex.io/en/developer/developers-portal/widget/getting-started#customize-style) Many designers use `GlobalStyles` from `mui/system` to set the overall style, however, we recommend using `theme.components.MuiCssBaseline.styleOverrides` to override the style if needed. import { SwapWidget } from "@dodoex/widgets"; function App() { return ( ); } t; Or simply use CSS, as shown below. .dodo-widget-container { //... css code } **Customize Token List** Specify details in `tokenList` to override the default Token List. The default Token List's configuration can be found [here](https://github.com/DODOEX/widgets/blob/main/packages/dodoex-widgets/src/constants/tokenList.ts) . import { SwapWidget } from '@dodoex/widgets'; function App() { return ( ) } #### Customize Popular Token List[#](https://docs.dodoex.io/en/developer/developers-portal/widget/getting-started#customize-popular-token-list) You can customize the `popularTokenList` parameter, using the same format as `tokenList`. The tokens will be displayed on the list of popular tokens, making them easier to access. import { SwapWidget } from '@dodoex/widgets'; function App() { return ( ) } --- # How to join a crowdpooling event? - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) How to join a crowdpooling event? ================================= 1\. Navigate to the "[Crowdpooling](https://app.dodoex.io/cp/join) " page[#](https://docs.dodoex.io/en/product/tutorial/how-to-join-a-crowdpooling-event#1--navigate-to-the--crowdpooling--page) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2\. Connect to your wallet[#](https://docs.dodoex.io/en/product/tutorial/how-to-join-a-crowdpooling-event#2--connect-to-your-wallet) ------------------------------------------------------------------------------------------------------------------------------------- 3\. Choose the pool you'd like to join[#](https://docs.dodoex.io/en/product/tutorial/how-to-join-a-crowdpooling-event#3--choose-the-pool-you-d-like-to-join) ------------------------------------------------------------------------------------------------------------------------------------------------------------- Through the search box in the upper right corner, search for the address or token address to find the Crowdpooling project you want to join; For projects that have not yet started, you can click "Follow" and you can find them in the "Follow" list. ![JoinCP00](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FJoinCP00.dea11793.png&w=3840&q=75) 4\. Joining the Crowdpooling Event[#](https://docs.dodoex.io/en/product/tutorial/how-to-join-a-crowdpooling-event#4--joining-the-crowdpooling-event) ----------------------------------------------------------------------------------------------------------------------------------------------------- Once the Crowdpooling event starts, you can click "Join" to enter the details page. On the details page, you can see more information. Enter the amount of funds you'd like to contribute to join the Crowdpooling event on the right-side window. When using a certain token for a Crowdpooling event for the first time, you will need to approve it. Click the "lock" symbol to the right of the number to unlock and confirm the transaction in your wallet. After the transaction is confirmed on-chain, you will then be ready to join the Crowdpooling event with the amount of tokens you wish to contribute. Click ""Add" and confirm in your wallet, the transaction is then confirmed on-chain, and your participation is complete in the Crowdpooling event! 5\. Retrieve your allocation / Settle[#](https://docs.dodoex.io/en/product/tutorial/how-to-join-a-crowdpooling-event#5--retrieve-your-allocation---settle) ----------------------------------------------------------------------------------------------------------------------------------------------------------- During the Crowdpooling event, you can deposit or withdraw your funds at any time. When the Crowdpooling period ends, if the fund-raising cap is not exceeded, you will get 100% of your allocation; If the raised funds exceed 100%, then your allocation of the Crowdpooling event will be distributed according to your proportion of total raised fund multiplying the amount of the total token for the sales, and the excess funds will be returned to your wallet. To retrieve your allocation from a completed Crowdpool event you need to "Settle" the event to your wallet. This will claim the tokens and send your contribution. Click on the Settle button, confirm the terms and the transaction; once confirmed on-chain the tokens will be sent to your address. You have successfully completed a DODO Crowdpooling event! Crowdpooling Risk Warning[#](https://docs.dodoex.io/en/product/tutorial/how-to-join-a-crowdpooling-event#crowdpooling-risk-warning) ------------------------------------------------------------------------------------------------------------------------------------ Crowdpooling is an essential feature of DODO V2. It is a completely permissionless feature, meaning that anyone will be create a Crowdpooling campaign on DODO V2. If you wish to participate in a Crowdpooling campaign, please double-check all the information about the campaign on its detail page, and confirm with the project creator that the token contract address is indeed correct before making any financial commitment. --- # How to become a DODO V3 strategy provider(SP)? - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) How to become a DODO V3 strategy provider(SP)? ============================================== DODO V3 has been audited by [Sherlock](https://audits.sherlock.xyz/contests/89)  and deployed on the mainnet, and aggregators like 1inch have also been integrated. It is now in the whitelist testing phase. In this stage, DODO will invite SPs to use their own funds for market making, and once stable profits are realized, DODO V3 will open to LPs, allowing SPs to manage LP’s funds. If you would like to try DODO V3, please contact [contact@dodoex.io](mailto:contact@dodoex.io) --- # How to participate in liquidity mining? - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) How to participate in liquidity mining? ======================================= Liquidity mining, a cornerstone of the decentralized finance (DeFi) ecosystem, involves providing liquidity to a platform's pools and earning rewards in return. This concept plays a crucial role in ensuring sufficient liquidity on exchanges like DODO, which in turn facilitates smoother trades and better price stability. 1\. Navigate to the "[Mining](https://app.dodoex.io/earn/mining) " page[#](https://docs.dodoex.io/en/product/tutorial/how-to-join-liquidity-mining#1--navigate-to-the--mining--page) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2.Choose a Trading Pair[#](https://docs.dodoex.io/en/product/tutorial/how-to-join-liquidity-mining#2-choose-a-trading-pair) ---------------------------------------------------------------------------------------------------------------------------- Click “Active” to see every trading pair on DODO that is available for liquidity mining.Once you have selected a trading pair, click the button for the token you would like to stake. Note: When staking, depositing, or trading a token for the first time on DODO, you need to give DODO permission to access that token in your wallet by clicking “approve” in your wallet app. ![Joinmining00](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FJoinmining00.0fac6c0a.png&w=3840&q=75) 3.Obtain LP Tokens[#](https://docs.dodoex.io/en/product/tutorial/how-to-join-liquidity-mining#3-obtain-lp-tokens) ------------------------------------------------------------------------------------------------------------------ If you don’t have any LP Tokens, click the “Get \[token\] LP” button to get transferred to the Add Liquidity page for that trading pair, and obtain LP tokens by adding liquidity to this liquidity pool. ![Joinmining01](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FJoinmining01.c2ddf17c.png&w=3840&q=75) 4.Approve Staking[#](https://docs.dodoex.io/en/product/tutorial/how-to-join-liquidity-mining#4-approve-staking) ---------------------------------------------------------------------------------------------------------------- After successfully adding liquidity on the trading pair’s liquidity page and obtaining the LP tokens, go back to the trading pair’s Mining page and click “Approve”. LP tokens on DODO, known as DLPs, are your proof of being a DODO liquidity provider, representing a share of the liquidity pool. The ratio of DLP to liquidity assets is not 1:1. Click “Approve” and “Stake” on DODO, and confirm the transaction in your wallet app to start mining. 5.Stake and Start Mining[#](https://docs.dodoex.io/en/product/tutorial/how-to-join-liquidity-mining#5-stake-and-start-mining) ------------------------------------------------------------------------------------------------------------------------------ 6.Withdraw Your Assets[#](https://docs.dodoex.io/en/product/tutorial/how-to-join-liquidity-mining#6-withdraw-your-assets) -------------------------------------------------------------------------------------------------------------------------- To withdraw your assets, you need to unstake your LP token on the Mining page first, and then withdraw your funds on the Liquidity page. 7.DODO's Approach to Liquidity Mining[#](https://docs.dodoex.io/en/product/tutorial/how-to-join-liquidity-mining#7-dodo-s-approach-to-liquidity-mining) -------------------------------------------------------------------------------------------------------------------------------------------------------- Rewards in DODO Tokens: DODO's liquidity mining program rewards participants with its native token, DODO. These rewards are flexible, allowing participants to deposit or withdraw at any time, with the ability to claim rewards instantly. Reward Distribution Mechanism: The amount of DODO rewarded for each LP token is fixed per block. This means that as more participants deposit into a pool, the individual yield rate decreases. It ensures a fair distribution of rewards, where earnings are based on the proportion of liquidity provided. Multi-Chain Availability: DODO has expanded its liquidity mining program across multiple blockchains, including Ethereum (ETH), Binance Smart Chain (BSC), and Arbitrum. This multi-chain presence not only diversifies the options for liquidity providers but also broadens the reach and efficacy of the DODO platform. Detailed information about the ongoing liquidity mining programs, including specific pools and reward rates, can be found [here](https://app.dodoex.io/earn/mining) . 8.Risk Disclaimer[#](https://docs.dodoex.io/en/product/tutorial/how-to-join-liquidity-mining#8-risk-disclaimer) ---------------------------------------------------------------------------------------------------------------- Liquidity mining is not risk-free, and there is always a possibility of loss. Please be careful when liquidity mining and make sure you understand the risks. --- # How to add liquidity? - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) How to add liquidity? ===================== 1\. Navigate to the "[Pools](https://app.dodoex.io/pool) " page[#](https://docs.dodoex.io/en/product/tutorial/how-to-provide-liquidity#1--navigate-to-the--pools--page) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ![AddLP00](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FAddLP00.d02daba3.png&w=3840&q=75) 2\. Choose a Liquidity Pool[#](https://docs.dodoex.io/en/product/tutorial/how-to-provide-liquidity#2--choose-a-liquidity-pool) ------------------------------------------------------------------------------------------------------------------------------- There are two ways to find the pool you wish to add liquidity to: * Search by token: There could be multiple liquidity pools for the same trading pair. Pick the pool that fits your needs based on its TVL and APY. * Search by pool contract address: Once you have selected a pool, click on the “**Add**” button to the right to add tokens to that pool. 3\. Set the Slippage Tolerance[#](https://docs.dodoex.io/en/product/tutorial/how-to-provide-liquidity#3--set-the-slippage-tolerance) ------------------------------------------------------------------------------------------------------------------------------------- Before depositing your funds, you can set your slippage tolerance by clicking on the gear button at the bottom right of the “Add ” dialog. ![AddLP01](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FAddLP01.41b0a584.jpg&w=3840&q=75) When the difference between the market price and the quoted price from DODO’s liquidity sources for tokens for which you would like to provide liquidity exceeds your slippage tolerance, the trade will fail. The default slippage tolerance is 3%. You are free to customize this percentage or choose the Auto mode by clicking “AUTO”. The Auto mode automatically adjusts the slippage tolerance based on the liquidity of different trading pairs: * Slippage tolerance is set at 0.5% for mainstream trading pairs like BTC-USDT, WBTC-USDT, ETH-USDC, WETH-USDC, BNB-USDT, and WBCB-USDT. * Slippage tolerance is set at 0.1% for stablecoin trading pairs, including USDT, USDC, DAI, and BUSD. * Slippage tolerance is set at 3% for every other trading pair. 4\. Authorization and Adding Funds[#](https://docs.dodoex.io/en/product/tutorial/how-to-provide-liquidity#4--authorization-and-adding-funds) --------------------------------------------------------------------------------------------------------------------------------------------- Before confirming your fund deposit, make sure to double-check whether the pool supports single-sided or only double-sided provision. After clicking “Add”, confirm the transaction in your wallet to complete the deposit. Note: When depositing a token in a DODO liquidity pool for the first time, you need to give DODO permission to access that token in your wallet by clicking “Approve” in your wallet app. 5\. How to View Your Liquidity[#](https://docs.dodoex.io/en/product/tutorial/how-to-provide-liquidity#5--how-to-view-your-liquidity) ------------------------------------------------------------------------------------------------------------------------------------- After successfully adding liquidity on DODO, you can view your liquidity positions by going to “Pools” -> “My Liquidity”. 6\. Withdraw Your Liquidity[#](https://docs.dodoex.io/en/product/tutorial/how-to-provide-liquidity#6--withdraw-your-liquidity) ------------------------------------------------------------------------------------------------------------------------------- You are free to withdraw your liquidity whenever you want. * * * **Risk Disclaimer** Liquidity provision is not risk-free, and there is always a possibility of loss. Please be careful when adding liquidity and make sure you understand the risks. --- # DODO Contracts - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 📚 DODO Contracts ================= DODO V1, V2 and V3 are all built based on the PMM algorithm. DODO AMM V2 and AMM V3 are based on AMM algorithm and are forked from Uniswap AMM. DODO V1/V2[#](https://docs.dodoex.io/en/developer/contracts#dodo-v1-v2) ------------------------------------------------------------------------ * Capital-efficient liquidity pool: DODO V1/V2 enables capital-efficient liquidity pooling through the PMM algorithm, which supports liquidity provision for unilateral tokens, reduces impermanent losses, and minimizes slippage during trading. * Smart Aggregate Trading: DODO V1/V2 provides SmartTrade, which finds and intelligently routes to various liquidity sources to quote the optimal price between any two tokens. * Efficient and Flexible Market Making Strategies: DODO V1/V2 removes the various constraints of creating new asset liquidity pools, allowing for the free definition and real-time adjustment of asset ratios, liquidity depths, commission rates, etc. * Low-cost New Asset Issuance: DODO V1/V2 develops crowdfunding pooling, allowing anyone to issue new assets at low cost through crowdfunding pooling and create a better liquidity pool. Restrictions on the ratio of funds to tokens and on the starting price are lifted. DODO V3[#](https://docs.dodoex.io/en/developer/contracts#dodo-v3) ------------------------------------------------------------------ * Multi-Asset Pools: In DODO V3, a single pool can hold many different tokens that are interchangeable. This helps to save market makers money and achieve the same level of liquidity with less money. * Separation of buy and sell liquidity: In order to help strategy providers, DODO V3 separates buy and sell liquidity, enabling operators of hedging strategies to hedge, eliminate impermanent losses and realize stable profits. * Saving gas fee: DODO V3 has carefully designed smart contracts for rebalancing operations, reducing gas consumption by more than 90% compared to UniV3. This significantly reduces the cost of executing market making strategies and makes some strategies profitable that cannot be run on UniV3. DODO AMM V2[#](https://docs.dodoex.io/en/developer/contracts#dodo-amm-v2) -------------------------------------------------------------------------- * Optimization based on AMM V2: DODO AMM V2 improves upon the AMM V2 framework by introducing an adjustable `feeRate` parameter, breaking the original fixed 0.3% fee limit, and providing greater flexibility in fee strategies for liquidity providers and protocol developers. * Flexible multi-pool deployment: Multiple pools with different fee rates can be created for the same token pair, adapting to various trading needs and helping users balance between low slippage and maximum returns. * Balancing compatibility and upgradability: While retaining the stability and broad compatibility of the original AMM V2, DODO AMM V2 enhances market-making logic configuration capabilities, laying the foundation for introducing more advanced strategies and aggregation mechanisms in future versions. DODO AMM V3[#](https://docs.dodoex.io/en/developer/contracts#dodo-amm-v3) -------------------------------------------------------------------------- * Integrating concentrated liquidity mechanism: DODO AMM V3 optimizes and extends AMM V3 by introducing a concentrated liquidity design, allowing liquidity providers to supply funds within custom price ranges, significantly improving capital efficiency. * Flexible multi-tier fee settings: V3 adds support for multiple `feeRate` tiers, including ultra-low rates as low as 0.01%, enabling the deployment of multiple pools with different fee rates for the same token pair, providing more refined fee options for various trading strategies and user needs. * Composable efficient path optimization: Combined with DODO’s proprietary SmartTrade routing system, V3 supports intelligent pricing and path optimization across multiple pools, dynamically selecting the optimal path to reduce trading costs and slippage. * Emphasizing compatibility and scalability: DODO AMM V3 maintains compatibility with the AMM V3 architecture while strengthening the protocol’s capabilities in aggregated trading, parameter customization, and asset expansion, supporting richer DeFi application building and integration. --- # How to swap tokens? - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) How to swap tokens? =================== **Swap mode**[#](https://docs.dodoex.io/en/product/tutorial/how-to-trade#swap-mode) ------------------------------------------------------------------------------------ Swap mode is the default trading mode on DODO. It involves exchanging some of your own tokens for tokens that you want, based on the best price available at the moment you execute the trade. It also requires the payment of gas fees. To trade on DODO in Swap mode, follow these steps: ### **1\. Navigate to the Exchange Page**[#](https://docs.dodoex.io/en/product/tutorial/how-to-trade#-object-object) Navigate to the DODO app website ([https://app.dodoex.io/](https://app.dodoex.io/) ). You should end up on the Exchange page by default. If you're not there, click on the Exchange tab in the left menu bar to navigate to the page. Connect your browser wallet. DODO supports most of the popular browser wallets, including MetaMask, Trust, TokenPocket, imToken, SafePal, and Coinbase Wallet. Click on the “DODO X” tab to start trading. ![swap00](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswap00.adbceb95.jpg&w=3840&q=75) ### **2\. Choose a Trading Pair**[#](https://docs.dodoex.io/en/product/tutorial/how-to-trade#-object-object) You can find trading pairs by searching token symbols or addresses. ![swap01](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswap01.f0485ab2.jpg&w=3840&q=75) ### **3\. Configure Trade Settings**[#](https://docs.dodoex.io/en/product/tutorial/how-to-trade#-object-object) Trade settings can be found by clicking the gear button at the top right of the Swap dialog. ![swap02](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswap02.845fde9c.jpg&w=3840&q=75) ![swap03](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswap03.69e98814.jpg&w=3840&q=75) The trade settings available on DODO are as follows: **Max Slippage:** * When the difference between the market price and the quoted price from DODO’s liquidity sources exceeds your slippage tolerance, the trade will fail. * The higher the slippage tolerance, the more likely it is that a trade will be executed. However, a higher slippage tolerance also increases the likelihood of the trade being made with a suboptimal exchange rate. * Selecting "**Dynamic**" will utilize DODO's suggest values based on historical transaction data. * By selecting "**Custom**", you can customize the slippage. Please use it with caution to avoid any potential asset losses. **Transaction Deadline:** * When the interval between the time a transaction is submitted and the time it is confirmed on-chain exceeds the transaction deadline, the transaction will not be executed in order to protect traders from market volatility. * For example, a trader sets the transaction deadline to 20 minutes and the transaction ends up pending for more than 30 minutes after submission as its gas fee was set too low. In this case, the transaction's pending time exceeds its transaction deadline and the DODO contract does not execute the transaction. **Upload to cloud:** * Synchronize slippage settings to the cloud, share slippage settings with other browsers and devices. **Expert Mode:** * When swapping tokens, traders may receive alert notifications when the slippage for tokens they would like to trade is high. The price deviations resulting in this slippage may be caused by low liquidity or delayed updates of the tokens' market prices * When a token's slippage exceeds 20%, traders will not be able to submit transactions for this token unless Expert Mode is enabled. **Disable Indirect Routing:** * Checking this option ensures that the routing algorithm will only route to liquidity pools between the two tokens in the trading pair and will ignore any routes with intermediary tokens. * Advantages: Resistant to front-running, saves gas fees. * Disadvantages: Not being able to trade with intermediary tokens. For example, there is only one liquidity pool for the DNX/USDT pair on the DNX network. If you disable indirect routing, you will only be able to buy DNX with USDT and not with any other currency. **Private Swap** * Private Swap is a special feature that can effectively protect users from sandwich attacks. These attacks could come about due to the differences between the slippage settings and the current price in the liquidity pool. ### **4\. Approve and Confirm**[#](https://docs.dodoex.io/en/product/tutorial/how-to-trade#-object-object) When staking, depositing, or trading a token for the first time on DODO, you need to give DODO permission to access that token in your wallet by clicking “Approve” in your wallet app. ![swap04](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswap04.d1f33231.jpg&w=3840&q=75) You can set the amount of approval tokens in your wallet. If you choose "**MAX**", DODO will be approved to access your entire balance of the token. If you need to make a transaction that exceeds this amount, you will need to reapprove the token, which will incur additional gas fees. We recommend selecting "**Use site suggestion**" so that you only need to approve each token once on DODO. However, you can also customize the amount of approval. After approving, click on "Confirm Order" and then confirm in the wallet. Once the transaction is confirmed on the blockchain, the transaction will be successful. ![swap05](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswap05.96b4dd23.jpg&w=3840&q=75) You can view the order status, Rate, created date, transaction hash and other information in the "Order History" section located at the bottom of the trading page. Clicking on the top right corner of the "**Swap**" page allows you to open the chart and view the price trend. ![swap06](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswap06.7aad5f58.jpg&w=3840&q=75) * * * **Limit Mode**[#](https://docs.dodoex.io/en/product/tutorial/how-to-trade#limit-mode) -------------------------------------------------------------------------------------- A limit order on DODO is an order to swap tokens with a specific minimum price (known as the limit price) for the token the user wishes to receive. The trade will only be executed if the market price reaches the limit price, which is determined by the user. Submitting a limit order on DODO does not incur gas. Limit orders submitted on DODO will be filled by one of the following sources if they ever hit their limit price: * Liquidity pools on DODO * Aggregated liquidity pools from other protocols * Limit buy/sell orders sent by other users To trade on DODO in limit mode, follow these steps: ### **1\. Navigate to the Exchange Page**[#](https://docs.dodoex.io/en/product/tutorial/how-to-trade#-object-object) Navigate to the DODO app website ([https://app.dodoex.io/](https://app.dodoex.io/) ). You should end up on the Exchange page by default. If you're not there, click on the Exchange tab in the left menu bar to navigate to the page. Connect your browser wallet. DODO supports most of the popular browser wallets, including MetaMask, Trust, TokenPocket, imToken, SafePal, and Coinbase Wallet. Click on the “Limit” tab to start trading. ![swap07](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswap07.edfd399b.jpg&w=3840&q=75) ### 2\. Choose a Trading Pair[#](https://docs.dodoex.io/en/product/tutorial/how-to-trade#2--choose-a-trading-pair) Choose a trading pair in the same manner as for Swap mode. ### 3\. Configure Trade Settings[#](https://docs.dodoex.io/en/product/tutorial/how-to-trade#3--configure-trade-settings) You can set the amount, price, and expiration time of an order in sequence. The Limit Order Expiration Time is the maximum time that a limit order will remain active and susceptible to be executed if the limit price condition is met. After this time, the limit order expires and will no longer be executed. ### 4\. Approve and Submit Order[#](https://docs.dodoex.io/en/product/tutorial/how-to-trade#4--approve-and-submit-order) When staking, depositing, or trading a token for the first time on DODO, you need to give DODO permission to access that token in your wallet by clicking “Approve” in your wallet app. After approving, click on “Limit Order”, and follow the prompts in your wallet app to submit your limit order. Submitting a limit order does not incur gas fees. Please note that in order to cover the cost of execution, the trading volume for limit orders must not be lower than $2000. To cancel a limit order, go to “Open Orders”, click the “X” on the right side of the order, and follow the prompts in your wallet app. --- # How to create a mining campaign? - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) How to create a mining campaign? ================================ 1\. Navigate to the "Mining" page[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-a-mining-campaign#1---navigate-to-the--mining--page) --------------------------------------------------------------------------------------------------------------------------------------------------- ![createmining00](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcreatemining00.fbfcf7ec.png&w=3840&q=75) 2\. Select Mining Type[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-a-mining-campaign#2---select-mining-type) ----------------------------------------------------------------------------------------------------------------------------- ![createmining01](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcreatemining01.97410794.png&w=3840&q=75) Currently, DODO supports two different mining types, “Single-Token” and “Token Pairs”, both of which do not support tokens with deflationary features enabled (such as the “Auto Burn” and the “Trading Fees”. You cannot modify your mining campaign’s parameters once it's created. * Single-Token: mining campaigns that allow users to deposit liquidity for a single token, as opposed to token pairs in traditional AMM style. * Token Pairs: mining campaigns that require users to deposit liquidity for token pairs. 3\. Configure Pool Parameters[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-a-mining-campaign#3--configure-pool-parameters) ------------------------------------------------------------------------------------------------------------------------------------------ **Single-Token** * Select the token that you would like to be staked. The DODO platform supports mining campaigns for any ERC-20 tokens, including the ones created by DODO’s token creation feature. * Set your campaign duration: the campaign start and end times are based on the block height of the network your campaign is launched on. Depending on the block height, the actual time of when your campaign starts and ends may deviate slightly. * Select reward token: mining rewards for your campaign can be paid in single or multiple tokens * Input the number of daily rewards and total rewards for your campaign **Token-Pair** * Select pool: currently, DODO only supports mining campaigns for liquidity pools created on the DODO platform, and does not support mining campaigns for liquidity pools on other platforms. * Set your campaign duration: the campaign start and end times are based on the block height of the network your campaign is launched on. Depending on the block height, the actual time of when your campaign starts and ends may deviate slightly. * Select reward token: mining rewards for your campaign can be paid in single or multiple tokens * Input the number of daily rewards and total rewards for your campaign 4\. Inviting Your Friends to Your Mining Campaign[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-a-mining-campaign#4--inviting-your-friends-to-your-mining-campaign) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Click “Invite” to share the link of your mining campaign with your friends and community members. 5\. Risk Disclaimer[#](https://docs.dodoex.io/en/product/tutorial/how-to-create-a-mining-campaign#5--risk-disclaimer) ---------------------------------------------------------------------------------------------------------------------- Liquidity mining is not risk-free, and there is always a possibility of loss. Please be careful when proceeding and make sure you understand the risks. * * * **How to withdraw mining reward tokens if your campaign ended with zero participants?** If a mining campaign ended with zero participants, its creator is able to withdraw the mining reward token deposited into the pool by participating in the campaign and subsequently claiming the entirety of the rewards in the pool. --- # 交易小部件 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🔩 Swap Widget ============== 交易小部件 DODO提供一套量身定制的交易组件功能,精心设计以满足最常见的交易需求,帮助您构建更好的产品并提高您的盈利能力。 DODO交易小部件允许您为DODO协议构建自定义的前端界面,并在DeFi应用程序中嵌入小部件以实现快速资产交换和其他用途。 ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2F03.d235361f.gif&w=640&q=75) ### 功能特点[#](https://docs.dodoex.io/zh/developer/developers-portal/widget#gong-neng-te-dian) #### 最佳价格[#](https://docs.dodoex.io/zh/developer/developers-portal/widget#zui-jia-jia-ge) 借助DODO的卓越路由算法,用户无需离开您的dApp,即可轻松享受最佳交换价格。 #### 跨链支持[#](https://docs.dodoex.io/zh/developer/developers-portal/widget#kua-lian-zhi-chi) 只需单击一次即可在10多个区块链上轻松交换成千上万种加密资产。 #### 收入分享[#](https://docs.dodoex.io/zh/developer/developers-portal/widget#shou-ru-fen-xiang) DODO小部件使dApp能够设定自己的费用,通过DODO创建额外的收入来源。 #### 简单无缝集成[#](https://docs.dodoex.io/zh/developer/developers-portal/widget#jian-dan-wu-feng-ji-cheng) 只需几分钟即可轻松集成DODO小部件。根据需要自定义内容以符合具体需求。 #### 绩效分析[#](https://docs.dodoex.io/zh/developer/developers-portal/widget#ji-xiao-fen-xi) DODO提供动态仪表板,为您提供深入洞察业务绩效的分析工具。 ### DODO小部件带来的可能性[#](https://docs.dodoex.io/zh/developer/developers-portal/widget#dodoxiao-bu-jian-dai-lai-de-ke-neng-xing) #### 适用于所有项目[#](https://docs.dodoex.io/zh/developer/developers-portal/widget#shi-yong-yu-suo-you-xiang-mu) 在您的应用程序中直接交换代币,为交换提供新的收入来源。 #### NFT市场[#](https://docs.dodoex.io/zh/developer/developers-portal/widget#nftshi-chang) 使用户能够在您的应用程序内直接使用任何支持的链上的任何资产购买NFT,提升用户体验。 #### 发行平台[#](https://docs.dodoex.io/zh/developer/developers-portal/widget#fa-xing-ping-tai) 从多个来源聚合流动性,同时为用户提供自定义的用户界面、代币列表和费率。 ### 支持的链[#](https://docs.dodoex.io/zh/developer/developers-portal/widget#zhi-chi-de-lian) DODO目前总共支持11个链,包括Ethereum、BSC、Polygon、Arbitrum、Avalanche、MoonRiver、OKChain、BOBA、Optimism、Aurora和Conflux eSpace。我们计划在将来支持更多的链。 ### 费用[#](https://docs.dodoex.io/zh/developer/developers-portal/widget#fei-yong) 1. 用户通过DODO交易所产生的交易费将用于DEX协议的流动性提供者。并且会收取0.15%的路由费用。 2. 用户可以设置额外的路由费用,默认为0。如果设置了路由费用,DODO不会从中获取任何利润,所有利润都归用户所有。 有关如何使用Swap小部件的详细信息,请查看本节的"[Instructions](https://docs.dodoex.io/zh/developer/developers-portal/widget/getting-started) "页面 - 学习起来只需要大约2分钟。 --- # Dashboard - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🔢 Dashboard ============ ### Explanation of relevant Subgraph data statistics table [#](https://docs.dodoex.io/en/developer/data#explanation-of-relevant-subgraph-data-statistics-table) All the data of core metrics come from Subgraph, and the data of Subgraph comes from the events thrown when the contract is called. When it comes to the date dimension in Subgraph, we use the international standard time for a day's statistics, so when the horizontal axis on the Dashboard is the date, it represents the date in international standard time. In Subgraph, we have several base pools to calculate the USD related price, the first one is the stablecoin trading pool, we use the trading pool with the highest volume as the base pool, and calculate the USD price of the stablecoin based on the weight of the trading volume. In addition, the trading pool of the base token to the stablecoin of the chain will also be considered as the base pool to provide the USD price, and the fiat currency data in Subgraph is only for reference. We will get the fiat price from the third-party statistical platform for data verification when we do the statistics of the display. ### Core Metrics [#](https://docs.dodoex.io/en/developer/data#core-metrics) **Trading volume:** We use PairDayData to track the data of each trading pair for the day, and TokenDayData to track the trading data of each Token for the day, with daily trading volume data being the trading volume of each Token for the day multiplied by the fiat price of that Token. **Market Capitalization:** Get all pools from Subgraph and read the BaseReserve and QuoteReserve (i.e. the balance of BaseToken and QuoteToken on the contract) from each pool, multiply it by the Token's current fiat price, and the sum of the dollar value of both Tokens is recorded as the market capitalization. Tokens not accepted by Coingecko, Coinmarket, or Debank are not included in the market capitalization display. **Number of user addresses:** the number of addresses that have interacted with DODO's smart contracts **Number of transactions:** the number of transactions that occurred on DODO **smart contracts Pools:** Number of pools created in DODO **Number of pairs:** the number of pairs traded on DODO ### Transaction Pair Data [#](https://docs.dodoex.io/en/developer/data#transaction-pair-data) All Token Pairs that have traded in DODO, the pair data provides information about the pairs that have traded in DODO, as DODO smart routing will help users to find the best price, the volume of external pools is the transactions initiated by users that have not entered the DODO liquidity pool. The turnover rate is the calculated data. **Change ratio:** 24 hours of trading volume divided by current market making funds ### Price Chart [#](https://docs.dodoex.io/en/developer/data#price-chart) DODO provides optional charts where users can view the price change of a token pair . **All:** Get all the data of the token pair from a third party platform ([Coingecko](https://www.coingecko.com/) ) **Only DODO:** Transactions that dealed only through DODO liquidity **Unknown sources:** Altcoins with high price volatility, for reference only --- # DODO V1/V2 - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🐥 DODO V1/V2 ============= DODO V1 utilized the innovative PMM algorithm, aiming to provide users with higher liquidity utilization rates. * GitHub link: [https://github.com/DODOEX/dodo-smart-contract](https://github.com/DODOEX/dodo-smart-contract) DODO V2 builds upon the PMM algorithm and consists of multiple contracts to implement a range of core functionalities, including public pools, private pools, anchor pools, crowdfunding pools, liquidity management, smart trade routing, and platform governance. * GitHub link: [https://github.com/DODOEX/contractV2](https://github.com/DODOEX/contractV2) --- # DODO V1/V2 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🐥 DODO V1/V2 ============= DODO V1采用创新的PMM算法,旨在为用户提供更高的流动性利用率。 * GitHub链接:[https://github.com/DODOEX/dodo-smart-contract](https://github.com/DODOEX/dodo-smart-contract) DODO V2在PMM算法的基础上构建,并由多个合约组成,实现了一系列核心功能,包括公共池、私有池、锚定池、众筹池、流动性管理、智能交易路由和平台治理。 * GitHub链接:[https://github.com/DODOEX/contractV2](https://github.com/DODOEX/contractV2) --- # Smart Trade - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🚌 SmartTrade ============= DODO's Intelligent Routing Algorithm ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fsmart-trade-cover.d6e838cf.webp&w=3840&q=75) SmartTrade is DODO's decentralized liquidity aggregation service that routes to and compares various liquidity sources to quote the optimal swap rate between any two tokens. This service enables trading between two arbitrary tokens on the same network. Users who execute trades on DODO also have the option to participate in trade mining, which rewards traders with DODO tokens. If you discover that SmartTrade is not quoting the best price across the network, please send a report to [api@dodoex.io](mailto:api@dodoex.io) and you'll receive an NFT reward! Aggregation Algorithm[#](https://docs.dodoex.io/en/developer/developers-portal/api/smart-trade#aggregation-algorithm) ---------------------------------------------------------------------------------------------------------------------- The DODO protocol acts as both a liquidity provider and a liquidity distributor. Liquidity distribution is achieved by providing an aggregator functionality on the trading side that enables trade between two arbitrary tokens on the same network. Intelligently finding the best order routing from a liquidity source provides traders with the best price and lowest slippage when swapping tokens. DODO's in-house routing algorithm calculates the optimal trade path for users by aggregating liquidity from each exchange on the chain. It supports splitting between different protocols, as well as splitting between different market depths within the same protocol. After obtaining a path, the smart contract on the chain will execute the trading action for the user. The security verification in the smart contract ensures the safety of the user's funds and the validity of the offer. There are two strategies used DODO routing, one of which is called linear routing and the other is called split-order routing. ### Linear Routing [#](https://docs.dodoex.io/en/developer/developers-portal/api/smart-trade#linear-routing) **Linear routing** means that in the process of finding a transaction path, all of the coins being traded pass through the same pool, based on which the path with the best price for the target token is found (similar to the routing algorithm of Uniswap V2). This algorithm has low complexity, fast computation, less interaction with the contract, and uses less gas. For example, if a user needs to trade ETH-USDC, the optimal path found by linear routing may be ETH-USDT-USDC, and the final path passes through only two pools, one at a time. These two pools may come from different protocols, for example, ETH-USDT is a Uniswap V3 pool and USDT-USDC is a DODO pool. The linear routing algorithm collects information from all pools involving input tokens, target tokens and generic intermediate tokens in any combination from each protocol, and then recursively finds the optimal path. ### Split-order Routing [#](https://docs.dodoex.io/en/developer/developers-portal/api/smart-trade#split-order-routing) **Split-order routing** refers to the process of finding a transaction path in which the user's funds are allocated to different trading pools simultaneously. These tokens are split between these pools at a specific proportion calculated to yield the best price for those tokens. This algorithm has high complexity, less computational speed, and more path-contract interaction than linear routing. This makes it use much more gas, but the price is better than with linear routing. Again, using ETH-USDC as an example, the coins that the transaction path passes through may be ETH-USDT-USDC. The ETH and USDT trade may pass through two pools: 30% of the user's ETH is converted to USDT via Uniswap v3, and 70% of the user's ETH is converted to USDT via DODO V2. For the next trade in the transaction path, USDT-USDC, the initial USDT is the sum of the above two sources of USDT, which is then optimally split between several USDT-USDC trading pools to yield the final amount of USDC. In order to control the gas and increase the success rate of the transaction, no more than three pools are passed through for each pair. Support Chains and List of Liquidity Sources[#](https://docs.dodoex.io/en/developer/developers-portal/api/smart-trade#support-chains-and-list-of-liquidity-sources) -------------------------------------------------------------------------------------------------------------------------------------------------------------------- DODO has supported 11 chains, the liquidity sources that DODO has aggregated in various networks can be found [here](https://docs.dodoex.io/en/product/dodox/bridge---liquidity-sources) . ### Conclusion[#](https://docs.dodoex.io/en/developer/developers-portal/api/smart-trade#conclusion) **DODO's in-house SmartTrade routing algorithm still has more room for optimization, and we will continue to optimize trading paths and token splitting in order to get better quotes.** DODO continues to work hard to provide better prices to our users. --- # Quick Start - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) Quick Start =========== Developer Quick Start In this guide, we will introduce how to register and use the developer portal, and introduce the Widget and APIs modules. 0.Step: Register Account[#](https://docs.dodoex.io/en/developer/developers-portal/introduction/quick-start#0-step--register-account) ------------------------------------------------------------------------------------------------------------------------------------- You need to connect your wallet first and then fill in your email address to register a developer account. We will send an email to your email address. ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fportal-register01.12b19007.png&w=3840&q=75) * * * ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fportal-register02.67fc3568.png&w=3840&q=75) 1.Step: Create Project & Get Secret Key[#](https://docs.dodoex.io/en/developer/developers-portal/introduction/quick-start#1-step--create-project---get-secret-key) ------------------------------------------------------------------------------------------------------------------------------------------------------------------- Click the button to create your Project. ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fportal-register03.d6265c75.png&w=3840&q=75) * * * ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fportal-register04.ad1832b9.png&w=3840&q=75) * * * You can view and reset key information for the current project on this module. ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fportal-register05.55e0c952.png&w=3840&q=75) * * * Now you can start using [Widgets](https://docs.dodoex.io/en/developer/developers-portal/widget) or [APIs](https://docs.dodoex.io/en/developer/developers-portal/api) ### Get Additional Permissions[#](https://docs.dodoex.io/en/developer/developers-portal/introduction/quick-start#get-additional-permissions) If the default Widgets/APIs do not meet your needs, you can request the additional permissions. Go through the **Specific Access** module on the page. Within the pop-up window, you can describe your specific needs and submit the necessary information according to the tips. ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fportal-register06.7b3384fa.png&w=3840&q=75) --- # 合约地址 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 📒 合约地址 ======= ![](https://3288708318-files.gitbook/assets/13.png) 此类别中的页面提供了DODO在每个部署的区块链上的所有官方合约地址的列表。在使用DODO时,请确保只与真正的DODO合约进行交互,以避免危及您的安全。 * [DODO V1/V2 合约地址](https://docs.dodoex.io/zh/developer/contracts/dodo-v1-v2/contracts-address) * [DODO V3 合约地址](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/v3-contracts-address) 我们还有一个API可以获取所有合约列表 * [https://api.dodoex.io/dodo-contract/list](https://api.dodoex.io/dodo-contract/list) --- # FAQ - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) FAQ === How to find all the DODO pools?[#](https://docs.dodoex.io/en/developer/data/faq#how-to-find-all-the-dodo-pools) ---------------------------------------------------------------------------------------------------------------- * [Tutorial](https://docs.dodoex.io/en/developer/data/how-to-find-all-the-dodo-pools) How to integrate DODO contract trading data?[#](https://docs.dodoex.io/en/developer/data/faq#how-to-integrate-dodo-contract-trading-data) ------------------------------------------------------------------------------------------------------------------------------------------ * [trading-pair-data-api](https://docs.dodoex.io/en/developer/developers-portal/api/web3-data/trading-pair-data) * [subgraph](https://docs.dodoex.io/en/developer/data/subgraph) * [index-contract-event](https://docs.dodoex.io/en/developer/data/contract-event) How to listen to DODO contract events?[#](https://docs.dodoex.io/en/developer/data/faq#how-to-listen-to-dodo-contract-events) ------------------------------------------------------------------------------------------------------------------------------ * [Tutorial](https://docs.dodoex.io/en/developer/data/contract-event) How to use DODO Subgraph?[#](https://docs.dodoex.io/en/developer/data/faq#how-to-use-dodo-subgraph) ---------------------------------------------------------------------------------------------------- * [Subgraph Query](https://docs.dodoex.io/en/developer/developers-portal/api/web3-data/subgraph-data) DODO Dashboard statistical period.[#](https://docs.dodoex.io/en/developer/data/faq#dodo-dashboard-statistical-period) ---------------------------------------------------------------------------------------------------------------------- * Historical data: Updated at 8am Singapore time zone. * Last 24 hours: Updated hourly, with the statistical interval from the current time (UTC+0) to the current time (UTC+0) minus one day. How to directly integrate DODO Dashboard data?[#](https://docs.dodoex.io/en/developer/data/faq#how-to-directly-integrate-dodo-dashboard-data) ---------------------------------------------------------------------------------------------------------------------------------------------- * [Case Reference](https://github.com/DefiLlama/dimension-adapters/blob/master/dexs/dodo/index.ts) curl -i -X POST \ -H "Content-Type:application/json" \ -d \ '{ "operationName": "FetchDashboardDailyData", "variables": { "where": { "day": 365 } }, "query": "query FetchDashboardDailyData($where: Dashboardchain_daily_data_filter) {\n dashboard_chain_day_data(where: $where) {\n volume_near24h {\n bsc\n ethereum\n polygon\n arbitrum\n avalanche\n optimism\n base\n linea\n __typename\n }\n txCount_near24h {\n bsc\n ethereum\n polygon\n arbitrum\n avalanche\n optimism\n base\n linea\n __typename\n }\n traders_near24h {\n bsc\n ethereum\n polygon\n arbitrum\n avalanche\n optimism\n base\n linea\n __typename\n }\n tvl {\n bsc\n ethereum\n polygon\n arbitrum\n avalanche\n optimism\n base\n linea\n __typename\n }\n pools {\n bsc\n ethereum\n polygon\n arbitrum\n avalanche\n optimism\n base\n linea\n __typename\n }\n pairs {\n bsc\n ethereum\n polygon\n arbitrum\n avalanche\n optimism\n base\n linea\n __typename\n }\n list {\n timestamp\n date_str\n txCount {\n bsc\n ethereum\n polygon\n arbitrum\n avalanche\n optimism\n base\n linea\n __typename\n }\n traders {\n bsc\n ethereum\n polygon\n arbitrum\n avalanche\n optimism\n base\n linea\n __typename\n }\n volume {\n bsc\n ethereum\n polygon\n arbitrum\n avalanche\n optimism\n base\n linea\n __typename\n }\n tvl {\n bsc\n ethereum\n polygon\n arbitrum\n avalanche\n optimism\n base\n linea\n __typename\n }\n __typename\n }\n __typename\n }\n}" }' \ 'https://api.dodoex.io/graphql?opname=FetchDashboardDailyData&apikey=dododocstestapikey' How to find DODO contract data from a third-party data platform?[#](https://docs.dodoex.io/en/developer/data/faq#how-to-find-dodo-contract-data-from-a-third-party-data-platform) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * [coingecko](https://www.coingecko.com/en/exchanges/dodo-ethereum) * [defillama](https://defillama.com/protocol/dodo?volume=true) * [coinmarketcap](https://coinmarketcap.com/exchanges/dodo/) * [tokenterminal](https://tokenterminal.com/terminal/projects/dodo) * [dex.guru](https://dex.guru/markets/dodo/trading) * [dune](https://dune.com/browse/dashboards?q=dodo) --- # Profit-Sharing Instructions - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) Profit-Sharing Instructions =========================== Widget Profit-Sharing Instructions ### Background[#](https://docs.dodoex.io/en/developer/developers-portal/widget/profit-sharing-instructions#background) To reward the providers of transaction volume, the API users can adjust the address for transaction fee collection and fee percentage. The provider will be rewarded with the corresponding fee after the user makes a transaction using the widgets launched by the provider. ### Using the profit-sharing model[#](https://docs.dodoex.io/en/developer/developers-portal/widget/profit-sharing-instructions#using-the-profit-sharing-model) **Description** `feeRate`: API user's fee rate; the `feeRate` set by the API user is calculated separately from the fee charged by DODO, the fee’s unit is in 1e18, i.e. if the `feeRate` is set to 1500000000000000, the actual fee rate is 1500000000000000 / 10^18 = 0.0015 = 0.15%. `rebateTo:`the wallet address that will receive the transaction fee incentives ⚠️Note: If you want to use the profit-sharing mode, these two sets of codes are mandatory for widgets. If the codes are not processed, feeRate defaults to 0, and the default API user will not collect any transaction fee. #### Usage of React function[#](https://docs.dodoex.io/en/developer/developers-portal/widget/profit-sharing-instructions#usage-of-react-function) import { SwapWidget } from '@dodoex/widgets'; function App() { return ( ) } #### Usage of Non-React function[#](https://docs.dodoex.io/en/developer/developers-portal/widget/profit-sharing-instructions#usage-of-non-react-function) /** * main.js * InitializeSwapWidget */ 'use strict'; import { InitSwapWidget } from '@dodoex/widgets'; function initDodoWidget() { InitSwapWidget({ feeRate: 1500000000000000, rebateTo: '0x2Ba1633338dDD2Ab37fbc95ea615BA98f0445380', // ...otherPrpos }); } initDodoWidget(); #### Transaction Fee Calculation- Contract Code Block[#](https://docs.dodoex.io/en/developer/developers-portal/widget/profit-sharing-instructions#transaction-fee-calculation--contract-code-block) function _routeWithdraw( address toToken, uint256 receiveAmount, bytes memory feeData, uint256 minReturnAmount ) internal { (address broker, uint256 brokerFeeRate) = abi.decode(feeData, (address, uint256)); uint256 routeFee = DecimalMath.mulFloor(receiveAmount, routeFeeRate); IERC20(toToken).universalTransfer(payable(routeFeeReceiver), routeFee); uint256 brokerFee = DecimalMath.mulFloor(receiveAmount, brokerFeeRate); IERC20(toToken).universalTransfer(payable(broker), brokerFee); receiveAmount = receiveAmount - routeFee - brokerFee; require(receiveAmount >= minReturnAmount, "DODORouteProxy: Return amount is not enough"); if (toToken == _ETH_ADDRESS_) { IWETH(_WETH_).withdraw(receiveAmount); payable(msg.sender).transfer(receiveAmount); } else { IERC20(toToken).universalTransfer(payable(msg.sender), receiveAmount); } } As demonstrated, to get accurate routing quotes, the toAmount displayed to users has already deducted the transaction fee. ### The profit-sharing fee display[#](https://docs.dodoex.io/en/developer/developers-portal/widget/profit-sharing-instructions#the-profit-sharing-fee-display) #### Request for quotation module[#](https://docs.dodoex.io/en/developer/developers-portal/widget/profit-sharing-instructions#request-for-quotation-module) According to the above contract, the toAmount (i.e. DODO in the sample image) in the quotation stage is the number of Token after the feeRate of the API user is deducted. ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fprofit-sharing-instructions01.4f768f98.jpg&w=1080&q=75) #### Transaction Details Sample[#](https://docs.dodoex.io/en/developer/developers-portal/widget/profit-sharing-instructions#transaction-details-sample) Basic Fee: Fee from the service provider (DODO); Additional Fee: Additional fee from the widget user (feeRate); ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fprofit-sharing-instructions02.29d3a3e7.jpg&w=828&q=75) --- # 快速开始 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 快速入门 ==== 开发者快速开始 在本指南中,我们将介绍如何注册和使用开发者门户,并介绍小部件和API模块。 0.步骤:注册账号[#](https://docs.dodoex.io/zh/developer/developers-portal/introduction/quick-start#0-bu-zhou--zhu-ce-zhang-hao) ------------------------------------------------------------------------------------------------------------------------- 您需要先连接您的钱包,然后填写您的电子邮件地址以注册开发者账号。我们将向您的电子邮件地址发送一封电子邮件。 ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fportal-register01.12b19007.png&w=3840&q=75) * * * ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fportal-register02.67fc3568.png&w=3840&q=75) 1.步骤:创建项目和获取秘密密钥[#](https://docs.dodoex.io/zh/developer/developers-portal/introduction/quick-start#1-bu-zhou--chuang-jian-xiang-mu-he-huo-qu-mi-mi-mi-yao) ----------------------------------------------------------------------------------------------------------------------------------------------------------- 单击按钮创建您的项目。 ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fportal-register03.d6265c75.png&w=3840&q=75) * * * ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fportal-register04.ad1832b9.png&w=3840&q=75) * * * 您可以在此模块上查看和重置当前项目的密钥信息。 ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fportal-register05.55e0c952.png&w=3840&q=75) * * * 现在您可以开始使用[小部件](https://docs.dodoex.io/zh/developer/developers-portal/widget) 或者[APIs](https://docs.dodoex.io/zh/developer/developers-portal/api) 。 ### 获取其他权限[#](https://docs.dodoex.io/zh/developer/developers-portal/introduction/quick-start#huo-qu-qi-ta-quan-xian) 如果默认的小部件/APIs不能满足您的需求,您可以请求额外的权限。 在页面上使用**特定访问**模块。 在弹出窗口中,您可以描述您的具体需求,并根据提示提交必要的信息。 ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fportal-register06.7b3384fa.png&w=3840&q=75) --- # Listening to Contract Events - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) Listening to Contract Events ============================ The DODO platform contracts trigger certain events as they operate. Among the more common events are pool creation, token swapping, and more. Pool Creation Event [#](https://docs.dodoex.io/en/developer/data/contract-event#pool-creation-event) ----------------------------------------------------------------------------------------------------- The types of liquidity pools currently supported by the DODO platform include DODO V1 Standard Pools, DODO V2 Single-Token Pools, DODO V2 Market Maker Pools and DODO V2 Pegged Pools. All four types of pools are created by the corresponding factory contract execution and trigger creation events, as follows: ### **DODO V1 Standard Pool**[#](https://docs.dodoex.io/en/developer/data/contract-event#-object-object) The corresponding factory contract name is DODO Zoo, and the events that third party platforms need to listen to are: event DODOBirth(address newBorn, address baseToken, address quoteToken); where `newBorn` is the DODO V1 Standard Pool contract address. ### **DODO V2 Single-Token Pool**[#](https://docs.dodoex.io/en/developer/data/contract-event#-object-object) The corresponding factory contract name is DODO Vending Machine Factory, and the events that third party platforms need to listen to are: event NewDVM( address baseToken, address quoteToken, address creator, address dvm ); where `dvm` is the DODO V2 Single-Token Pool contract address and `creator` is the pool creation account. ### **DODO V2 Market Maker Pool**[#](https://docs.dodoex.io/en/developer/data/contract-event#-object-object) The corresponding factory contract name is DODO Private Pool Factory, and the events that third party platforms need to listen to are: event NewDPP( address baseToken, address quoteToken, address creator, address dpp ); where `dpp` is the DODO V2 Market Maker Pool contract address and `creator` is the pool creation account. ### **DODO V2 Pegged Pool**[#](https://docs.dodoex.io/en/developer/data/contract-event#-object-object) The corresponding factory contract name is DODO Stable Pool Factory, and the events that third party platforms need to listen to are: event NewDSP( address baseToken, address quoteToken, address creator, address DSP ); where `dsp` is the DODO V2 Pegged Pool contract address, and `creator` is the pool creation account. _Note: The above mentioned DODO Zoo, DODO Vending Machine Factory, DODO Private Pool Factory, DODO Stable Pool Factory contracts can be obtained by querying the corresponding network under the contract address. All these contracts are open source and can be obtained directly in the blockchain browser._ Pool Transaction Event[#](https://docs.dodoex.io/en/developer/data/contract-event#pool-transaction-event) ---------------------------------------------------------------------------------------------------------- The different types of pools can be aggregated by DODO's own routing and external aggregators, and can also be called directly for transactions. Each transaction triggers an Event, which can be used by third-party platforms to count the volume of the pools. The events to listen for are different for DODO V1 Standard Pools and DODO V2 Pools (including Single-Token, Market Maker, and Pegged Pools). ### **DODO V1 Standard Pools**[#](https://docs.dodoex.io/en/developer/data/contract-event#-object-object) The third party platform needs to obtain the corresponding pool address and listen for the following events: event SellBaseToken( address indexed seller, uint256 payBase, uint256 receiveQuote ); event BuyBaseToken( address indexed buyer, uint256 receiveBase, uint256 payQuote ); There are two types of events, executed depending on which token in the pool is being bought. `SellBaseToken` represents the sale of a `BaseToken` to the pool and the purchase of a `QuoteToken`. `payBase` represents the number of `BaseTokens` paid and `receiveQuote` is the number of `QuoteToken`s received. `BuyBaseToken` represents the sale of `QuoteToken`s to the pool and the purchase of `BaseToken`s. `payQuote` represents the number of `QuoteToken`s paid and `receiveBase` is the number of `BaseToken`s exchanged. ### **DODO V2 Pools**[#](https://docs.dodoex.io/en/developer/data/contract-event#-object-object) The third party platform needs to obtain the address of the corresponding pool and listen for the following events: event DODOSwap( address fromToken, address toToken, uint256 fromAmount, uint256 toAmount, address trader, address receiver ); The pool transaction Event for DODO V2 is unified as `DODOSwap`. `fromToken` is the address of the token sold, `toToken` is the address of the token bought, `fromAmount` represents the number of tokens sold, `toAmount` is the number of tokens bought, `trader` is the transaction executor, and `receiver` is the target token receiving account. --- # Contract Addresses - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 📒 Contract Addresses ===================== ![](https://3288708318-files.gitbook/assets/13.png) The pages in this category give lists of the addresses of all official DODO contracts on each blockchain that DODO is deployed to. When using DODO, make sure that you are interacting only authentic DODO contracts, to avoid having your security compromised. * [DODO V1/V2 Contract Address](https://docs.dodoex.io/en/developer/contracts/dodo-v1-v2/contracts-address) * [DODO V3 Contract Address](https://docs.dodoex.io/en/developer/contracts/dodo-v3/v3-contracts-address) We also have a api to get all contract list * [https://api.dodoex.io/dodo-contract/list](https://api.dodoex.io/dodo-contract/list) --- # Widget Config - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) Widget Config ============= Widget Config | Name | Type | Default | Text | | --- | --- | --- | --- | | provider | `Eip1193Provider` Or`JsonRpcProvider` | `undefined` | EIP-1193 provider | | apikey | string | `undefined` | Required Params: please apply for an `apikey` from DODO before you import the Widgets in your project. | | jsonRpcUrlMap | { \[chainId: number\]: string\[\] } | [Configuration](https://github.com/DODOEX/widgets/blob/main/packages/dodoex-widgets/src/constants/chains.ts) | Specify nodes of different chains | | defaultChainId | number | `1` | Default Chain ID | | tokenList | { chainId: number;address: string;name: string;decimals: number;symbol: string;logoURI: string;}\[\] | `'default'` - [Configuration](https://github.com/DODOEX/widgets/blob/main/packages/dodoex-widgets/src/constants/chains.ts) | User tokenList: Oject Array Type

`'all'`: All supported token source.

`'default'`: [Configuration](https://github.com/DODOEX/widgets/blob/main/packages/dodoex-widgets/src/constants/chains.ts)


`'coingecko'`: tokens list from coingeko. | | popularTokenList | { chainId: number;address: string;name: string;decimals: number;symbol: string;logoURI: string;}\[\] | `undefined` | Selectable List of Popular Tokens | | defaultFromToken | { chainId: number;address: string;name: string;decimals: number;symbol: string;logoURI: string;amount: number;} | `undefined` | Default Origin Token

Tips: the `amount` used for setting the default token amount, an optional param. | | defaultToToken | { chainId: number;address: string;name: string;decimals: number;symbol: string;logoURI: string;amount: number;} | `undefined` | Default Destination Token

Tips: the `amount` used for setting the default token amount, an optional param. | | feeRate | number | 0 | Transaction fee rate. Unit: 1e18 | | rebateTo | string | `undefined` | Profit sharing address | | theme | Theme | `undefined` | Can override theme, text, and style. Refer to the Instructions page for more information. | | colorMode | `'light'` Or `'dark'` | `'light'` | Light or dark mode | | accessToken | string | `undefined` | Passed onto the `accessToken`of the price inquiry interface | | width | `string` Or `number` | `375` | Widget width | | height | `string` Or `number` | `494` | Widget height | | onTxFail | (error: Error, data: any) => void | `undefined` | Triggered if transaction fails | | onTxSubmit | (tx: string, data: any) => void | `undefined` | Triggered after transaction is submitted | | onTxSuccess | (tx: string, data: any) => void | `undefined` | Triggered if transaction executes successfully | --- # Widget配置 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) Widget 配置 ========= Widget配置 | 名称 | 类型 | 默认值 | 说明 | | --- | --- | --- | --- | | provider | `Eip1193Provider` 或 `JsonRpcProvider` | `undefined` | EIP-1193提供者 | | apikey | 字符串 | `undefined` | 必需参数:在导入小部件到您的项目之前,请从DODO申请一个`apikey` | | jsonRpcUrlMap | { \[chainId: number\]: string\[\] } | [配置](https://github.com/DODOEX/widgets/blob/main/packages/dodoex-widgets/src/constants/chains.ts) | 指定不同链的节点 | | defaultChainId | 数字 | `1` | 默认链ID | | tokenList | { chainId: number;address: string;name: string;decimals: number;symbol: string;logoURI: string;}\[\] | `'default'` - [配置](https://github.com/DODOEX/widgets/blob/main/packages/dodoex-widgets/src/constants/chains.ts) | 用户的 token 列表:对象数组类型

`'all'`: 所有支持的 token 来源。

`'default'`: [配置](https://github.com/DODOEX/widgets/blob/main/packages/dodoex-widgets/src/constants/chains.ts)


`'coingecko'`: 来自 coingeko 的 token 列表。 | | popularTokenList | { chainId: number;address: string;name: string;decimals: number;symbol: string;logoURI: string;}\[\] | `undefined` | 可选择的热门代币列表 | | defaultFromToken | { chainId: number;address: string;name: string;decimals: number;symbol: string;logoURI: string;amount: number;} | `undefined` | 默认的源代币

提示:`amount` 用于设置默认代币数量,可选参数。 | | defaultToToken | { chainId: number;address: string;name: string;decimals: number;symbol: string;logoURI: string;amount: number;} | `undefined` | 默认的目标代币

提示:`amount` 用于设置默认代币数量,可选参数。 | | feeRate | 数字 | 0 | 交易费率。单位:1e18 | | rebateTo | 字符串 | `undefined` | 分润地址 | | theme | 主题 | `undefined` | 可以覆盖主题、文本和样式。更多信息请参考说明页。 | | colorMode | `'light'` 或 `'dark'` | `'light'` | 明亮或暗黑模式 | | accessToken | 字符串 | `undefined` | 传递给价格查询接口的 `accessToken` | | width | `字符串` 或 `数字` | `375` | 小部件宽度 | | height | `字符串` 或 `数字` | `494` | 小部件高度 | | onTxFail | (error: Error, data: any) => void | `undefined` | 如果交易失败,则触发此函数 | | onTxSubmit | (tx: string, data: any) => void | `undefined` | 在交易提交后触发此函数 | | onTxSuccess | (tx: string, data: any) => void | `undefined` | 如果交易成功执行,则触发此函数 | --- # 🦄 DODO AMM V2/V3 - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 🦄 DODO AMM V2/V3 ================= DODO AMM V2 introduces a configurable feeRate parameter on top of the original version, supporting the creation of multiple liquidity pools with different fee rates for the same trading pair. Compared to the original fixed 0.3% fee setting, DODO AMM V2 offers higher flexibility, enabling liquidity providers and protocol developers to set more appropriate fee structures based on different trading needs and strategies. * v2-core: [https://github.com/DODOEX/Uniswap-v2-core/tree/feat/protocol-fee](https://github.com/DODOEX/Uniswap-v2-core/tree/feat/protocol-fee) * v2-periphery: [https://github.com/DODOEX/Uniswap-v2-periphery/tree/feat/protocol-fee](https://github.com/DODOEX/Uniswap-v2-periphery/tree/feat/protocol-fee) DODO AMM V3 adds a 0.01% fee tier on top of the original version, providing more competitive quotes for trading pairs. This optimization further reduces trading costs and enhances user experience, particularly suitable for high-frequency or large-volume trading scenarios sensitive to slippage and fees. * v3-core: [https://github.com/DODOEX/Uniswap-v3-core/tree/feat/protocol-fee](https://github.com/DODOEX/Uniswap-v3-core/tree/feat/protocol-fee) * v3-periphery: [https://github.com/DODOEX/Uniswap-v3-periphery/tree/feat/protocol-fee](https://github.com/DODOEX/Uniswap-v3-periphery/tree/feat/protocol-fee) --- # Widget Config Center - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) Widget Config Center ==================== Widget Config Center Help users control their Widget through APIs. --- # 开始入门 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 入门指南 ==== Widget入门指南 在本文中,我们将介绍 DODO Swap Widget 的几个使用场景。 ### 使用 Swap Widget[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/getting-started#shi-yong--swap-widget) 要使用该小部件,首先需要使用户能够访问 'widgets' 库,可以通过 'yarn' 在本地安装它,也可以在 TypeScript 代码文件中导入它。 #### 安装[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/getting-started#an-zhuang) yarn add @dodoex/widgets #### 导入 ([React 项目](https://github.com/DODOEX/widgets/tree/main/example/react-app) )[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/getting-started#dao-ru-----object-object--) import { SwapWidget } from "@dodoex/widgets"; function App() { return ; } #### 导入 ([Angular 项目](https://github.com/DODOEX/widgets/tree/main/example/angular-app) ) [#](https://docs.dodoex.io/zh/developer/developers-portal/widget/getting-started#dao-ru-----object-object---) /** * Angular 组件 ts 文件 * 初始化 SwapWidget */ import { Component, OnInit } from "@angular/core"; import { InitSwapWidget } from "@dodoex/widgets"; @Component({ selector: "app-widgets", templateUrl: "./widgets.component.html", styleUrls: ["./widgets.component.scss"], }) export class WidgetsComponent { ngOnInit() { InitSwapWidget({ colorMode: "dark", // apikey: '55ea0a80b62316d9bc', // 用于默认测试 }); } }
#### 导入 ([JS 项目](https://github.com/DODOEX/widgets/tree/main/example/js-app) )[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/getting-started#dao-ru-----object-object--) /** * main.js * 初始化 SwapWidget */ "use strict"; import { InitSwapWidget } from "@dodoex/widgets"; function initDodoWidget() { InitSwapWidget({ colorMode: "dark", // 其他 APIs }); } initDodoWidget();
### 连接钱包[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/getting-started#lian-jie-qian-bao) 当前支持的链的[配置](https://github.com/DODOEX/widgets/blob/main/packages/dodoex-widgets/src/constants/chains.ts) 可以在此处查看\[添加新链接\]。您还可以直接使用 Swap Widget 内置的钱包连接模块。 #### RPC 节点配置[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/getting-started#rpc-jie-dian-pei-zhi) 要自定义节点配置,请运行 `jsonRpcUrlMap` 如下所示。您也可以决定使用[默认配置](https://github.com/DODOEX/widgets/blob/main/packages/dodoex-widgets/src/constants/chains.ts) 。 import { SwapWidget } from '@dodoex/widgets'; function App() { return ( ) } #### 默认链配置[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/getting-started#mo-ren-lian-pei-zhi) 使用 Swap Widget 自带的钱包链接时,您可能需要指定默认链,默认为 1(如果未指定)。如果指定了默认链,并且连接结果使用的是 MetaMask,则会提示您切换到您指定的链。 import { SwapWidget } from "@dodoex/widgets"; function App() { return ; } ### 自定义 Swap Widget[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/getting-started#zi-ding-yi--swap-widget) 我们支持以下 Swap Widget 自定义项: #### 自定义高度和宽度[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/getting-started#zi-ding-yi-gao-du-he-kuan-du) Swap Widget 默认宽度设置为`375px`,默认高度是`494px`,即使不自定义宽度和高度参数,它仍会按照 Swap Widget 的尺寸进行显示。显示元素会根据所设置的 为了适应不同的模型并避免误导性界面,界面的最小宽度可设置为`292px`,最小高度为`494px`。如果高度和宽度设置得比最小宽度和高度小,更改将不会生效。 如果将高度和宽度设置为数字,则会转换为`px`显示。`string`可以设置为任何[CSS 属性](https://drafts.csswg.org/css-sizing-3/#propdef-width) 。 import { SwapWidget } from "@dodoex/widgets"; function App() { return ; } ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fwidget-get-start01.56895d8e.png&w=1920&q=75) ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fwidget-get-start02.c86d12f2.png&w=1920&q=75) #### 自定义字体[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/getting-started#zi-ding-yi-zi-ti) Swap Widget 使用`mui/system`来建立主题。通过在`theme`中设置参数来设置字体,如下所示。 import { SwapWidget } from "@dodoex/widgets"; function App() { return ( ); } #### 自定义主题[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/getting-started#zi-ding-yi-zhu-ti) 当前有两个主题:`light`和`dark`。当指定了 `mode` 时,可以运行 `theme.palette` 来覆盖主题颜色。请注意,代码只在 `theme.palette.mode` = `mode` 时生效。下面是一个示例: import { SwapWidget } from "@dodoex/widgets"; function App() { return ( ); } #### 自定义样式[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/getting-started#zi-ding-yi-yang-shi) 许多设计师使用 `mui/system` 的 `GlobalStyles` 来设置整体样式,但是我们建议使用 `theme.components.MuiCssBaseline.styleOverrides` 来覆盖样式(如果需要的话)。 import { SwapWidget } from "@dodoex/widgets"; function App() { return ( ); } t; 或者只需使用 CSS,如下所示: .dodo-widget-container { //... css 代码 } **自定义代币列表** 在 `tokenList` 中指定详细信息,以覆盖默认的代币列表。默认的代币列表配置可以在[这里](https://github.com/DODOEX/widgets/blob/main/packages/dodoex-widgets/src/constants/tokenList.ts) 找到。 import { SwapWidget } from '@dodoex/widgets'; function App() { return ( ) } #### 自定义热门代币列表[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/getting-started#zi-ding-yi-re-men-dai-bi-lie-biao) > > > > > > > e5fdd3a17e703e9f7c8f028736327bba64b94ca0 --- # 盈利分享指南 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 盈利分享指南 ====== Widget 分红指南 ### 背景[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/profit-sharing-instructions#bei-jing) 为了奖励交易量提供者,API用户可以调整交易手续费收款地址和手续费比例。用户通过提供者发布的小部件进行交易后,提供者将获得相应的手续费奖励。 ### 使用盈利分享模式[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/profit-sharing-instructions#shi-yong-ying-li-fen-xiang-mo-shi) **描述** `feeRate`: API用户的手续费比例;API用户设置的`feeRate`与DODO收取的手续费单独计算,手续费单位为1e18,例如,如果`feeRate`设置为1500000000000000,实际手续费率为1500000000000000 / 10^18 = 0.0015 = 0.15%。`rebateTo`:将接收交易手续费激励的钱包地址。 ⚠️注意:如果要使用盈利分享模式,这两组代码对于小部件来说是必需的。如果这些代码未处理,feeRate默认为0, 默认API用户将不会收取任何交易手续费。 #### 使用React函数[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/profit-sharing-instructions#shi-yong-reacthan-shu) import { SwapWidget } from '@dodoex/widgets'; function App() { return ( ) } #### 使用非React函数[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/profit-sharing-instructions#shi-yong-fei-reacthan-shu) /** * main.js * InitializeSwapWidget */ 'use strict'; import { InitSwapWidget } from '@dodoex/widgets'; function initDodoWidget() { InitSwapWidget({ feeRate: 1500000000000000, rebateTo: '0x2Ba1633338dDD2Ab37fbc95ea615BA98f0445380', // ...otherPrpos }); } initDodoWidget(); #### 手续费计算-合约代码块[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/profit-sharing-instructions#shou-xu-fei-ji-suan--he-yue-dai-ma-kuai) function _routeWithdraw( address toToken, uint256 receiveAmount, bytes memory feeData, uint256 minReturnAmount ) internal { (address broker, uint256 brokerFeeRate) = abi.decode(feeData, (address, uint256)); uint256 routeFee = DecimalMath.mulFloor(receiveAmount, routeFeeRate); IERC20(toToken).universalTransfer(payable(routeFeeReceiver), routeFee); uint256 brokerFee = DecimalMath.mulFloor(receiveAmount, brokerFeeRate); IERC20(toToken).universalTransfer(payable(broker), brokerFee); receiveAmount = receiveAmount - routeFee - brokerFee; require(receiveAmount >= minReturnAmount, "DODORouteProxy: Return amount is not enough"); if (toToken == _ETH_ADDRESS_) { IWETH(_WETH_).withdraw(receiveAmount); payable(msg.sender).transfer(receiveAmount); } else { IERC20(toToken).universalTransfer(payable(msg.sender), receiveAmount); } } 正如上面所示,在获取准确的路由报价时,向用户显示的toAmount已经扣除了交易手续费。 ### 盈利分享手续费显示[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/profit-sharing-instructions#ying-li-fen-xiang-shou-xu-fei-xian-shi) #### 报价模块[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/profit-sharing-instructions#bao-jia-mo-kuai) 根据上述合约,在报价阶段的toAmount(即示例图中的DODO数量)已经扣除了API用户的feeRate后的代币数。 ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fprofit-sharing-instructions01.4f768f98.jpg&w=1080&q=75) #### 交易明细示例[#](https://docs.dodoex.io/zh/developer/developers-portal/widget/profit-sharing-instructions#jiao-yi-ming-xi-shi-li) 基本费用:服务提供商(DODO)的费用;额外费用:小部件用户(feeRate)的附加费用; ![](https://docs.dodoex.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fprofit-sharing-instructions02.29d3a3e7.jpg&w=828&q=75) --- # DODO V1/V2 Integration Guide - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) DODO V1/V2 Integration Guide ============================ DODO V1/V2 Contract Address[#](https://docs.dodoex.io/en/developer/contracts/dodo-v1-v2/dodo-v1-v2-integration-guide#dodo-v1-v2-contract-address) -------------------------------------------------------------------------------------------------------------------------------------------------- Contract address link:[DODO V1/V2 Contract Address](https://docs.dodoex.io/en/developer/contracts/dodo-v1-v2/contracts-address) DODO V1/V2 Mainnet Subgraph Address[#](https://docs.dodoex.io/en/developer/contracts/dodo-v1-v2/dodo-v1-v2-integration-guide#dodo-v1-v2-mainnet-subgraph-address) ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Chain | Query URL | | --- | --- | | ETH | [https://api.thegraph.com/subgraphs/name/dodoex/dodoex-v2](https://api.thegraph.com/subgraphs/name/dodoex/dodoex-v2) | | BSC | [https://api.thegraph.com/subgraphs/name/dodoex/dodoex-v2-bsc](https://api.thegraph.com/subgraphs/name/dodoex/dodoex-v2-bsc) | | Polygon | [https://api.thegraph.com/subgraphs/name/dodoex/dodoex-v2-polygon](https://api.thegraph.com/subgraphs/name/dodoex/dodoex-v2-polygon) | | Arb | [https://api.thegraph.com/subgraphs/name/dodoex/dodoex-v2-arbitrum](https://api.thegraph.com/subgraphs/name/dodoex/dodoex-v2-arbitrum) | Formula Explanation[#](https://docs.dodoex.io/en/developer/contracts/dodo-v1-v2/dodo-v1-v2-integration-guide#formula-explanation) ---------------------------------------------------------------------------------------------------------------------------------- The transaction token in a trading pair is referred to as the _Base Token_, while the pricing token is called the _Queto Token_, abbreviated as BB and QQ respectively. The DODO V2 price curve formula is as follows: P\=i(1−k+(B0B)2k)P=i(1-k+(\\frac{B\_0}{B})^2k) ii represents the reference price, kk is the slippage factor, B0B\_0 denotes the current token inventory, BB represents the balanced inventory, and B0B\\frac{B\_0}{B} indicates the degree of deviation of the current token inventory from the balanced state. In this model, the transaction token and the pricing token are symmetric, and similarly, we obtain: P\=i/(1−k+(Q0Q)2k)P=i/(1-k+(\\frac{Q\_0}{Q})^2k) Combining the two formulas mentioned above, we arrive at the PMM curve formula: P\=iRP=iR There are three scenarios for the variable RR in the given context: * If B1R>1 * If Q 1 3. R < 1 PMMPricing source code link: [https://github.com/DODOEX/contractV2/blob/main/contracts/lib/PMMPricing.sol](https://github.com/DODOEX/contractV2/blob/main/contracts/lib/PMMPricing.sol) Important functions source code are as follows: // ============== PMMPricing Functions =============== // ============ Buy & Sell Functions ============ function sellBaseToken(PMMState memory state, uint256 payBaseAmount) internal pure returns (uint256 receiveQuoteAmount, RState newR) { if (state.R == RState.ONE) { // case 1: R=1 // R falls below one receiveQuoteAmount = _ROneSellBaseToken(state, payBaseAmount); newR = RState.BELOW_ONE; } else if (state.R == RState.ABOVE_ONE) { uint256 backToOnePayBase = state.B0.sub(state.B); uint256 backToOneReceiveQuote = state.Q.sub(state.Q0); // case 2: R>1 // complex case, R status depends on trading amount if (payBaseAmount < backToOnePayBase) { // case 2.1: R status do not change receiveQuoteAmount = _RAboveSellBaseToken(state, payBaseAmount); newR = RState.ABOVE_ONE; if (receiveQuoteAmount > backToOneReceiveQuote) { // [Important corner case!] may enter this branch when some precision problem happens. And consequently contribute to negative spare quote amount // to make sure spare quote>=0, mannually set receiveQuote=backToOneReceiveQuote receiveQuoteAmount = backToOneReceiveQuote; } } else if (payBaseAmount == backToOnePayBase) { // case 2.2: R status changes to ONE receiveQuoteAmount = backToOneReceiveQuote; newR = RState.ONE; } else { // case 2.3: R status changes to BELOW_ONE receiveQuoteAmount = backToOneReceiveQuote.add( _ROneSellBaseToken(state, payBaseAmount.sub(backToOnePayBase)) ); newR = RState.BELOW_ONE; } } else { // state.R == RState.BELOW_ONE // case 3: R<1 receiveQuoteAmount = _RBelowSellBaseToken(state, payBaseAmount); newR = RState.BELOW_ONE; } } function sellQuoteToken(PMMState memory state, uint256 payQuoteAmount) internal pure returns (uint256 receiveBaseAmount, RState newR) { if (state.R == RState.ONE) { receiveBaseAmount = _ROneSellQuoteToken(state, payQuoteAmount); newR = RState.ABOVE_ONE; } else if (state.R == RState.ABOVE_ONE) { receiveBaseAmount = _RAboveSellQuoteToken(state, payQuoteAmount); newR = RState.ABOVE_ONE; } else { uint256 backToOnePayQuote = state.Q0.sub(state.Q); uint256 backToOneReceiveBase = state.B.sub(state.B0); if (payQuoteAmount < backToOnePayQuote) { receiveBaseAmount = _RBelowSellQuoteToken(state, payQuoteAmount); newR = RState.BELOW_ONE; if (receiveBaseAmount > backToOneReceiveBase) { receiveBaseAmount = backToOneReceiveBase; } } else if (payQuoteAmount == backToOnePayQuote) { receiveBaseAmount = backToOneReceiveBase; newR = RState.ONE; } else { receiveBaseAmount = backToOneReceiveBase.add( _ROneSellQuoteToken(state, payQuoteAmount.sub(backToOnePayQuote)) ); newR = RState.ABOVE_ONE; } } } // ============ R = 1 cases ============ function _ROneSellBaseToken(PMMState memory state, uint256 payBaseAmount) internal pure returns ( uint256 // receiveQuoteToken ) { // in theory Q2 <= targetQuoteTokenAmount // however when amount is close to 0, precision problems may cause Q2 > targetQuoteTokenAmount return DODOMath._SolveQuadraticFunctionForTrade( state.Q0, state.Q0, payBaseAmount, state.i, state.K ); } function _ROneSellQuoteToken(PMMState memory state, uint256 payQuoteAmount) internal pure returns ( uint256 // receiveBaseToken ) { return DODOMath._SolveQuadraticFunctionForTrade( state.B0, state.B0, payQuoteAmount, DecimalMath.reciprocalFloor(state.i), state.K ); } // ============ R < 1 cases ============ function _RBelowSellQuoteToken(PMMState memory state, uint256 payQuoteAmount) internal pure returns ( uint256 // receiveBaseToken ) { return DODOMath._GeneralIntegrate( state.Q0, state.Q.add(payQuoteAmount), state.Q, DecimalMath.reciprocalFloor(state.i), state.K ); } function _RBelowSellBaseToken(PMMState memory state, uint256 payBaseAmount) internal pure returns ( uint256 // receiveQuoteToken ) { return DODOMath._SolveQuadraticFunctionForTrade( state.Q0, state.Q, payBaseAmount, state.i, state.K ); } // ============ R > 1 cases ============ function _RAboveSellBaseToken(PMMState memory state, uint256 payBaseAmount) internal pure returns ( uint256 // receiveQuoteToken ) { return DODOMath._GeneralIntegrate( state.B0, state.B.add(payBaseAmount), state.B, state.i, state.K ); } function _RAboveSellQuoteToken(PMMState memory state, uint256 payQuoteAmount) internal pure returns ( uint256 // receiveBaseToken ) { return DODOMath._SolveQuadraticFunctionForTrade( state.B0, state.B, payQuoteAmount, DecimalMath.reciprocalFloor(state.i), state.K ); } The specific calculations involve calls to the DODOMath library and the DecimalMath library. DecimalMath library link: [https://github.com/DODOEX/contractV2/blob/main/contracts/lib/DecimalMath.sol](https://github.com/DODOEX/contractV2/blob/main/contracts/lib/DecimalMath.sol) DODOMath library link: [https://github.com/DODOEX/contractV2/blob/main/contracts/lib/DODOMath.sol](https://github.com/DODOEX/contractV2/blob/main/contracts/lib/DODOMath.sol) Important functions source code are as follows: // ============ DODOMath Helper functions ============ /* Integrate dodo curve from V1 to V2 require V0>=V1>=V2>0 res = (1-k)i(V1-V2)+ikV0*V0(1/V2-1/V1) let V1-V2=delta res = i*delta*(1-k+k(V0^2/V1/V2)) i is the price of V-res trading pair support k=1 & k=0 case [round down] */ function _GeneralIntegrate( uint256 V0, uint256 V1, uint256 V2, uint256 i, uint256 k ) internal pure returns (uint256) { require(V0 > 0, "TARGET_IS_ZERO"); uint256 fairAmount = i.mul(V1.sub(V2)); // i*delta if (k == 0) { return fairAmount.div(DecimalMath.ONE); } uint256 V0V0V1V2 = DecimalMath.divFloor(V0.mul(V0).div(V1), V2); uint256 penalty = DecimalMath.mulFloor(k, V0V0V1V2); // k(V0^2/V1/V2) return DecimalMath.ONE.sub(k).add(penalty).mul(fairAmount).div(DecimalMath.ONE2); } /* Follow the integration expression above, we have: i*deltaB = (Q2-Q1)*(1-k+kQ0^2/Q1/Q2) Given Q1 and deltaB, solve Q2 This is a quadratic function and the standard version is aQ2^2 + bQ2 + c = 0, where a=1-k -b=(1-k)Q1-kQ0^2/Q1+i*deltaB c=-kQ0^2 and Q2=(-b+sqrt(b^2+4(1-k)kQ0^2))/2(1-k) note: another root is negative, abondan if deltaBSig=true, then Q2>Q1, user sell Q and receive B if deltaBSig=false, then Q2 0, "TARGET_IS_ZERO"); if (delta == 0) { return 0; } if (k == 0) { return DecimalMath.mulFloor(i, delta) > V1 ? V1 : DecimalMath.mulFloor(i, delta); } if (k == DecimalMath.ONE) { // if k==1 // Q2=Q1/(1+ideltaBQ1/Q0/Q0) // temp = ideltaBQ1/Q0/Q0 // Q2 = Q1/(1+temp) // Q1-Q2 = Q1*(1-1/(1+temp)) = Q1*(temp/(1+temp)) // uint256 temp = i.mul(delta).mul(V1).div(V0.mul(V0)); uint256 temp; uint256 idelta = i.mul(delta); if (idelta == 0) { temp = 0; } else if ((idelta * V1) / idelta == V1) { temp = (idelta * V1).div(V0.mul(V0)); } else { temp = delta.mul(V1).div(V0).mul(i).div(V0); } return V1.mul(temp).div(temp.add(DecimalMath.ONE)); } // calculate -b value and sig // b = kQ0^2/Q1-i*deltaB-(1-k)Q1 // part1 = (1-k)Q1 >=0 // part2 = kQ0^2/Q1-i*deltaB >=0 // bAbs = abs(part1-part2) // if part1>part2 => b is negative => bSig is false // if part2>part1 => b is positive => bSig is true uint256 part2 = k.mul(V0).div(V1).mul(V0).add(i.mul(delta)); // kQ0^2/Q1-i*deltaB uint256 bAbs = DecimalMath.ONE.sub(k).mul(V1); // (1-k)Q1 bool bSig; if (bAbs >= part2) { bAbs = bAbs - part2; bSig = false; } else { bAbs = part2 - bAbs; bSig = true; } bAbs = bAbs.div(DecimalMath.ONE); // calculate sqrt uint256 squareRoot = DecimalMath.mulFloor( DecimalMath.ONE.sub(k).mul(4), DecimalMath.mulFloor(k, V0).mul(V0) ); // 4(1-k)kQ0^2 squareRoot = bAbs.mul(bAbs).add(squareRoot).sqrt(); // sqrt(b*b+4(1-k)kQ0*Q0) // final res uint256 denominator = DecimalMath.ONE.sub(k).mul(2); // 2(1-k) uint256 numerator; if (bSig) { numerator = squareRoot.sub(bAbs); } else { numerator = bAbs.add(squareRoot); } uint256 V2 = DecimalMath.divCeil(numerator, denominator); if (V2 > V1) { return 0; } else { return V1 - V2; } } * DODO V1 In V1, there are two types of swap methods: `sellBaseToken` and `buyBaseToken`. Trader code link: [https://github.com/DODOEX/dodo-smart-contract/blob/master/contracts/impl/Trader.sol](https://github.com/DODOEX/dodo-smart-contract/blob/master/contracts/impl/Trader.sol) The `sellBaseToken` function in V1 has the same implementation logic as the `sellBase` function in V2. Both take payBaseAmount as a parameter and calculate the receiveQuoteAmount in the Query function. The difference from V2 is that the `buyBaseToken` function in V1 has the inverse logic of the `sellQuoteToken` function in V2. The `sellQuoteToken` function calculates the receiveBaseAmount that the user can obtain based on the payQuoteAmount. In contrast, the `buyBaseToken` function takes the desired receiveBaseAmount as a parameter to calculate payQuoteAmount. `buyBaseToken` function source code is as follows: function buyBaseToken( uint256 amount, uint256 maxPayQuote, bytes calldata data ) external tradeAllowed buyingAllowed gasPriceLimit preventReentrant returns (uint256) { // query price ( uint256 payQuote, uint256 lpFeeBase, uint256 mtFeeBase, Types.RStatus newRStatus, uint256 newQuoteTarget, uint256 newBaseTarget ) = _queryBuyBaseToken(amount); require(payQuote <= maxPayQuote, "BUY_BASE_COST_TOO_MUCH"); // settle assets _baseTokenTransferOut(msg.sender, amount); if (data.length > 0) { IDODOCallee(msg.sender).dodoCall(true, amount, payQuote, data); } _quoteTokenTransferIn(msg.sender, payQuote); if (mtFeeBase != 0) { _baseTokenTransferOut(_MAINTAINER_, mtFeeBase); emit ChargeMaintainerFee(_MAINTAINER_, true, mtFeeBase); } // update TARGET if (_TARGET_QUOTE_TOKEN_AMOUNT_ != newQuoteTarget) { _TARGET_QUOTE_TOKEN_AMOUNT_ = newQuoteTarget; } if (_TARGET_BASE_TOKEN_AMOUNT_ != newBaseTarget) { _TARGET_BASE_TOKEN_AMOUNT_ = newBaseTarget; } if (_R_STATUS_ != newRStatus) { _R_STATUS_ = newRStatus; } _donateBaseToken(lpFeeBase); emit BuyBaseToken(msg.sender, amount, payQuote); return payQuote; } // ============ Query Functions ============ function _queryBuyBaseToken(uint256 amount) internal view returns ( uint256 payQuote, uint256 lpFeeBase, uint256 mtFeeBase, Types.RStatus newRStatus, uint256 newQuoteTarget, uint256 newBaseTarget ) { (newBaseTarget, newQuoteTarget) = getExpectedTarget(); // charge fee from user receive amount lpFeeBase = DecimalMath.mul(amount, _LP_FEE_RATE_); mtFeeBase = DecimalMath.mul(amount, _MT_FEE_RATE_); uint256 buyBaseAmount = amount.add(lpFeeBase).add(mtFeeBase); if (_R_STATUS_ == Types.RStatus.ONE) { // case 1: R=1 payQuote = _ROneBuyBaseToken(buyBaseAmount, newBaseTarget); newRStatus = Types.RStatus.ABOVE_ONE; } else if (_R_STATUS_ == Types.RStatus.ABOVE_ONE) { // case 2: R>1 payQuote = _RAboveBuyBaseToken(buyBaseAmount, _BASE_BALANCE_, newBaseTarget); newRStatus = Types.RStatus.ABOVE_ONE; } else if (_R_STATUS_ == Types.RStatus.BELOW_ONE) { uint256 backToOnePayQuote = newQuoteTarget.sub(_QUOTE_BALANCE_); uint256 backToOneReceiveBase = _BASE_BALANCE_.sub(newBaseTarget); // case 3: R<1 // complex case, R status may change if (buyBaseAmount < backToOneReceiveBase) { // case 3.1: R status do not change // no need to check payQuote because spare base token must be greater than zero payQuote = _RBelowBuyBaseToken(buyBaseAmount, _QUOTE_BALANCE_, newQuoteTarget); newRStatus = Types.RStatus.BELOW_ONE; } else if (buyBaseAmount == backToOneReceiveBase) { // case 3.2: R status changes to ONE payQuote = backToOnePayQuote; newRStatus = Types.RStatus.ONE; } else { // case 3.3: R status changes to ABOVE_ONE payQuote = backToOnePayQuote.add( _ROneBuyBaseToken(buyBaseAmount.sub(backToOneReceiveBase), newBaseTarget) ); newRStatus = Types.RStatus.ABOVE_ONE; } } return (payQuote, lpFeeBase, mtFeeBase, newRStatus, newQuoteTarget, newBaseTarget); } PMMState Construction[#](https://docs.dodoex.io/en/developer/contracts/dodo-v1-v2/dodo-v1-v2-integration-guide#pmmstate-construction) -------------------------------------------------------------------------------------------------------------------------------------- Pool state parameters are stored in PMMState, and it is used in the Swap to calculate the amount of tokens received by the user. There are two methods to obtain PMMState, explained below: 1. Use the `getPMMState` function to obtain the current PMMstate of the pool. 2. Utilize PMMHelper to obtain the pool's PMMState, as well as multiple parameters such as token addresses, transaction fees, etc., in one go. PMMState structure definition is as follows: struct PMMState { uint256 i; uint256 K; uint256 B; uint256 Q; uint256 B0; uint256 Q0; RState R; } ### Using the `getPMMState` Function[#](https://docs.dodoex.io/en/developer/contracts/dodo-v1-v2/dodo-v1-v2-integration-guide#using-the---object-object---function) * i,K,B,Q,Rare all pool state parameters and are readable. * B0,Q0 are automatically calculated within the function. The function source code is as follows: // ============ Helper Functions ============ function getPMMState() public view returns (PMMPricing.PMMState memory state) { state.i = _I_; state.K = _K_; state.B = _BASE_RESERVE_; state.Q = _QUOTE_RESERVE_; state.B0 = _BASE_TARGET_; state.Q0 = _QUOTE_TARGET_; state.R = PMMPricing.RState(_RState_); PMMPricing.adjustedTarget(state); } The calculation details for B0 and Q0 are as follows: Taking the case where B1R>1 * 如果 Q 1 3. R < 1 PMMPricing 源代码链接:[https://github.com/DODOEX/contractV2/blob/main/contracts/lib/PMMPricing.sol](https://github.com/DODOEX/contractV2/blob/main/contracts/lib/PMMPricing.sol) 重要函数的源代码如下: // ============== PMMPricing Functions =============== // ============ Buy & Sell Functions ============ function sellBaseToken(PMMState memory state, uint256 payBaseAmount) internal pure returns (uint256 receiveQuoteAmount, RState newR) { if (state.R == RState.ONE) { receiveQuoteAmount = _ROneSellBaseToken(state, payBaseAmount); newR = RState.BELOW_ONE; } else if (state.R == RState.ABOVE_ONE) { uint256 backToOnePayBase = state.B0.sub(state.B); uint256 backToOneReceiveQuote = state.Q.sub(state.Q0); if (payBaseAmount < backToOnePayBase) { receiveQuoteAmount = _RAboveSellBaseToken(state, payBaseAmount); newR = RState.ABOVE_ONE; if (receiveQuoteAmount > backToOneReceiveQuote) { receiveQuoteAmount = backToOneReceiveQuote; } } else if (payBaseAmount == backToOnePayBase) { receiveQuoteAmount = backToOneReceiveQuote; newR = RState.ONE; } else { receiveQuoteAmount = backToOneReceiveQuote.add( _ROneSellBaseToken(state, payBaseAmount.sub(backToOnePayBase)) ); newR = RState.BELOW_ONE; } } else { receiveQuoteAmount = _RBelowSellBaseToken(state, payBaseAmount); newR = RState.BELOW_ONE; } } function sellQuoteToken(PMMState memory state, uint256 payQuoteAmount) internal pure returns (uint256 receiveBaseAmount, RState newR) { if (state.R == RState.ONE) { receiveBaseAmount = _ROneSellQuoteToken(state, payQuoteAmount); newR = RState.ABOVE_ONE; } else if (state.R == RState.ABOVE_ONE) {>>>END>>> function buyBaseToken( uint256 amount, uint256 maxPayQuote, bytes calldata data ) external tradeAllowed buyingAllowed gasPriceLimit preventReentrant returns (uint256) { // 查询价格 ( uint256 payQuote, uint256 lpFeeBase, uint256 mtFeeBase, Types.RStatus newRStatus, uint256 newQuoteTarget, uint256 newBaseTarget ) = _queryBuyBaseToken(amount); require(payQuote <= maxPayQuote, "BUY_BASE_COST_TOO_MUCH"); // 结算资产 _baseTokenTransferOut(msg.sender, amount); if (data.length > 0) { IDODOCallee(msg.sender).dodoCall(true, amount, payQuote, data); } _quoteTokenTransferIn(msg.sender, payQuote); if (mtFeeBase != 0) { _baseTokenTransferOut(_MAINTAINER_, mtFeeBase); } return payQuote; } 以上代码是 DODO V1 的`buyBaseToken`函数的源代码,该函数用于以报价代币购买基础代币。`buyBaseToken`函数的实现逻辑与 V2 中的`sellQuoteToken`函数反向,它根据用户期望获得的 receiveBaseAmount 计算 payQuoteAmount. V1 版本的 sellBaseToken 函数与 V2 版本的 sellBase 函数实现逻辑相同,都以 payBaseAmount 作为参数,在 Query 函数中计算 receiveQuoteAmount。 V1 中关于 dodo 代币的价格查询代码是\_queryBuyBaseToken 函数,源代码如下: function _queryBuyBaseToken( uint256 amount ) internal view returns ( uint256, uint256, uint256, Types.RStatus, uint256, uint256 ) { PMMState memory state = pmmState; uint256 newBaseTarget = state.B.sub(amount); (uint256 receiveQuoteAmount, uint256 newR) = _BASE_TO_QUOTE(amount, state); swapState.RStatus = newR; Types.RStatus newRStatus; if (state.lpFeeRate > 0) { uint256 lpFeeBase = amount.mulCeil(state.lpFeeRate); newBaseTarget = newBaseTarget.sub(lpFeeBase); } if (state.mtFeeRate > 0) { uint256 mtFeeBase = amount.mulCeil(state.mtFeeRate); newBaseTarget = newBaseTarget.sub(mtFeeBase); } if (newBaseTarget == 0) { newRStatus = Types.RStatus.ONE; } else { if (newR == Types.RStatus.ABOVE_ONE) { uint256 backToOnePayBase = state.B.sub(state.B0); if (backToOnePayBase.add(amount) >= newBaseTarget) { newRStatus = Types.RStatus.ONE; receiveQuoteAmount = receiveQuoteAmount.add(_BASE_QUOTE(state.B.sub(state.B0))); } else { newRStatus = Types.RStatus.ABOVE_ONE; } } else if (newR == Types.RStatus.BELOW_ONE) { uint256 backToOnePayQuote = state.Q0.sub(state.Q); if (backToOnePayQuote >= receiveQuoteAmount) { newRStatus = Types.RStatus.ONE; receiveQuoteAmount = _BASE_QUOTE(state.B.sub(state.B0)).add(receiveQuoteAmount); } else { newRStatus = Types.RStatus.BELOW_ONE; } } else { assert(newR == Types.RStatus.ONE); if (state.Q.sub(receiveQuoteAmount) <= state.Q0) { newRStatus = Types.RStatus.ONE; } else { newRStatus = Types.RStatus.BELOW_ONE; } } } return ( receiveQuoteAmount, lpFeeBase, mtFeeBase, newRStatus, state.Q.sub(receiveQuoteAmount), newBaseTarget ); } DODO V1 主要调用了两个库:DODOMath 库和 DecimalMath 库。这些库中包含了一些用于数学计算的函数,如解一元二次函数、一般积分等。这些函数主要用于计算 DODO 的交易价格。 DecimalMath 库的链接:[https://github.com/DODOEX/contractV2/blob/main/contracts/lib/DecimalMath.sol](https://github.com/DODOEX/contractV2/blob/main/contracts/lib/DecimalMath.sol) DODOMath 库的链接:[https://github.com/DODOEX/contractV2/blob/main/contracts/lib/DODOMath.sol](https://github.com/DODOEX/contractV2/blob/main/contracts/lib/DODOMath.sol) 以上是关于 DODO V1 的一些相关代码和库的介绍。 发射ChargeMaintainerFee(_MAINTAINER_, true, mtFeeBase); } // 更新TARGET 如果 (_TARGET_QUOTE_TOKEN_AMOUNT_ != newQuoteTarget) { _TARGET_QUOTE_TOKEN_AMOUNT_ = newQuoteTarget; } 如果 (_TARGET_BASE_TOKEN_AMOUNT_ != newBaseTarget) { _TARGET_BASE_TOKEN_AMOUNT_ = newBaseTarget; } 如果 (_R_STATUS_ != newRStatus) { _R_STATUS_ = newRStatus; } _donateBaseToken(lpFeeBase); 发射BuyBaseToken(msg.sender, amount, payQuote); return payQuote; } // ============ 查询函数 ============ function _queryBuyBaseToken(uint256 amount) internal view returns ( uint256 payQuote, uint256 lpFeeBase, uint256 mtFeeBase, Types.RStatus newRStatus, uint256 newQuoteTarget, uint256 newBaseTarget ) { (newBaseTarget, newQuoteTarget) = getExpectedTarget(); // 从用户接收的数量中收取费用 lpFeeBase = DecimalMath.mul(amount, _LP_FEE_RATE_); mtFeeBase = DecimalMath.mul(amount, _MT_FEE_RATE_); uint256 buyBaseAmount = amount.add(lpFeeBase).add(mtFeeBase); 如果 (_R_STATUS_ == Types.RStatus.ONE) { // 情况1: R=1 payQuote = _ROneBuyBaseToken(buyBaseAmount, newBaseTarget); newRStatus = Types.RStatus.ABOVE_ONE; } else 如果 (_R_STATUS_ == Types.RStatus.ABOVE_ONE) { // 情况2: R>1 payQuote = _RAboveBuyBaseToken(buyBaseAmount, _BASE_BALANCE_, newBaseTarget); newRStatus = Types.RStatus.ABOVE_ONE; } else 如果 (_R_STATUS_ == Types.RStatus.BELOW_ONE) { uint256 backToOnePayQuote = newQuoteTarget.sub(_QUOTE_BALANCE_); uint256 backToOneReceiveBase = _BASE_BALANCE_.sub(newBaseTarget); // 情况3: R<1 // 复杂情况,R状态可能会改变 如果 (buyBaseAmount < backToOneReceiveBase) { // 情况3.1: R状态不改变 // 不需要检查payQuote,因为备用基础代币必须大于零 payQuote = _RBelowBuyBaseToken(buyBaseAmount, _QUOTE_BALANCE_, newQuoteTarget); newRStatus = Types.RStatus.BELOW_ONE; } else 如果 (buyBaseAmount == backToOneReceiveBase) { // 情况3.2: R状态改变为ONE payQuote = backToOnePayQuote; newRStatus = Types.RStatus.ONE; } else { // 情况3.3: R状态改变为ABOVE_ONE payQuote = backToOnePayQuote.add( _ROneBuyBaseToken(buyBaseAmount.sub(backToOneReceiveBase), newBaseTarget) ); newRStatus = Types.RStatus.ABOVE_ONE; } } 返回 (payQuote, lpFeeBase, mtFeeBase, newRStatus, newQuoteTarget, newBaseTarget); } ```     ## PMM状态构造 池子状态的参数储存在PMMState中,被用于Swap来计算用户获取到的代币数量。有两种方法来获取PMMState,如下所述: 1. 使用`getPMMState`函数获取当前池子的PMMstate。 2. 利用PMMHelper在一次性中获取池子的PMMState以及多个参数,例如代币地址、交易费用等。 PMMState结构定义如下: ```solidity struct PMMState { uint256 i; uint256 K; uint256 B; uint256 Q; uint256 B0; uint256 Q0; RState R; } ### 使用`getPMMState`函数[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v1-v2/dodo-v1-v2-integration-guide#shi-yong---object-object--han-shu) * i,K,B,Q,R 都是池子状态的参数,可读取。 * B0,Q0 在函数内部自动计算。 函数的源代码如下: // ============ Helper Functions ============ function getPMMState() public view returns (PMMPricing.PMMState memory state) { state.i = _I_; state.K = _K_; state.B = _BASE_RESERVE_; state.Q = _QUOTE_RESERVE_; state.B0 = _BASE_TARGET_; state.Q0 = _QUOTE_TARGET_; state.R = PMMPricing.RState(_RState_); PMMPricing.adjustedTarget(state); } B0 和 Q0 的计算细节如下: 以B= 0 && feeRate <= 10000, 'UniswapV2: FEE_RATE_OVERFLOW'); require(token0 != address(0), 'UniswapV2: ZERO_ADDRESS'); require(getPair[token0][token1][feeRate] == address(0), 'UniswapV2: PAIR_EXISTS'); // single check is sufficient bytes memory bytecode = type(UniswapV2Pair).creationCode; bytes32 salt = keccak256(abi.encodePacked(token0, token1, feeRate)); assembly { pair := create2(0, add(bytecode, 32), mload(bytecode), salt) } IUniswapV2Pair(pair).initialize(token0, token1); IUniswapV2Pair(pair).setFeeRate(feeRate); getPair[token0][token1][feeRate] = pair; getPair[token1][token0][feeRate] = pair; // populate mapping in the reverse direction allPairs.push(pair); emit PairCreated(token0, token1, pair, feeRate, allPairs.length); } [**UniswapV2Pair**](https://github.com/DODOEX/Uniswap-v2-core/blob/feat/protocol-fee/contracts/UniswapV2Pair.sol) The swap function adds calculation of effective balance after `feeRate`. uint balance0Adjusted = balance0.mul(10000).sub(amount0In.mul(feeRate)); uint balance1Adjusted = balance1.mul(10000).sub(amount1In.mul(feeRate)); [**UniswapV2Router**](https://github.com/DODOEX/Uniswap-v2-periphery/blob/feat/protocol-fee/contracts/interfaces/IUniswapV2Router02.sol) Function interfaces add trading fee parameter `feeRate`. pragma solidity >=0.6.2; pragma experimental ABIEncoderV2; struct RemoveLiquidityParams { address tokenA; address tokenB; uint256 fee; uint liquidity; uint amountAMin; uint amountBMin; address to; uint deadline; bool approveMax; uint8 v; bytes32 r; bytes32 s; } struct RemoveLiquidityETHParams { address token; uint256 fee; uint liquidity; uint amountTokenMin; uint amountETHMin; address to; uint deadline; bool approveMax; uint8 v; bytes32 r; bytes32 s; } interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint256 fee, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint256 fee, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint256 fee, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint256 fee, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( RemoveLiquidityParams calldata params ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( RemoveLiquidityETHParams calldata params ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, uint256[] calldata fees, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, uint256[] calldata fees, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, uint256[] calldata fees, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, uint256[] calldata fees, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, uint256[] calldata fees, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, uint256[] calldata fees, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut, uint256 fee) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut, uint256 fee) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path, uint256[] calldata fees) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path, uint256[] calldata fees) external view returns (uint[] memory amounts); } interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint256 fee, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint256 fee, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, uint256[] calldata fees, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, uint256[] calldata fees, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, uint256[] calldata fees, address to, uint deadline ) external; } ### Executing Swaps[#](https://docs.dodoex.io/en/developer/contracts/dodo-amm/dodo-amm-v2-v3-integration-guide#executing-swaps) UniswapV2Router provides various swap methods, which can be selected based on needs (such as `swapExactTokensForTokens`, etc.). ### Providing Liquidity[#](https://docs.dodoex.io/en/developer/contracts/dodo-amm/dodo-amm-v2-v3-integration-guide#providing-liquidity) Use UniswapV2Router to add liquidity to the pool. For adding liquidity to ERC-20/ERC-20 pairs, use `addLiquidity`. If involving ETH liquidity, use `addLiquidityETH`. function addLiquidity( address tokenA, address tokenB, uint256 fee, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint256 fee, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); V3 Updates and Integration[#](https://docs.dodoex.io/en/developer/contracts/dodo-amm/dodo-amm-v2-v3-integration-guide#v3-updates-and-integration) -------------------------------------------------------------------------------------------------------------------------------------------------- Adds a 0.01% fee tier on top of the original AMM V3, offering four optional tiers: 0.01%, 0.05%, 0.3%, 1%. The trading fee cannot be changed after the pool is created. feeAmountTickSpacing: 100 - 1, 500 - 10, 3000 - 60, 10000 - 200 constructor() { owner = msg.sender; emit OwnerChanged(address(0), msg.sender); feeAmountTickSpacing[500] = 10; emit FeeAmountEnabled(500, 10); feeAmountTickSpacing[3000] = 60; emit FeeAmountEnabled(3000, 60); feeAmountTickSpacing[10000] = 200; emit FeeAmountEnabled(10000, 200); } ### Executing Swaps[#](https://docs.dodoex.io/en/developer/contracts/dodo-amm/dodo-amm-v2-v3-integration-guide#executing-swaps) * Single-hop Swap: Call `swapRouter.exactInputSingle` or `swapRouter.exactOutputSingle` to swap through the specified fee tier's token0/token1 pool (via a single pool). `exactInputSingle` gets output `amountOut` for a fixed input `amountIn`, where `amountOut` must be greater than or equal to `amountOutMinimum`. // Naively set amountOutMinimum to 0. In production, use an oracle or other data source to choose a safer value for amountOutMinimum. // We also set the sqrtPriceLimitx96 to be 0 to ensure we swap our exact input amount. ISwapRouter.ExactInputSingleParams memory params = ISwapRouter.ExactInputSingleParams({ tokenIn: DAI, tokenOut: WETH9, fee: poolFee, recipient: msg.sender, deadline: block.timestamp, amountIn: amountIn, amountOutMinimum: 0, sqrtPriceLimitX96: 0 }); // The call to `exactInputSingle` executes the swap. amountOut = swapRouter.exactInputSingle(params); `exactOutputSingle` gets input `amountIn` for a fixed output `amountOut`, where `amountIn` must be less than or equal to `amountInMaximum`. ISwapRouter.ExactOutputSingleParams memory params = ISwapRouter.ExactOutputSingleParams({ tokenIn: DAI, tokenOut: WETH9, fee: poolFee, recipient: msg.sender, deadline: block.timestamp, amountOut: amountOut, amountInMaximum: amountInMaximum, sqrtPriceLimitX96: 0 }); // Executes the swap returning the amountIn needed to spend to receive the desired amountOut. amountIn = swapRouter.exactOutputSingle(params); * Multi-hop Swap: Call `swapRouter.exactInput` or `swapRouter.exactOutput` to swap through a specified path (via multiple pools). `exactInput` gets output `amountOut` for a fixed input `amountIn`, where `amountOut` must be greater than or equal to `amountOutMinimum`. // Multiple pool swaps are encoded through bytes called a `path`. A path is a sequence of token addresses and poolFees that define the pools used in the swaps. // The format for pool encoding is (tokenIn, fee, tokenOut/tokenIn, fee, tokenOut) where tokenIn/tokenOut parameter is the shared token across the pools. // Since we are swapping DAI to USDC and then USDC to WETH9 the path encoding is (DAI, 0.3%, USDC, 0.3%, WETH9). ISwapRouter.ExactInputParams memory params = ISwapRouter.ExactInputParams({ path: abi.encodePacked(DAI, poolFee, USDC, poolFee, WETH9), recipient: msg.sender, deadline: block.timestamp, amountIn: amountIn, amountOutMinimum: 0 }); // Executes the swap. amountOut = swapRouter.exactInput(params); `exactOutput` gets input `amountIn` for a fixed output `amountOut`, where `amountIn` must be less than or equal to `amountInMaximum`. // The parameter path is encoded as (tokenOut, fee, tokenIn/tokenOut, fee, tokenIn) // The tokenIn/tokenOut field is the shared token between the two pools used in the multiple pool swap. In this case USDC is the "shared" token. // For an exactOutput swap, the first swap that occurs is the swap which returns the eventual desired token. // In this case, our desired output token is WETH9 so that swap happens first, and is encoded in the path accordingly. ISwapRouter.ExactOutputParams memory params = ISwapRouter.ExactOutputParams({ path: abi.encodePacked(WETH9, poolFee, USDC, poolFee, DAI), recipient: msg.sender, deadline: block.timestamp, amountOut: amountOut, amountInMaximum: amountInMaximum }); // Executes the swap, returning the amountIn actually spent. amountIn = swapRouter.exactOutput(params); ### Providing Liquidity[#](https://docs.dodoex.io/en/developer/contracts/dodo-amm/dodo-amm-v2-v3-integration-guide#providing-liquidity) * Create a new position: Call `NonfungiblePositionManager.mint` to inject `amount0ToMint/amount1ToMint` in the specified fee tier's token0/token1 pool within the set range, mint liquidity, and generate the corresponding position NFT (tokenId). // Approve the position manager TransferHelper.safeApprove(DAI, address(nonfungiblePositionManager), amount0ToMint); TransferHelper.safeApprove(USDC, address(nonfungiblePositionManager), amount1ToMint); INonfungiblePositionManager.MintParams memory params = INonfungiblePositionManager.MintParams({ token0: DAI, token1: USDC, fee: poolFee, tickLower: TickMath.MIN_TICK, tickUpper: TickMath.MAX_TICK, amount0Desired: amount0ToMint, amount1Desired: amount1ToMint, amount0Min: 0, amount1Min: 0, recipient: msg.sender, deadline: block.timestamp }); // Note that the pool defined by DAI/USDC and fee tier 0.3% must already be created and initialized in order to mint (tokenId, liquidity, amount0, amount1) = nonfungiblePositionManager.mint(params); * Collect fees: The position NFT holder calls `NonfungiblePositionManager.collect`, setting `amount0Max/amount1Max` to `type(uint128).max` to withdraw all accumulated fees for the position at once, and specify the recipient address via `recipient`. // Caller must own the ERC721 position // Call to safeTransfer will trigger `onERC721Received` which must return the selector else transfer will fail nonfungiblePositionManager.safeTransferFrom(msg.sender, address(this), tokenId); // set amount0Max and amount1Max to uint256.max to collect all fees // alternatively can set recipient to msg.sender and avoid another transaction in `sendToOwner` INonfungiblePositionManager.CollectParams memory params = INonfungiblePositionManager.CollectParams({ tokenId: tokenId, recipient: msg.sender, amount0Max: type(uint128).max, amount1Max: type(uint128).max }); (amount0, amount1) = nonfungiblePositionManager.collect(params); * Decrease liquidity: The position NFT holder calls `NonfungiblePositionManager.decreaseLiquidity` to reduce `liquidity` to `newLiquidity`, removing liquidity from the position. INonfungiblePositionManager.DecreaseLiquidityParams memory params = INonfungiblePositionManager.DecreaseLiquidityParams({ tokenId: tokenId, liquidity: newLiquidity, amount0Min: 0, amount1Min: 0, deadline: block.timestamp }); nonfungiblePositionManager.decreaseLiquidity(params); * Increase liquidity: The position NFT holder calls `NonfungiblePositionManager.increaseLiquidity` to add liquidity to `tokenId` while keeping the original price range and fee tier unchanged. INonfungiblePositionManager.IncreaseLiquidityParams memory params = INonfungiblePositionManager.IncreaseLiquidityParams({ tokenId: tokenId, amount0Desired: amountAdd0, amount1Desired: amountAdd1, amount0Min: 0, amount1Min: 0, deadline: block.timestamp }); (liquidity, amount0, amount1) = nonfungiblePositionManager.increaseLiquidity(params); --- # DuneAnalytics - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) DuneAnalytics ============= 通过[Dune Analytics](https://dune.com/home) ,链上数据分析师可以快速查询与DODO相关的数据。以下是通过Dune Analytics可获取到的部分数据: 1. 基于以太坊、BSC、Polygon和Arbitrum上的DODO交易API构建的交易数据 2. 所有类型的DODO池的交易数据 3. 其他参考数据 这些数据允许分析师在构建DEX或DeFi平台的仪表盘分析时,快捷地引用有关DODO的信息。 您可以在[DODO目录](https://github.com/duneanalytics/spellbook) 下访问到以下内容,这是SpellBook项目中的一部分: * `aggregator_trades`:来自DODO交易API的所有交易数据 * `pool_trades`:来自所有类型的DODO池的所有交易数据 * `trades`:来自DODO DEX的所有类型的交易数据 分析师可以通过以下字段直接从**dex.trends**查询更多DODO数据: * `blockchain`:目前支持'ethereum'和'bnb' * `project`:应为'DODO' * `version` * `'0'`,适用于DODO交易API * `'1'`,适用于DODO标准池 * `'2_dvm'`,适用于DODO单币种池 * `'2_dsp'`,适用于DODO锚定池 * `'2_dpp'`,适用于DODO做市商池 更多详细信息,请参阅[SpellBook文档](https://spellbook-docs.dune.com/#!/model/model.spellbook.dodo_trades) 。 ### 一些DODO相关的Dune仪表盘[#](https://docs.dodoex.io/zh/developer/data/duneanalytics#yi-xie-dodoxiang-guan-de-duneyi-biao-pan) * [DODO Ethereum 分析](https://dune.com/dodoex/dodoex-ethereum-analysis) * [DODO BNBChain 分析](https://dune.com/dodoex/dodoex-bnbchain-analysis) * [DODO Polygon 分析](https://dune.com/dodoex/dodoex-polygon-analysis) * [DODO 交易](https://dune.com/owen05/dodo-trades) * [DODO 池](https://dune.com/owen05/dodo-pools) _更多内容即将推出..._ --- # subgraph - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 子图[#](https://docs.dodoex.io/zh/developer/data/subgraph#zi-tu) --------------------------------------------------------------- DODO 使用 Subgraphs 提供与在区块链上查询合约相关的事件和数据。这些子图可以在 thegraph.com 查看,链接为 [DODO](https://thegraph.com/explorer?search=dodo&orderBy=Query+Count&orderDirection=desc) 。 有关这些端点的更多信息,请查看以下链接: [DODOEX V2 Subgraph](https://github.com/DODOEX/dodoex_v2_subgraph) [Subgraph Query](https://docs.dodoex.io/zh/developer/developers-portal/api/web3-data/subgraph-data) 介绍[#](https://docs.dodoex.io/zh/developer/data/subgraph#jie-shao) ------------------------------------------------------------------ ### 交易历史[#](https://docs.dodoex.io/zh/developer/data/subgraph#jiao-yi-li-shi) * 每个 OrderHistory 事件都由 DODOProxy 合约的执行触发。如果交易被路由到 DODO 的交易池,则对底层池触发的事件将被忽略,以避免重复日志记录。 * 如果交易并非来自 DODOProxy,则会记录底层池触发的交易事件。 ### 交易[#](https://docs.dodoex.io/zh/developer/data/subgraph#jiao-yi) * 每个交易事件都来自 DODO 平台上的智能合约。 ### 交易池信息[#](https://docs.dodoex.io/zh/developer/data/subgraph#jiao-yi-chi-xin-xi) * 按交易对实时跟踪池状态 * 请注意,VIRTUAL 类型的池仅为统计目的而创建,实际并不存在。 使用示例[#](https://docs.dodoex.io/zh/developer/data/subgraph#shi-yong-shi-li) --------------------------------------------------------------------------- 检索换币记录: { swaps(where:{pair:"0xc9f93163c99695c6526b799ebca2207fdf7d61ad"},first:10){ hash from to fromToken{id} toToken{id} amountIn amountOut } } 查询用户信息: { user(id:"0x8982a82a77eaf1cd6f490b67ad982304ecc590af"){ id txCount tradingRewardRecieved } } 按日或按小时检索池状态: { pairDayDatas(first:100,orderBy:date,orderDirection:desc){ date volumeBase volumeQuote feeBase feeQuote baseToken{ symbol } quoteToken{ symbol } } }JSON 检索众筹活动状态: { crowdPoolingDayDatas{ date crowdPooling { id creator baseToken{ symbol } quoteToken{ symbol } } investedQuote investCount newcome poolQuote } } --- # DODO AMM V2/V3 集成指南 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) DODO AMM V2/V3 集成指南 =================== DODO AMM 派生自 Uniswap AMM。当前,DODO AMM 池已经聚合到 DODO 路由器中,报价可以通过 DODO API 查询。有关 DODO API 的详细信息,请参考:[https://docs.dodoex.io/zh/developer/developers-portal/api](https://docs.dodoex.io/zh/developer/developers-portal/api) * DODO AMM V2:基于 AMM V2 派生,增加可调交易费率 `feeRate`。 * DODO AMM V3:基于 AMM V3,增加对 0.01% 费率档的支持、更强的路径组合能力、SmartTrade 聚合机制等。 V2 更新与集成[#](https://docs.dodoex.io/zh/developer/contracts/dodo-amm/dodo-amm-v2-v3-integration-guide#v2-geng-xin-yu-ji-cheng) ----------------------------------------------------------------------------------------------------------------------------- 在原有 AMM V2 池创建基础上新增交易费参数 `feeRate`。池创建后交易费不可修改。 [**UniswapV2Factory**](https://github.com/DODOEX/Uniswap-v2-core/blob/feat/protocol-fee/contracts/UniswapV2Factory.sol) 新池创建盐生成参数:`token0`、`token1`、`feeRate` 对 `feeRate` 的设置范围为 0 - 10000,单位为 1/10000,例如 `feeRate = 30` 表示 `30 / 10000 = 0.003` init\_code\_hash: `0x2ebf1082215ab683deab4ee8ff50d42205db2059829b641717ab3f61f18d481a` function createPair(address tokenA, address tokenB, uint256 feeRate) external returns (address pair) { require(tokenA != tokenB, 'UniswapV2: IDENTICAL_ADDRESSES'); (address token0, address token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); require(feeRate >= 0 && feeRate <= 10000, 'UniswapV2: FEE_RATE_OVERFLOW'); require(token0 != address(0), 'UniswapV2: ZERO_ADDRESS'); require(getPair[token0][token1][feeRate] == address(0), 'UniswapV2: PAIR_EXISTS'); // 单次检查即可 bytes memory bytecode = type(UniswapV2Pair).creationCode; bytes32 salt = keccak256(abi.encodePacked(token0, token1, feeRate)); assembly { pair := create2(0, add(bytecode, 32), mload(bytecode), salt) } IUniswapV2Pair(pair).initialize(token0, token1); IUniswapV2Pair(pair).setFeeRate(feeRate); getPair[token0][token1][feeRate] = pair; getPair[token1][token0][feeRate] = pair; // 反向方向填充映射 allPairs.push(pair); emit PairCreated(token0, token1, pair, feeRate, allPairs.length); } [**UniswapV2Pair**](https://github.com/DODOEX/Uniswap-v2-core/blob/feat/protocol-fee/contracts/UniswapV2Pair.sol) 交换函数在 `feeRate` 之后增加了有效余额的计算。 uint balance0Adjusted = balance0.mul(10000).sub(amount0In.mul(feeRate)); uint balance1Adjusted = balance1.mul(10000).sub(amount1In.mul(feeRate)); [**UniswapV2Router**](https://github.com/DODOEX/Uniswap-v2-periphery/blob/feat/protocol-fee/contracts/interfaces/IUniswapV2Router02.sol) 函数接口增加交易费参数 `feeRate`。 pragma solidity >=0.6.2; pragma experimental ABIEncoderV2; struct RemoveLiquidityParams { address tokenA; address tokenB; uint256 fee; uint liquidity; uint amountAMin; uint amountBMin; address to; uint deadline; bool approveMax; uint8 v; bytes32 r; bytes32 s; } struct RemoveLiquidityETHParams { address token; uint256 fee; uint liquidity; uint amountTokenMin; uint amountETHMin; address to; uint deadline; bool approveMax; uint8 v; bytes32 r; bytes32 s; } interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint256 fee, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint256 fee, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint256 fee, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint256 fee, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( RemoveLiquidityParams calldata params ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( RemoveLiquidityETHParams calldata params ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, uint256[] calldata fees, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, uint256[] calldata fees, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, uint256[] calldata fees, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, uint256[] calldata fees, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, uint256[] calldata fees, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, uint256[] calldata fees, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut, uint256 fee) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut, uint256 fee) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path, uint256[] calldata fees) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path, uint256[] calldata fees) external view returns (uint[] memory amounts); } interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint256 fee, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint256 fee, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, uint256[] calldata fees, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, uint256[] calldata fees, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, uint256[] calldata fees, address to, uint deadline ) external; } ### 执行交易[#](https://docs.dodoex.io/zh/developer/contracts/dodo-amm/dodo-amm-v2-v3-integration-guide#zhi-xing-jiao-yi) UniswapV2Router 提供了多种交易方法,可以根据需要进行选择(如 `swapExactTokensForTokens` 等)。 ### 提供流动性[#](https://docs.dodoex.io/zh/developer/contracts/dodo-amm/dodo-amm-v2-v3-integration-guide#ti-gong-liu-dong-xing) 使用 UniswapV2Router 向池中添加流动性。对于 ERC-20/ERC-20 对的流动性添加,请使用 `addLiquidity`。如涉及 ETH 流动性,请使用 `addLiquidityETH`。 function addLiquidity( address tokenA, address tokenB, uint256 fee, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint256 fee, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); V3 更新与集成[#](https://docs.dodoex.io/zh/developer/contracts/dodo-amm/dodo-amm-v2-v3-integration-guide#v3-geng-xin-yu-ji-cheng) ----------------------------------------------------------------------------------------------------------------------------- 在原有 AMM V3 的基础上新增 0.01% 的费率档,提供四个可选档:0.01%、0.05%、0.3%、1%。交易费在池创建后不可更改。 feeAmountTickSpacing: 100 - 1, 500 - 10, 3000 - 60, 10000 - 200 constructor() { owner = msg.sender; emit OwnerChanged(address(0), msg.sender); feeAmountTickSpacing[500] = 10; emit FeeAmountEnabled(500, 10); feeAmountTickSpacing[3000] = 60; emit FeeAmountEnabled(3000, 60); feeAmountTickSpacing[10000] = 200; emit FeeAmountEnabled(10000, 200); } ### 执行交易[#](https://docs.dodoex.io/zh/developer/contracts/dodo-amm/dodo-amm-v2-v3-integration-guide#zhi-xing-jiao-yi) * 单跳交换:调用 `swapRouter.exactInputSingle` 或 `swapRouter.exactOutputSingle` 通过指定费率档的 token0/token1 池进行交换(通过单一池)。 `exactInputSingle` 会输出固定输入量 `amountIn` 对应的输出量 `amountOut`,其中 `amountOut` 必须大于或等于 `amountOutMinimum`。 // Naively set amountOutMinimum to 0. In production, use an oracle or other data source to choose a safer value for amountOutMinimum. // We also set the sqrtPriceLimitx96 to be 0 to ensure we swap our exact input amount. ISwapRouter.ExactInputSingleParams memory params = ISwapRouter.ExactInputSingleParams({ tokenIn: DAI, tokenOut: WETH9, fee: poolFee, recipient: msg.sender, deadline: block.timestamp, amountIn: amountIn, amountOutMinimum: 0, sqrtPriceLimitX96: 0 }); // The call to `exactInputSingle` executes the swap. amountOut = swapRouter.exactInputSingle(params); `exactOutputSingle` gets input `amountIn` for a fixed output `amountOut`, where `amountIn` must be less than or equal to `amountInMaximum`. ISwapRouter.ExactOutputSingleParams memory params = ISwapRouter.ExactOutputSingleParams({ tokenIn: DAI, tokenOut: WETH9, fee: poolFee, recipient: msg.sender, deadline: block.timestamp, amountOut: amountOut, amountInMaximum: amountInMaximum, sqrtPriceLimitX96: 0 }); // Executes the swap returning the amountIn needed to spend to receive the desired amountOut. amountIn = swapRouter.exactOutputSingle(params); * Multi-hop Swap: Call `swapRouter.exactInput` or `swapRouter.exactOutput` to swap through a specified path (via multiple pools). `exactInput` gets output `amountOut` for a fixed input `amountIn`, where `amountOut` must be greater than or equal to `amountOutMinimum`. // Multiple pool swaps are encoded through bytes called a `path`. A path is a sequence of token addresses and poolFees that define the pools used in the swaps. // The format for pool encoding is (tokenIn, fee, tokenOut/tokenIn, fee, tokenOut) where tokenIn/tokenOut parameter is the shared token across the pools. // Since we are swapping DAI to USDC and then USDC to WETH9 the path encoding is (DAI, 0.3%, USDC, 0.3%, WETH9). ISwapRouter.ExactInputParams memory params = ISwapRouter.ExactInputParams({ path: abi.encodePacked(DAI, poolFee, USDC, poolFee, WETH9), recipient: msg.sender, deadline: block.timestamp, amountIn: amountIn, amountOutMinimum: 0 }); // Executes the swap. amountOut = swapRouter.exactInput(params); `exactOutput` gets input `amountIn` for a fixed output `amountOut`, where `amountIn` must be less than or equal to `amountInMaximum`. // The parameter path is encoded as (tokenOut, fee, tokenIn/tokenOut, fee, tokenIn) // The tokenIn/tokenOut field is the shared token between the two pools used in the multiple pool swap. In this case USDC is the "shared" token. // For an exactOutput swap, the first swap that occurs is the swap which returns the eventual desired token. // In this case, our desired output token is WETH9 so that swap happens first, and is encoded in the path accordingly. ISwapRouter.ExactOutputParams memory params = ISwapRouter.ExactOutputParams({ path: abi.encodePacked(WETH9, poolFee, USDC, poolFee, DAI), recipient: msg.sender, deadline: block.timestamp, amountOut: amountOut, amountInMaximum: amountInMaximum }); // Executes the swap, returning the amountIn actually spent. amountIn = swapRouter.exactOutput(params); ### 提供流动性[#](https://docs.dodoex.io/zh/developer/contracts/dodo-amm/dodo-amm-v2-v3-integration-guide#ti-gong-liu-dong-xing) * 创建新头寸:调用 `NonfungiblePositionManager.mint` 在设定范围内注入 `amount0ToMint/amount1ToMint` 到指定费率的 token0/token1 池中,铸造流动性,并生成相应的头寸 NFT(tokenId)。 // Approve the position manager TransferHelper.safeApprove(DAI, address(nonfungiblePositionManager), amount0ToMint); TransferHelper.safeApprove(USDC, address(nonfungiblePositionManager), amount1ToMint); INonfungiblePositionManager.MintParams memory params = INonfungiblePositionManager.MintParams({ token0: DAI, token1: USDC, fee: poolFee, tickLower: TickMath.MIN_TICK, tickUpper: TickMath.MAX_TICK, amount0Desired: amount0ToMint, amount1Desired: amount1ToMint, amount0Min: 0, amount1Min: 0, recipient: msg.sender, deadline: block.timestamp }); // Note that the pool defined by DAI/USDC and fee tier 0.3% must already be created and initialized in order to mint (tokenId, liquidity, amount0, amount1) = nonfungiblePositionManager.mint(params); * 收取费用:头寸 NFT 的持有者调用 `NonfungiblePositionManager.collect`,将 `amount0Max/amount1Max` 设置为 `type(uint128).max` 以一次性提取该头寸的所有累计费用,并通过 `recipient` 指定收款地址。 // Caller must own the ERC721 position // Call to safeTransfer will trigger `onERC721Received` which must return the selector else transfer will fail nonfungiblePositionManager.safeTransferFrom(msg.sender, address(this), tokenId); // set amount0Max and amount1Max to uint256.max to collect all fees // alternatively can set recipient to msg.sender and avoid another transaction in `sendToOwner` INonfungiblePositionManager.CollectParams memory params = INonfungiblePositionManager.CollectParams({ tokenId: tokenId, recipient: msg.sender, amount0Max: type(uint128).max, amount1Max: type(uint128).max }); (amount0, amount1) = nonfungiblePositionManager.collect(params); * 减少流动性:头寸 NFT 的持有者调用 `NonfungiblePositionManager.decreaseLiquidity` 将 `liquidity` 降低到 `newLiquidity`,从头寸中移除流动性。 INonfungiblePositionManager.DecreaseLiquidityParams memory params = INonfungiblePositionManager.DecreaseLiquidityParams({ tokenId: tokenId, liquidity: newLiquidity, amount0Min: 0, amount1Min: 0, deadline: block.timestamp }); nonfungiblePositionManager.decreaseLiquidity(params); * 增加流动性:头寸 NFT 的持有者调用 `NonfungiblePositionManager.increaseLiquidity` 为 `tokenId` 增加流动性,同时保持原有价格区间和费率档位不变。 INonfungiblePositionManager.IncreaseLiquidityParams memory params = INonfungiblePositionManager.IncreaseLiquidityParams({ tokenId: tokenId, amount0Desired: amountAdd0, amount1Desired: amountAdd1, amount0Min: 0, amount1Min: 0, deadline: block.timestamp }); (liquidity, amount0, amount1) = nonfungiblePositionManager.increaseLiquidity(params); --- # D3Pool - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) D3Pool ====== D3Pool includes D3MM and D3Maker. The D3MM contract is responsible for market makers' deposits and withdrawals of relevant assets, initiating borrowing and repayment operations with D3Vault, executing digital asset exchanges, and performing other important functionalities. It is also one of the core contracts of DODO V3. D3Maker is an integral part of the D3MM contract and is responsible for setting various parameter values and retrieving related parameters. --- # Periphery - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) Periphery ========= The Periphery includes D3MMFactory, D3MMLiquidationRouter, D3Oracle, D3Proxy and other contracts. These contracts are respectively used for creating the factory contract for D3MM, the liquidation routing contract for D3MM, the price oracle contract for DODO V3, and the proxy contract for DODO V3. Periphery contracts interact with D3Vault, multiple D3MM, and other contracts but are not considered part of the core. These contracts enhance user safety and clarity by providing alternative methods to access the core and supplying necessary external data to the core. They are separate from the core contracts, allowing for upgradability and replacement, making the entire contract architecture loosely coupled and flexible. --- # D3Vault - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) D3Vault ======= The D3Vault contract is responsible for handling user deposits and withdrawals of digital assets, providing liquidation services to debtors, and offering borrowing and repayment functionality to the market-making pool. It is one of the core contracts of DODO V3. Additionally, there are auxiliary contracts associated with D3Vault that assist in calculating user deposit limits, pool borrowing limits, borrowing interest rates, and other related functionalities. --- # DODO V3 Integration Guide - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) DODO V3 Integration Guide ========================= DODO V3 Deployed Contracts Addresses[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/dodo-v3-integration-guide#dodo-v3-deployed-contracts-addresses) -------------------------------------------------------------------------------------------------------------------------------------------------------------- This page contains all [v3 addresses](https://docs.dodoex.io/en/developer/contracts/dodo-v3/v3-contracts-address) . DODO V3 Subgraph Addresses[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/dodo-v3-integration-guide#dodo-v3-subgraph-addresses) ------------------------------------------------------------------------------------------------------------------------------------------ | Chain | Query URL | | --- | --- | | Arb | [https://api.studio.thegraph.com/proxy/46336/dodoex\_d3mm\_arbitrum/v0.0.2](https://api.studio.thegraph.com/proxy/46336/dodoex_d3mm_arbitrum/v0.0.2) | | Polygon | [https://api.studio.thegraph.com/query/46336/dodoex\_d3mm\_polygon/version/latest](https://api.studio.thegraph.com/query/46336/dodoex_d3mm_polygon/version/latest) | | ETH | [https://api.studio.thegraph.com/query/46336/dodoex\_d3mm\_eth/version/latest](https://api.studio.thegraph.com/query/46336/dodoex_d3mm_eth/version/latest) | | BSC | [https://api.thegraph.com/subgraphs/name/yongjun925/dodoex\_d3mm\_bsc](https://api.thegraph.com/subgraphs/name/yongjun925/dodoex_d3mm_bsc) | | Avax | [https://api.studio.thegraph.com/query/2860/dodoex\_d3mm\_avax/v0.0.2](https://api.studio.thegraph.com/query/2860/dodoex_d3mm_avax/v0.0.2) | | Optimism | [https://api.studio.thegraph.com/query/2860/dodoex\_d3mm\_optimism/v0.0.2](https://api.studio.thegraph.com/query/2860/dodoex_d3mm_optimism/v0.0.2) | Formula Explanation and Calculation Instructions[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/dodo-v3-integration-guide#formula-explanation-and-calculation-instructions) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Regarding routing, each DODO V3 can be regarded as a multi-asset pool, with each asset independently quoted in USD. For each asset, there are two curves: * bid curve (market maker buys,user sells) * ask curve (market maker sells,user buys) When a user requests to swap A token for B token, the actual price calculation is done as follows: swap A to VUSD + swap VUSD to B. VUSD is a virtual USD used solely for valuation purposes and does not represent an actual token. In both of the above steps, the swap curves are PMM curves, and the parameters within the PMM curves can be determined based on the market maker's set parameters and trading volume. By substituting these parameters into the PMM formula, the calculations can be performed. * For the ask curve of TokenA, TokenA → VUSD, the base is TokenA, and the quote is VUSD * For the bid curve of TokenA, VUSD → TokenA, the base is VUSD, and the quote is TokenA Furthermore, since the price upper and lower limits are set by the market maker, one side of the quoted tokens in either curve is the virtual token VUSD. Only real tokens can be bought or sold. Therefore, the curves always maintain R > 1, meaning B < B0. Consequently, there is no longer a need for Q, Q0, or related parameters, and the target does not need to be reset. In summary, for any PMM in v3, the required parameters are i, B0, B, and k. In v3, there are two swap methods: sellToken and buyToken. For the current routing version, we will focus only on the sellToken method. Based on the above analysis, the actual calculation process is as follows: fromToken → VUSD → toToken 1. We use PMMPricing.\_querySellQuote for fromToken’s bid curve 2. We use PMMPricing.\_querySellQuote for toToken’s ask curve It is important to note that, in order to reduce precision loss, all prices and amounts are calculated using a decimal of 1e18 during the calculation process. The fromAmount will be adjusted to an 18-digit amount during initialization, and the resulting toAmount, which is also 18 digits, will be adjusted to the decimal amount of the toToken at the end. Link to the trading code of the main pool:[https://github.com/DODOEX/dodo-v3/blob/main/contracts/DODOV3MM/D3Pool/D3Trading.sol](https://github.com/DODOEX/dodo-v3/blob/main/contracts/DODOV3MM/D3Pool/D3Trading.sol) Source code: function sellToken( address to, address fromToken, address toToken, uint256 fromAmount, uint256 minReceiveAmount, bytes calldata data ) external poolOngoing nonReentrant returns (uint256) { require(ID3Maker(state._MAKER_).checkHeartbeat(), Errors.HEARTBEAT_CHECK_FAIL); _updateCumulative(fromToken); _updateCumulative(toToken); (uint256 payFromAmount, uint256 receiveToAmount, uint256 vusdAmount, uint256 swapFee, uint256 mtFee) = querySellTokens(fromToken, toToken, fromAmount); require(receiveToAmount >= minReceiveAmount, Errors.MINRES_NOT_ENOUGH); _transferOut(to, toToken, receiveToAmount); // external call & swap callback IDODOSwapCallback(msg.sender).d3MMSwapCallBack(fromToken, fromAmount, data); // transfer mtFee to maintainer _transferOut(state._MAINTAINER_, toToken, mtFee); require( IERC20(fromToken).balanceOf(address(this)) - state.balances[fromToken] >= fromAmount, Errors.FROMAMOUNT_NOT_ENOUGH ); // record swap uint256 toTokenDec = IERC20Metadata(toToken).decimals(); _recordSwap(fromToken, toToken, vusdAmount, Types.parseRealAmount(receiveToAmount + swapFee, toTokenDec)); require(checkSafe(), Errors.BELOW_IM_RATIO); emit Swap(to, fromToken, toToken, payFromAmount, receiveToAmount, swapFee, mtFee, 0); return receiveToAmount; } /// @notice user could query sellToken result deducted swapFee, assign fromAmount /// @return payFromAmount fromToken's amount = fromAmount /// @return receiveToAmount toToken's amount /// @return vusdAmount fromToken bid vusd /// @return swapFee dodo takes the fee function querySellTokens( address fromToken, address toToken, uint256 fromAmount ) public view returns (uint256 payFromAmount, uint256 receiveToAmount, uint256 vusdAmount, uint256 swapFee, uint256 mtFee) { require(fromAmount > 1000, Errors.AMOUNT_TOO_SMALL); Types.RangeOrderState memory D3State = getRangeOrderState(fromToken, toToken); { uint256 fromTokenDec = IERC20Metadata(fromToken).decimals(); uint256 toTokenDec = IERC20Metadata(toToken).decimals(); uint256 fromAmountWithDec18 = Types.parseRealAmount(fromAmount, fromTokenDec); uint256 receiveToAmountWithDec18; ( , receiveToAmountWithDec18, vusdAmount) = PMMRangeOrder.querySellTokens(D3State, fromToken, toToken, fromAmountWithDec18); receiveToAmount = Types.parseDec18Amount(receiveToAmountWithDec18, toTokenDec); payFromAmount = fromAmount; } receiveToAmount = receiveToAmount > state.balances[toToken] ? state.balances[toToken] : receiveToAmount; uint256 swapFeeRate = D3State.fromTokenMMInfo.swapFeeRate + D3State.toTokenMMInfo.swapFeeRate; swapFee = DecimalMath.mulFloor(receiveToAmount, swapFeeRate); uint256 mtFeeRate = D3State.fromTokenMMInfo.mtFeeRate + D3State.toTokenMMInfo.mtFeeRate; mtFee = DecimalMath.mulFloor(receiveToAmount, mtFeeRate); return (payFromAmount, receiveToAmount - swapFee, vusdAmount, swapFee, mtFee); } From above, it can be seen that the core calculation is performed in the `querySellTokens` function of the `pmmRangeOrder` contract, which can be viewed in this link:[https://github.com/DODOEX/dodo-v3/blob/main/contracts/DODOV3MM/lib/PMMRangeOrder.sol](https://github.com/DODOEX/dodo-v3/blob/main/contracts/DODOV3MM/lib/PMMRangeOrder.sol) Source code: // use fromToken bid curve and toToken ask curve function querySellTokens( Types.RangeOrderState memory roState, address fromToken, address toToken, uint256 fromTokenAmount ) internal view returns (uint256 fromAmount, uint256 receiveToToken, uint256 vusdAmount) { // contruct fromToken state and swap to vUSD uint256 receiveVUSD; { PMMPricing.PMMState memory fromTokenState = _contructTokenState(roState, true, false); receiveVUSD = PMMPricing._querySellQuoteToken(fromTokenState, fromTokenAmount); receiveVUSD = receiveVUSD > fromTokenState.BLeft ? fromTokenState.BLeft : receiveVUSD; } // construct toToken state and swap from vUSD to toToken { PMMPricing.PMMState memory toTokenState = _contructTokenState(roState, false, true); receiveToToken = PMMPricing._querySellQuoteToken(toTokenState, receiveVUSD); receiveToToken = receiveToToken > toTokenState.BLeft ? toTokenState.BLeft : receiveToToken; } // oracle protect { uint256 oracleToAmount = ID3Oracle(roState.oracle).getMaxReceive(fromToken, toToken, fromTokenAmount); require(oracleToAmount >= receiveToToken, Errors.RO_ORACLE_PROTECTION); } return (fromTokenAmount, receiveToToken, receiveVUSD); } BLeft is: tokenState.BLeft = askOrNot ? tokenState.BMaxAmount - tokenMMInfo.cumulativeAsk : tokenState.BMaxAmount - tokenMMInfo.cumulativeBid; * PMMPricing.\_querySellQuoteToken([https://github.com/DODOEX/dodo-v3/blob/main/contracts/DODOV3MM/lib/PMMPricing.sol](https://github.com/DODOEX/dodo-v3/blob/main/contracts/DODOV3MM/lib/PMMPricing.sol) function _querySellQuoteToken(PMMState memory state, uint256 payQuoteAmount) internal pure returns (uint256 receiveBaseAmount) { receiveBaseAmount = _RAboveSellQuoteToken(state, payQuoteAmount); } function _RAboveSellQuoteToken(PMMState memory state, uint256 payQuoteAmount) internal pure returns ( uint256 receiveBaseToken ) { return DODOMath._SolveQuadraticFunctionForTrade( state.B0, state.B, payQuoteAmount, DecimalMath.reciprocalFloor(state.i), state.K ); } PMMState Construction[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/dodo-v3-integration-guide#pmmstate-construction) -------------------------------------------------------------------------------------------------------------------------------- The formula is very clear, so the question becomes: How to construct the pmmState for the bid curve of fromToken, and how to construct the pmmState for the ask curve of toToken. Based on this, the four parameters are defined as follows: * i = lowest price set by market maker, readable * B0 = calculated based on i, amount (maximum sell quantity set by the market maker, readable), p\_up (highest price set by the market maker, readable), and k. * B = B0 - cumulativeAmount (current traded volume, readable) * k = The k set by the market maker, readable The derivation of the formula for B0 is: Pup\=i(ONE−k+k(B0B0−A)2)P\_{up} = i(ONE-k+k(\\frac{B\_{0}}{B\_{0}-A})^{2}) Pup+i∗k−ONE∗ii∗k\=(B0B0−A)2\\frac {P\_{up} + i \* k - ONE\* i }{i\*k} = (\\frac{B\_{0}}{B\_{0}-A})^{2} Pup+i∗k−ONE∗ii∗k\=(B0B0−A)\\sqrt{\\frac{P\_{up} + i \* k - ONE \* i}{i \* k} }= (\\frac{B\_{0}}{B\_{0}-A}) (B0−A)Pup+i∗k−ONE∗ii∗k\=B0(B\_{0}-A)\\sqrt{\\frac{P\_{up} + i \* k - ONE \* i}{i \* k} }= B\_{0} B0\=A+APup+i∗k−ONE∗ii∗k−1B\_{0}= A + \\frac{A}{\\sqrt{\\frac{P\_{up} + i \* k - ONE \* i}{i \* k} }-1} B_up = i(ONE - k + k*(B0 / B0 - amount)^2), record amount = A (B_up + i*k - ONE *i) / i*k = (B0 / B0 - A)^2 B0 = A + A / (sqrt((B_up + i*k - ONE*i) / i*k) - 1) The corresponding code is: // P_up = i(1 - k + k*(B0 / B0 - amount)^2), record amount = A // (P_up + i*k - i) / i*k = (B0 / (B0 - A))^2 // B0 = A + A / (sqrt((P_up + i*k - i) / i*k) - 1) // i = priceDown function _calB0WithPriceLimit( uint256 priceUp, uint256 k, uint256 i, uint256 amount ) internal pure returns (uint256 baseTarget) { // (P_up + i*k - i) // temp1 = PriceUp + DecimalMath.mul(i, k) - i // temp1 price // i*k // temp2 = DecimalMath.mul(i, k) // temp2 price // (P_up + i*k - i)/i*k // temp3 = DecimalMath(temp1, temp2) // temp3 ONE // temp4 = sqrt(temp3 * ONE) // temp4 ONE // temp5 = temp4 - ONE // temp5 ONE // B0 = amount + DecimalMath.div(amount, temp5) // B0 amount if (k == 0) { baseTarget = amount; } else { uint256 temp1 = priceUp * ONE + i * k - i * ONE; uint256 temp2 = i * k; uint256 temp3 = DecimalMath.div(temp1, temp2); uint256 temp5 = DecimalMath.sqrt(temp3) - ONE; require(temp5 > 0, Errors.RO_PRICE_DIFF_TOO_SMALL); baseTarget = amount + DecimalMath.div(amount, temp5); } } Oracle Protection[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/dodo-v3-integration-guide#oracle-protection) ------------------------------------------------------------------------------------------------------------------------ * Call Oracle's priceSources and getPrice functions. The function parameters are both token addresses, to retrieve the following parameters for each token: * isWhiteListed, equivalent to isFeasible * priceTolerance (unit is 1e18) * priceDecimal * tokenDecimal * token price, referred to as tokenPrice * The formula for calculating maxReceive off the chain is: DecimalMath.div( (fromAmount * getPrice(fromToken)) / getPrice(toToken), DecimalMath.mul(fromTlr, toTlr) ); //其中, fromTlr = fromtoken的priceTolerance, toTlr = toToken的priceTolerance // DecimalMath.mul(a, b) = a * b / (10**18) // DecimalMath.div(a, b) = a * (10**18) / b; Fees[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/dodo-v3-integration-guide#fees) ---------------------------------------------------------------------------------------------- In the new v3, a transaction will incur a fee, which is a certain percentage of the toToken. The fee is divided into two parts: lpFee, which is collected by the liquidity provider, and mtFee, which is collected by DODO. These fees are collectively recorded as swapFeeRate, where swapFee = lpFee + mtFee, and swapFeeRate = lpFeeRate + mtFeeRate. To facilitate adjustments by liquidity providers, the swapFee parameter is tied to each token. Each token has a swapFeeRate, and during the transaction process, the total fee rate for the transaction from token A to token B is calculated as the sum of token A's swapFeeRate and token B's swapFeeRate. The feeRate unit is 1e18, which means that if swapFeeRate = 1e17, the actual fee rate is 10%. Based on the code in Part 1, in D3MM, the receiveAmount is obtained by comparing querySellTokens with the actual balance of the pool. The transaction fee collected is swapFee = receiveAmount \* (swapFeeRate\_A + swapFeeRate\_B). The actual receiveAmount that the user can receive is receiveAmount' = receiveAmount - swapFee. Collateral Rate Check[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/dodo-v3-integration-guide#collateral-rate-check) -------------------------------------------------------------------------------------------------------------------------------- For pools that borrow funds from the vault, there is a collateral ratio check when swapping. This check ensures that the pool's collateral ratio remains healthy after the transaction occurs. Vault code:[https://github.com/DODOEX/dodo-v3/tree/main/contracts/DODOV3MM/D3Vault](https://github.com/DODOEX/dodo-v3/tree/main/contracts/DODOV3MM/D3Vault) The original code for collateral ratio check: require(checkSafe(), Errors.BELOW_IM_RATIO); This check occurs in the vault because only the vault has a complete record of pool borrowings. The specific implementation is as follows: function checkSafe(address pool) public view returns (bool) { return getCollateralRatio(pool) > 1e18 + IM; } function getCollateralRatio(address pool) public view returns (uint256) { uint256 collateral = 0; uint256 debt = 0; for (uint256 i; i < tokenList.length; i++) { address token = tokenList[i]; AssetInfo storage info = assetInfo[token]; (uint256 balance, uint256 borrows) = getBalanceAndBorrows(pool, token); uint256 price = ID3Oracle(_ORACLE_).getPrice(token); if (balance >= borrows) { collateral += min(balance - borrows, info.maxCollateralAmount).mul(info.collateralWeight).mul(price); } else { debt += (borrows - balance).mul(info.debtWeight).mul(price); } } return _ratioDiv(collateral, debt); } function _ratioDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0 && b == 0) { return 1e18; } else if (a == 0 && b != 0) { return 0; } else if (a != 0 && b == 0) { return type(uint256).max; } else { return a.div(b); } } The core is evident in the "getBalanceAndBorrows" section of the code: function getBalanceAndBorrows(address pool, address token) public view returns (uint256, uint256) { uint256 balance = ID3MM(pool).getTokenReserve(token); uint256 borrows = getPoolBorrowAmount(pool, token); return (balance, borrows); } The swap process only changes the balance, not the borrows. When swapping from A to B, the balance of A token decreases and the balance of B token increases. Therefore, you can use the getBalanceAndBorrows function to retrieve the balance and borrows beforehand, and then construct checks based on the getCollateralRatio method. Get Parameters[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/dodo-v3-integration-guide#get-parameters) ------------------------------------------------------------------------------------------------------------------ After organizing the above process, for each token, the following parameters need to be read: * swapFeeRate * bid: * i\_bid(p\_down\_bid) * p\_up\_bid * amount\_bid * cumulativeBid * kBid * ask: * i\_ask(p\_down\_ask) * p\_up\_ask * amount\_ask * cumulativeAsk * kAsk In v3, you can request the following two methods to retrieve all information about a token: function getTokenMMPriceInfoForRead( address token ) external view returns (uint256 askDownPrice, uint256 askUpPrice, uint256 bidDownPrice, uint256 bidUpPrice, uint256 swapFee) function getTokenMMOtherInfoForRead( address token ) external view returns ( uint256 askAmount, uint256 bidAmount, uint256 kAsk, uint256 kBid, uint256 cumulativeAsk, uint256 cumulativeBid ) For edge condition evaluation, the parameters to be obtained are: * vault tokenlist // D3Vault.sol function getTokenList() external view returns (address[] memory) { * borrowing records // D3Vault.sol function getBalanceAndBorrows(address pool, address token) public view returns (uint256 balance, uint256 borrow) * The balance of each token in this pool (note that the tokens here may not necessarily be the same as the tokens in the token list of the vault). // D3MM.sol function getTokenReserve(address token) public view returns(uint256) V3 pool also provides two read functions to obtain token list. These functions are available in the feature-version branch, which is the deployed version:[https://github.com/DODOEX/dodo-v3/blob/feature-version/contracts/DODOV3MM/D3Pool/D3MM.sol](https://github.com/DODOEX/dodo-v3/blob/feature-version/contracts/DODOV3MM/D3Pool/D3MM.sol) * Get all token addresses for which the market maker has provided prices, i.e., all tokens that support price inquiries. function getPoolTokenlist() external view returns(address[] memory) * Get all token addresses that the market maker has deposited function getDepositedTokenList() external view returns (address[] memory) --- # 如何找到所有的DODO池? - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 如何找到所有的DODO池? ============= 您可以访问 [https://info.dodoex.io/all](https://info.dodoex.io/all) 来查找所有的DODO池/交易对。 如果您想获取更多信息或构建自定义数据分析工具,请阅读以下文档。 ### DODO池类型[#](https://docs.dodoex.io/zh/developer/data/how-to-find-all-the-dodo-pools#dodochi-lei-xing) DODO有4种类型的池子,其中一个来自DODO V1,另外三个来自DODO V2。 DODO V1: DODO DODO V2: 售卖机池、稳定币池、私募池 对于每种类型的池子,都有一个对应的工厂合约负责管理池子的创建和注册。 您可以通过工厂合约获取池子的信息,并通过索引工厂合约发出的事件来构建子图。 我们还为您准备了一个已构建好的子图可供查询。请参考 [subgraph](https://docs.dodoex.io/zh/developer/data/contract-data/subgraph) 。 ### DODO V1[#](https://docs.dodoex.io/zh/developer/data/how-to-find-all-the-dodo-pools#dodo-v1) 池子合约:DODO 工厂合约:DODOZoo // DODOZoo.sol // newBorn: 新池子地址 event DODOBirth(address newBorn, address baseToken, address quoteToken); // 获取 baseToken-quoteToken 的交易对 function getDODO(address baseToken, address quoteToken) external view returns (address); // 获取所有的 DODO V1 池子 function getDODOs() external view returns (address[] memory); ### 售卖机池[#](https://docs.dodoex.io/zh/developer/data/how-to-find-all-the-dodo-pools#shou-mai-ji-chi) 池子合约:DVM 工厂合约:DVMFactory // DVMFactory.sol // 当创建一个DVM池子时触发 event NewDVM( address baseToken, address quoteToken, address creator, address dvm ); // 获取 baseToken-quoteToken 的DVM池子 function getDODOPool(address baseToken, address quoteToken) external view returns (address[] memory machines); // 获取 token0-token1 和 token1-token0 的DVM池子 function getDODOPoolBidirection(address token0, address token1) external view returns (address[] memory baseToken0Machines, address[] memory baseToken1Machines); // 获取用户创建的DVM池子 function getDODOPoolByUser(address user) external view returns (address[] memory machines); ### 私募池[#](https://docs.dodoex.io/zh/developer/data/how-to-find-all-the-dodo-pools#si-mu-chi) 池子合约:DPP 工厂合约:DPPFactory // DPPFactory // 当创建一个DPP池子时触发 event NewDPP( address baseToken, address quoteToken, address creator, address dpp ); // 获取 baseToken-quoteToken 的DPP池子 function getDODOPool(address baseToken, address quoteToken) external view returns (address[] memory pools); // 获取 token0-token1 和 token1-token0 的DPP池子 function getDODOPoolBidirection(address token0, address token1) external view returns (address[] memory baseToken0Pool, address[] memory baseToken1Pool); // 获取用户创建的DPP池子 function getDODOPoolByUser(address user) external view returns (address[] memory pools); ### 稳定币池[#](https://docs.dodoex.io/zh/developer/data/how-to-find-all-the-dodo-pools#wen-ding-bi-chi) 池子合约:DSP 工厂合约:DSPFactory // DSPFactory // 当创建一个DSP池子时触发 event NewDSP( address baseToken, address quoteToken, address creator, address DSP ); // 获取 baseToken-quoteToken 的DSP池子 function getDODOPool(address baseToken, address quoteToken) external view returns (address[] memory machines); // 获取 token0-token1 和 token1-token0 的DSP池子 function getDODOPoolBidirection(address token0, address token1) external view returns (address[] memory baseToken0Machines, address[] memory baseToken1Machines); // 获取用户创建的DSP池子 function getDODOPoolByUser(address user) external view returns (address[] memory machines); ### 工厂合约地址[#](https://docs.dodoex.io/zh/developer/data/how-to-find-all-the-dodo-pools#gong-chang-he-yue-di-zhi) #### Ethereum[#](https://docs.dodoex.io/zh/developer/data/how-to-find-all-the-dodo-pools#ethereum) | 合约名称 | 地址 | | --- | --- | | DODOZoo | 0x3A97247DF274a17C59A3bd12735ea3FcDFb49950 | | DVMFactory | 0x72d220cE168C4f361dD4deE5D826a01AD8598f6C | | DPPFactory | 0x5336edE8F971339F6c0e304c66ba16F1296A2Fbe | | DSPFactory | 0x6fdDB76c93299D985f4d3FC7ac468F9A168577A4 | ### BSC[#](https://docs.dodoex.io/zh/developer/data/how-to-find-all-the-dodo-pools#bsc) | 合约名称 | 地址 | | --- | --- | | DODOZoo | 0xCA459456a45e300AA7EF447DBB60F87CCcb42828 | | DVMFactory | 0x790B4A80Fb1094589A3c0eFC8740aA9b0C1733fB | | DPPFactory | 0xd9CAc3D964327e47399aebd8e1e6dCC4c251DaAE | | DSPFactory | 0x0fb9815938Ad069Bf90E14FE6C596c514BEDe767 | ### Polygon[#](https://docs.dodoex.io/zh/developer/data/how-to-find-all-the-dodo-pools#polygon) | 合约名称 | 地址 | | --- | --- | | DODOZoo | 0x357c5E9cfA8B834EDcef7C7aAbD8F9Db09119d11 | | DVMFactory | 0x79887f65f83bdf15Bcc8736b5e5BcDB48fb8fE13 | | DPPFactory | 0xd24153244066F0afA9415563bFC7Ba248bfB7a51 | | DSPFactory | 0x43C49f8DD240e1545F147211Ec9f917376Ac1e87 | ### Arbitrum[#](https://docs.dodoex.io/zh/developer/data/how-to-find-all-the-dodo-pools#arbitrum) | 合约名称 | 地址 | | --- | --- | | DODOZoo | 0xBcC3401E16C25EaF4d3FeD632ce3288503883B1f | | DVMFactory | 0xDa4c4411c55B0785e501332354A036c04833B72b | | DPPFactory | 0xa6Cf3d163358aF376ec5e8B7Cc5e102a05FdE63D | | DSPFactory | 0xC8fE2440744dcd733246a4dB14093664DEFD5A53 | ### Optimism[#](https://docs.dodoex.io/zh/developer/data/how-to-find-all-the-dodo-pools#optimism) | 合约名称 | 地址 | | --- | --- | | DODOZoo | 0xC48936eFC01dB84aB15FE89C08E3b2b72853eece | | DVMFactory | 0x2B800DC6270726F7E2266cE8cD5A3F8436fe0B40 | | DPPFactory | 0xDb9C53F2cED34875685B607c97A61a65DA2F30a8 | | DSPFactory | 0x1f83858cD6d0ae7a08aB1FD977C06DABEcE6d711 | ### Avalanche[#](https://docs.dodoex.io/zh/developer/data/how-to-find-all-the-dodo-pools#avalanche) | 合约名称 | 地址 | | --- | --- | | DODOZoo | 0x8aB2D334cE64B50BE9Ab04184f7ccBa2A6bb6391 | | DVMFactory | 0xfF133A6D335b50bDAa6612D19E1352B049A8aE6a | | DPPFactory | 0xb7865a5ceE051d35B09A48b624D7057d3362655a | | DSPFactory | 0x2b0d94Eb7A63B8a2909dE1CB3951ecF7Ae76D2fE | ### Moonriver[#](https://docs.dodoex.io/zh/developer/data/how-to-find-all-the-dodo-pools#moonriver) | 合约名称 | 地址 | | --- | --- | | DODOZoo | 0x02fCB21dc1cf221939C1d4277fB54016b5d32bC7 | | DVMFactory | 0x738Ebf387A0CE0eb46b0eF8Fa5DEa2EaE6B1Df51 | | DPPFactory | 0xd0e1aA51dF0896c126Ce6F8A064E551e0DD3D39b | | DSPFactory | 0xB76de21f04F677f07D9881174a1D8E624276314C | ### Aurora[#](https://docs.dodoex.io/zh/developer/data/how-to-find-all-the-dodo-pools#aurora) | 合约名称 | 地址 | | --- | --- | | DODOZoo | 0xf50BDc9E90B7a1c138cb7935071b85c417C4cb8e | | DVMFactory | 0x5515363c0412AdD5c72d3E302fE1bD7dCBCF93Fe | | DPPFactory | 0x40672211D4310ad71daDc8cDE7Aa3Fb90d420855 | | DSPFactory | 0xbe9a66e49503e84ae59a4d0545365AABedf33b40 | ### Boba[#](https://docs.dodoex.io/zh/developer/data/how-to-find-all-the-dodo-pools#boba) | 合约名称 | 地址 | | --- | --- | | DODOZoo | 0x69f52AC40185A2A005D49114F0B77b7bA856F0a0 | | DVMFactory | 0x2F2f9460500F27db68AAfBfa0472cEDDb168a5a6 | | DPPFactory | 0x3a60A76aCAe8feeC74D6B5b665d4DBaab2abC406 | | DSPFactory | 0xfF133A6D335b50bDAa6612D19E1352B049A8aE6a | ### OKChain[#](https://docs.dodoex.io/zh/developer/data/how-to-find-all-the-dodo-pools#okchain) | 合约名称 | 地址 | | --- | --- | | DODOZoo | 0x357c5E9cfA8B834EDcef7C7aAbD8F9Db09119d11 | | DVMFactory | 0x9aE501385Bc7996A2A4a1FBb00c8d3820611BCB5 | | DPPFactory | 0xfdD51aAba2f949195a460121aA3f2D392d2524A9 | | DSPFactory | 0x44D5dF24d5Ef52A791D6436Fa45A8D426f6de34e | --- # D3Pool - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) D3Pool ====== D3Pool包括D3MM和D3Maker。 D3MM合约负责市场制造商的资产存款和提款,与D3Vault发起借贷和还款操作,执行数字资产交换和其他重要功能。它也是DODO V3的核心合约之一。 D3Maker是D3MM合约的一个重要组成部分,负责设置各种参数值和检索相关参数。 --- # D3Vault - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) D3Vault ======= D3Vault合约负责处理用户的数字资产存款和提款,为债务人提供清算服务,并向市场做市池提供借贷和还款功能。它是DODO V3的核心合约之一。此外,与D3Vault相关的辅助合约有助于计算用户存款限额、池借款限额、借款利率和其他相关功能。 --- # 外围 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 外围 == 外围包括D3MMFactory、D3MMLiquidationRouter、D3Oracle、D3Proxy等合约。这些合约分别用于创建D3MM的工厂合约、D3MM的清算路由合约、DODO V3的价格预言机合约以及DODO V3的代理合约。 外围合约与D3Vault、多个D3MM等合约进行交互,但不被视为核心的一部分。这些合约通过提供替代方法来访问核心,以及向核心提供必要的外部数据,从而增强用户的安全性和清晰度。它们与核心合约分开,允许升级和替换,使整个合约架构解耦并灵活。 --- # DODO V3 集成指南 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) DODO V3 集成指南 ============ DODO V3 部署的合约地址[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/dodo-v3-integration-guide#dodo-v3-bu-shu-de-he-yue-di-zhi) ------------------------------------------------------------------------------------------------------------------------------------ 本页面包含所有[v3地址](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/v3-contracts-address) 。 DODO V3 子图地址[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/dodo-v3-integration-guide#dodo-v3-zi-tu-di-zhi) ---------------------------------------------------------------------------------------------------------------------- | 链 | 查询URL | | --- | --- | | Arb | [https://api.studio.thegraph.com/proxy/46336/dodoex\_d3mm\_arbitrum/v0.0.2](https://api.studio.thegraph.com/proxy/46336/dodoex_d3mm_arbitrum/v0.0.2) | | Polygon | [https://api.studio.thegraph.com/query/46336/dodoex\_d3mm\_polygon/version/latest](https://api.studio.thegraph.com/query/46336/dodoex_d3mm_polygon/version/latest) | | ETH | [https://api.studio.thegraph.com/query/46336/dodoex\_d3mm\_eth/version/latest](https://api.studio.thegraph.com/query/46336/dodoex_d3mm_eth/version/latest) | | BSC | [https://api.thegraph.com/subgraphs/name/yongjun925/dodoex\_d3mm\_bsc](https://api.thegraph.com/subgraphs/name/yongjun925/dodoex_d3mm_bsc) | | Avax | [https://api.studio.thegraph.com/query/2860/dodoex\_d3mm\_avax/v0.0.2](https://api.studio.thegraph.com/query/2860/dodoex_d3mm_avax/v0.0.2) | | Optimism | [https://api.studio.thegraph.com/query/2860/dodoex\_d3mm\_optimism/v0.0.2](https://api.studio.thegraph.com/query/2860/dodoex_d3mm_optimism/v0.0.2) | 公式解释和计算说明[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/dodo-v3-integration-guide#gong-shi-jie-shi-he-ji-suan-shuo-ming) ------------------------------------------------------------------------------------------------------------------------------------ 关于路由,每个DODO V3都可以看作是一个多资产池,每种资产在USD中独立标价。对于每种资产,都有两条曲线: * 买入曲线(做市商买入、用户卖出) * 卖出曲线(做市商卖出、用户买入) 当用户要求将A代币换成B代币时,实际的价格计算如下:A换成VUSD + VUSD换成B。这里的VUSD是一种仅用于估值目的的虚拟USD,不代表实际的代币。 在上述的两个步骤中,交换曲线都是PMM曲线,并且PMM曲线的参数可以基于做市商设置的参数和交易量来确定。通过将这些参数代入PMM公式中,即可进行计算。 * 对于代币A的卖出曲线,代币A → VUSD,基准是代币A,计价是VUSD * 对于代币A的买入曲线,VUSD → 代币A,基准是VUSD,计价是代币A 此外,由于价格的上下限由做市商设置,每个曲线中标价的一方都是虚拟代币VUSD。只能买入或卖出真正的代币。因此,曲线始终保持R > 1,意味着B < B0。因此,不再需要Q、Q0或相关参数,也无需重设目标。 综上所述,在v3中,所需的参数包括i、B0、B和k。 在v3中,有两种交换方法:sellToken和buyToken。对于当前的路由版本,我们只关注sellToken方法。 根据以上分析,实际的计算过程如下: fromToken → VUSD → toToken 1. 我们使用PMMPricing.\_querySellQuote来计算fromToken的买入曲线 2. 我们使用PMMPricing.\_querySellQuote来计算toToken的卖出曲线 需要注意的是,在计算过程中,为了降低精度损失,所有价格和金额都使用1e18的小数进行计算。fromAmount在初始化时会调整为18位小数的金额,而最终结果toAmount也是18位小数的金额,在最后会调整为toToken的实际小数金额。 主池的交易代码链接:[https://github.com/DODOEX/dodo-v3/blob/main/contracts/DODOV3MM/D3Pool/D3Trading.sol](https://github.com/DODOEX/dodo-v3/blob/main/contracts/DODOV3MM/D3Pool/D3Trading.sol) 源代码: function sellToken( address to, address fromToken, address toToken, uint256 fromAmount, uint256 minReceiveAmount, bytes calldata data ) external poolOngoing nonReentrant returns (uint256) { require(ID3Maker(state._MAKER_).checkHeartbeat(), Errors.HEARTBEAT_CHECK_FAIL); _updateCumulative(fromToken); _updateCumulative(toToken); (uint256 payFromAmount, uint256 receiveToAmount, uint256 vusdAmount, uint256 swapFee, uint256 mtFee) = querySellTokens(fromToken, toToken, fromAmount); require(receiveToAmount >= minReceiveAmount, Errors.MINRES_NOT_ENOUGH); _transferOut(to, toToken, receiveToAmount); // external call & swap callback IDODOSwapCallback(msg.sender).d3MMSwapCallBack(fromToken, fromAmount, data); // transfer mtFee to maintainer _transferOut(state._MAINTAINER_, toToken, mtFee); require( IERC20(fromToken).balanceOf(address(this)) - state.balances[fromToken] >= fromAmount, Errors.FROMAMOUNT_NOT_ENOUGH ); // record swap uint256 toTokenDec = IERC20Metadata(toToken).decimals(); _recordSwap(fromToken, toToken, vusdAmount, Types.parseRealAmount(receiveToAmount + swapFee, toTokenDec)); require(checkSafe(), Errors.BELOW_IM_RATIO); emit Swap(to, fromToken, toToken, payFromAmount, receiveToAmount, swapFee, mtFee, 0); return receiveToAmount; } /// @notice user could query sellToken result deducted swapFee, assign fromAmount /// @return payFromAmount fromToken's amount = fromAmount /// @return receiveToAmount toToken's amount /// @return vusdAmount fromToken bid vusd /// @return swapFee dodo takes the fee function querySellTokens( address fromToken, address toToken, uint256 fromAmount ) public view returns (uint256 payFromAmount, uint256 receiveToAmount, uint256 vusdAmount, uint256 swapFee, uint256 mtFee) { require(fromAmount > 1000, Errors.AMOUNT_TOO_SMALL); Types.RangeOrderState memory D3State = getRangeOrderState(fromToken, toToken); { uint256 fromTokenDec = IERC20Metadata(fromToken).decimals(); uint256 toTokenDec = IERC20Metadata(toToken).decimals(); uint256 fromAmountWithDec18 = Types.parseRealAmount(fromAmount, fromTokenDec); uint256 receiveToAmountWithDec18; ( , receiveToAmountWithDec18, vusdAmount) = PMMRangeOrder.querySellTokens(D3State, fromToken, toToken, fromAmountWithDec18); receiveToAmount = Types.parseDec18Amount(receiveToAmountWithDec18, toTokenDec); payFromAmount = fromAmount; } receiveToAmount = receiveToAmount > state.balances[toToken] ? state.balances[toToken] : receiveToAmount; uint256 swapFeeRate = D3State.fromTokenMMInfo.swapFeeRate + D3State.toTokenMMInfo.swapFeeRate; swapFee = DecimalMath.mulFloor(receiveToAmount, swapFeeRate); uint256 mtFeeRate = D3State.fromTokenMMInfo.mtFeeRate + D3State.toTokenMMInfo.mtFeeRate; mtFee = DecimalMath.mulFloor(receiveToAmount, mtFeeRate); return (payFromAmount, receiveToAmount - swapFee, vusdAmount, swapFee, mtFee); } 从上述代码可以看出,核心计算是在pmmRangeOrder合约的querySellTokens函数中进行的,可以在此链接中查看:[https://github.com/DODOEX/dodo-v3/blob/main/contracts/DODOV3MM/lib/PMMRangeOrder.sol](https://github.com/DODOEX/dodo-v3/blob/main/contracts/DODOV3MM/lib/PMMRangeOrder.sol) 源代码: // use fromToken bid curve and toToken ask curve function querySellTokens( Types.RangeOrderState memory roState, address fromToken, address toToken, uint256 fromTokenAmount ) internal view returns (uint256 fromAmount, uint256 receiveToToken, uint256 vusdAmount) { // contruct fromToken state and swap to vUSD uint256 receiveVUSD; { PMMPricing.PMMState memory fromTokenState = _contructTokenState(roState, true, false); receiveVUSD = PMMPricing._querySellQuoteToken(fromTokenState, fromTokenAmount); receiveVUSD = receiveVUSD > fromTokenState.BLeft ? fromTokenState.BLeft : receiveVUSD; } // construct toToken state and swap from vUSD to toToken { PMMPricing.PMMState memory toTokenState = _contructTokenState(roState, false, true); receiveToToken = PMMPricing._querySellQuoteToken(toTokenState, receiveVUSD); receiveToToken = receiveToToken > toTokenState.BLeft ? toTokenState.BLeft : receiveToToken; } // oracle protect { uint256 oracleToAmount = ID3Oracle(roState.oracle).getMaxReceive(fromToken, toToken, fromTokenAmount); require(oracleToAmount >= receiveToToken, Errors.RO_ORACLE_PROTECTION); } return (fromTokenAmount, receiveToToken, receiveVUSD); } BLeft是: tokenState.BLeft = askOrNot ? tokenState.BMaxAmount - tokenMMInfo.cumulativeAsk : tokenState.BMaxAmount - tokenMMInfo.cumulativeBid; * PMMPricing.\_querySellQuoteToken([https://github.com/DODOEX/dodo-v3/blob/main/contracts/DODOV3MM/lib/PMMPricing.sol](https://github.com/DODOEX/dodo-v3/blob/main/contracts/DODOV3MM/lib/PMMPricing.sol) function _querySellQuoteToken(PMMState memory state, uint256 payQuoteAmount) internal pure returns (uint256 receiveBaseAmount) { receiveBaseAmount = _RAboveSellQuoteToken(state, payQuoteAmount); } function _RAboveSellQuoteToken(PMMState memory state, uint256 payQuoteAmount) internal pure returns ( uint256 receiveBaseToken ) { return DODOMath._SolveQuadraticFunctionForTrade( state.B0, state.B, payQuoteAmount, DecimalMath.reciprocalFloor(state.i), state.K ); } PMMState构造[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/dodo-v3-integration-guide#pmmstategou-zao) --------------------------------------------------------------------------------------------------------------- 公式非常清晰,问题变成了如何为fromToken的买入曲线构造pmmState,以及如何为toToken的卖出曲线构造pmmState。 基于此,定义了以下四个参数: * i = 做市商设定的最低价格,可读 * B0 = 根据i,amount(做市商设定的最大卖出数量,可读),p\_up(做市商设定的最高价格,可读)和k计算得出 * B = B0 - cumulativeAmount(当前交易量,可读) * k = 做市商设定的参数k,可读 The derivation of the formula for B0 is: $$ P_{up} = i(ONE-k+k(\frac{B_{0}}{B_{0}-A})^{2}) $$ $$ \frac {P_{up} + i * k - ONE* i }{i*k} = (\frac{B_{0}}{B_{0}-A})^{2} $$ $$ \sqrt{\frac{P_{up} + i * k - ONE * i}{i * k} }= (\frac{B_{0}}{B_{0}-A}) $$ $$ (B_{0}-A)\sqrt{\frac{P_{up} + i * k - ONE * i}{i * k} }= B_{0} $$ $$ B_{0}= A + \frac{A}{\sqrt{\frac{P_{up} + i * k - ONE * i}{i * k} }-1} $$ ```jsx B_up = i(ONE - k + k*(B0 / B0 - amount)^2), record amount = A (B_up + i*k - ONE *i) / i*k = (B0 / B0 - A)^2 B0 = A + A / (sqrt((B_up + i*k - ONE*i) / i*k) - 1) The corresponding code is: // P_up = i(1 - k + k*(B0 / B0 - amount)^2), record amount = A // (P_up + i*k - i) / i*k = (B0 / (B0 - A))^2 // B0 = A + A / (sqrt((P_up + i*k - i) / i*k) - 1) // i = priceDown function _calB0WithPriceLimit( uint256 priceUp, uint256 k, uint256 i, uint256 amount ) internal pure returns (uint256 baseTarget) { // (P_up + i*k - i) // temp1 = PriceUp + DecimalMath.mul(i, k) - i // temp1 price // i*k // temp2 = DecimalMath.mul(i, k) // temp2 price // (P_up + i*k - i)/i*k // temp3 = DecimalMath(temp1, temp2) // temp3 ONE // temp4 = sqrt(temp3 * ONE) // temp4 ONE // temp5 = temp4 - ONE // temp5 ONE // B0 = amount + DecimalMath.div(amount, temp5) // B0 amount if (k == 0) { baseTarget = amount; } else { uint256 temp1 = priceUp * ONE + i * k - i * ONE; uint256 temp2 = i * k; uint256 temp3 = DecimalMath.div(temp1, temp2); uint256 temp5 = DecimalMath.sqrt(temp3) - ONE; require(temp5 > 0, Errors.RO_PRICE_DIFF_TOO_SMALL); baseTarget = amount + DecimalMath.div(amount, temp5); } } Oracle Protection[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/dodo-v3-integration-guide#oracle-protection) ------------------------------------------------------------------------------------------------------------------------ * Call Oracle's priceSources and getPrice functions. The function parameters are both token addresses, to retrieve the following parameters for each token: * isWhiteListed, equivalent to isFeasible * priceTolerance (unit is 1e18) * priceDecimal * tokenDecimal * token price, referred to as tokenPrice * The formula for calculating maxReceive off the chain is: DecimalMath.div( (fromAmount * getPrice(fromToken)) / getPrice(toToken), DecimalMath.mul(fromTlr, toTlr) ); //其中, fromTlr = fromtoken的priceTolerance, toTlr = toToken的priceTolerance // DecimalMath.mul(a, b) = a * b / (10**18) // DecimalMath.div(a, b) = a * (10**18) / b; Fees[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/dodo-v3-integration-guide#fees) ---------------------------------------------------------------------------------------------- In the new v3, a transaction will incur a fee, which is a certain percentage of the toToken. The fee is divided into two parts: lpFee, which is collected by the liquidity provider, and mtFee, which is collected by DODO. These fees are collectively recorded as swapFeeRate, where swapFee = lpFee + mtFee, and swapFeeRate = lpFeeRate + mtFeeRate. To facilitate adjustments by liquidity providers, the swapFee parameter is tied to each token. Each token has a swapFeeRate, and during the transaction process, the total fee rate for the transaction from token A to token B is calculated as the sum of token A's swapFeeRate and token B's swapFeeRate. The feeRate unit is 1e18, which means that if swapFeeRate = 1e17, the actual fee rate is 10%. Based on the code in Part 1, in D3MM, the receiveAmount is obtained by comparing querySellTokens with the actual balance of the pool. The transaction fee collected is swapFee = receiveAmount \* (swapFeeRate\_A + swapFeeRate\_B). The actual receiveAmount that the user can receive is receiveAmount' = receiveAmount - swapFee. Collateral Rate Check[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/dodo-v3-integration-guide#collateral-rate-check) -------------------------------------------------------------------------------------------------------------------------------- For pools that borrow funds from the vault, there is a collateral ratio check when swapping. This check ensures that the pool's collateral ratio remains healthy after the transaction occurs. Vault code:[https://github.com/DODOEX/dodo-v3/tree/main/contracts/DODOV3MM/D3Vault](https://github.com/DODOEX/dodo-v3/tree/main/contracts/DODOV3MM/D3Vault) The original code for collateral ratio check: require(checkSafe(), Errors.BELOW_IM_RATIO); This check occurs in the vault because only the vault has a complete record of pool borrowings. The specific implementation is as follows: function checkSafe(address pool) public view returns (bool) { return getCollateralRatio(pool) > 1e18 + IM; } function getCollateralRatio(address pool) public view returns (uint256) { uint256 collateral = 0; uint256 debt = 0; for (uint256 i; i < tokenList.length; i++) { address token = tokenList[i]; AssetInfo storage info = assetInfo[token]; (uint256 balance, uint256 borrows) = getBalanceAndBorrows(pool, token); uint256 price = ID3Oracle(_ORACLE_).getPrice(token); if (balance >= borrows) { collateral += min(balance - borrows, info.maxCollateralAmount).mul(info.collateralWeight).mul(price); } else { debt += (borrows - balance).mul(info.debtWeight).mul(price); } } return _ratioDiv(collateral, debt); } function _ratioDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0 && b == 0) { return 1e18; } else if (a == 0 && b != 0) { return 0; } else if (a != 0 && b == 0) { return type(uint256).max; } else { return a.div(b); } } The core is evident in the "getBalanceAndBorrows" section of the code: function getBalanceAndBorrows(address pool, address token) public view returns (uint256, uint256) { uint256 balance = ID3MM(pool).getTokenReserve(token); uint256 borrows = getPoolBorrowAmount(pool, token); return (balance, borrows); } The swap process only changes the balance, not the borrows. When swapping from A to B, the balance of A token decreases and the balance of B token increases. Therefore, you can use the getBalanceAndBorrows function to retrieve the balance and borrows beforehand, and then construct checks based on the getCollateralRatio method. Get Parameters[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/dodo-v3-integration-guide#get-parameters) ------------------------------------------------------------------------------------------------------------------ After organizing the above process, for each token, the following parameters need to be read: * swapFeeRate * bid: * i\_bid(p\_down\_bid) * p\_up\_bid * amount\_bid * cumulativeBid * kBid * ask: * i\_ask(p\_down\_ask) * p\_up\_ask * amount\_ask * cumulativeAsk * kAsk In v3, you can request the following two methods to retrieve all information about a token: function getTokenMMPriceInfoForRead( address token ) external view returns (uint256 askDownPrice, uint256 askUpPrice, uint256 bidDownPrice, uint256 bidUpPrice, uint256 swapFee) function getTokenMMOtherInfoForRead( address token ) external view returns ( uint256 askAmount, uint256 bidAmount, uint256 kAsk, uint256 kBid, uint256 cumulativeAsk, uint256 cumulativeBid ) For edge condition evaluation, the parameters to be obtained are: * vault tokenlist // D3Vault.sol function getTokenList() external view returns (address[] memory) { * borrowing records // D3Vault.sol function getBalanceAndBorrows(address pool, address token) public view returns (uint256 balance, uint256 borrow) * The balance of each token in this pool (note that the tokens here may not necessarily be the same as the tokens in the token list of the vault). // D3MM.sol function getTokenReserve(address token) public view returns(uint256) V3 pool also provides two read functions to obtain token list. These functions are available in the feature-version branch, which is the deployed version:[https://github.com/DODOEX/dodo-v3/blob/feature-version/contracts/DODOV3MM/D3Pool/D3MM.sol](https://github.com/DODOEX/dodo-v3/blob/feature-version/contracts/DODOV3MM/D3Pool/D3MM.sol) * Get all token addresses for which the market maker has provided prices, i.e., all tokens that support price inquiries. function getPoolTokenlist() external view returns(address[] memory) * Get all token addresses that the market maker has deposited function getDepositedTokenList() external view returns (address[] memory) --- # 流动性参数结构 - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) 流动性参数结构 ======= 通过上图我们可以了解到,要确定申请曲线的几个参数有:申请下价格、申请上价格、申请量、一个额外的参数kk去确定曲线的形状。关于kk的更详细信息,请参考[闪兑算法的详细信息](https://docs.dodoex.io/zh/product/pmm-algorithm) 。 要确定请求曲线,我们需要四个参数:请求下价格、请求上价格、请求量和请求kk。因此,一种token所需的所有参数如下: 申请下价格、申请上价格、k申请、申请量 请求下价格、申请上价格、k请求、请求量 为了节约gas消耗,我们单独存储价格的小数部分。 类似地,数量的小数部分也可以单独存储。 在新版本中,我们引入了一个midPrice和一个名为swapFee的交易手续费参数。swapFee由交易发起人设定的lpFee和Dodo的mtFee组成。swapFee = lpFee + mtFee,类似于DODO V2。swapFee以百分比表示。 因此,申请上价格和请求下价格是基于midPrice和swapFee自动生成的。 计算公式如下: swapSpread = midPrice * swapFee 申请上价格 = midPrice - swapSpread 请求下价格 = midPrice + swapSpread 为了优化存储,我们将请求上价格和midPrice之间的偏移量作为百分比进行参考,称为请求上比率。同样地,将申请下价格的偏移量作为百分比进行参考。因此,我们有请求上价格和申请下价格的转换公式。 申请上价格 = midPrice * (1 + 请求上比率) 申请下价格 = midPrice * ( 1 -请求下比例) 在这个结构中,mid价格的默认小数为18。例如,当前价格为1642,那么mid价格=1642,mid价格的小数=18;如果当前价格为0.0015,那么mid价格=15,mid价格的小数=14。 因此,曲线的两个参数都需要两个: price 参数: mid价格,mid价格的小数,lp费率,请求比率,申请下比率 amount 参数: 请求量,申请量 curve 参数: 请求k,申请k 其中,lpFee费率、请求比率和申请下比率的单位为10000,表示如果lpFee费率=1000,则相当于lpFee费率=10%。 请求量和申请量的单位默认都设置为18。 setNSPriceSlot[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/liquidity-parameter-structure#setnspriceslot) ---------------------------------------------------------------------------------------------------------------------- 最高效的设置多个非稳定币代币价格的方法是将相应的价格集合打包到一个单独的插槽中。在合约中,只需覆盖插槽数据即可。插槽索引可以根据上述方法计算得出。在设置时,合约不会拆分和检查数据,因此SP需要仔细确定插槽数据(在交换期间恢复任何错误数据)。 例如,如果我们想要重置 WBTC 和 WETH 的价格,由于 WBTC 和 WETH 都属于价格存储中的非稳定代币,它们位于插槽 0 中。因此,我们需要调用 setNSPriceSlot() 方法,并将 \[0\] 作为第一个参数传入。第二个参数应通过使用 getNSTokenInfo() 检索插槽 0 中位置 0 处的当前价格数据,然后用新的 WBTC 和 WETH 价格进行覆盖。 至于第三个参数,它也应通过 getNSTokenInfo() 获取,首先检索 allFlag,然后将其二进制表示的第一个位(对应 WBTC)和第三个位(对应 WETH)设置为 0,因为它们的原始索引分别为 1 和 3。 ![](https://docs.dodoex.io/assets/developer-contract-dodov3-04.png) /// @notice user set PriceListInfo.tokenPriceStable price info, only for stable coin /// @param slotIndex tokenPriceStable index /// @param priceSlots tokenPriceNS price info, every data has packed all 3 token price info /// @param newAllFlag maker update token cumulative status, /// for allFlag, tokenOriIndex represent bit index in allFlag. eg: tokenA has origin index 3, that means (allFlag >> 3) & 1 = token3's flag /// flag = 0 means to reset cumulative. flag = 1 means not to reset cumulative. /// @dev maker should be responsible for data availability function setNSPriceSlot( uint256[] calldata slotIndex, uint256[] calldata priceSlots, uint256 newAllFlag ) external onlyOwner { setStablePriceSlot[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/liquidity-parameter-structure#setstablepriceslot) ------------------------------------------------------------------------------------------------------------------------------ 用于覆盖稳定币插槽的功能,类似于 setNSPriceSlot。 /// @notice user set PriceListInfo.tokenPriceStable price info, only for stable coin /// @param slotIndex tokenPriceStable index /// @param priceSlots tokenPriceStable price info, every data has packed all 3 token price info /// @param newAllFlag maker update token cumulative status, /// for allFlag, tokenOriIndex represent bit index in allFlag. eg: tokenA has origin index 3, that means (allFlag >> 3) & 1 = token3's flag /// flag = 0 means to reset cumulative. flag = 1 means not to reset cumulative. /// @dev maker should be responsible for data availability function setStablePriceSlot( uint256[] calldata slotIndex, uint256[] calldata priceSlots, uint256 newAllFlag ) external onlyOwner { setTokensAmounts[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/liquidity-parameter-structure#settokensamounts) -------------------------------------------------------------------------------------------------------------------------- 通过传入一个包含多个代币及其相应 amountSet 数据的数组,设置多个代币的数量信息。 例如:(正在更新) /// @notice set token Amounts /// @param tokens token address set /// @param tokenAmounts token amounts set, each number pack one token all amounts.Each format is the same with amountSetAndK /// [ask amounts(16) | ask amounts decimal(8) | bid amounts(16) | bid amounts decimal(8) ] = one slot could contains 4 token info function setTokensAmounts( address[] calldata tokens, uint64[] calldata tokenAmounts ) public onlyOwner setTokensKs[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/liquidity-parameter-structure#settokensks) ---------------------------------------------------------------------------------------------------------------- 设置多个代币的 k 数据,并将其写入 kAsk 和 kBid。将相同的 kAsk 和 kBid 结合为一个 32 位的数据结构:\[kAsk (16) | kBid (16)\]。 示例:(正在更新) /// @notice set token Ks /// @param tokens token address set /// @param tokenKs token k_ask and k_bid, structure like [kAsk(16) | kBid(16)] function setTokensKs(address[] calldata tokens, uint32[] calldata tokenKs) public onlyOwner 其他辅助功能介绍[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/liquidity-parameter-structure#qi-ta-fu-zhu-gong-neng-jie-shao) --------------------------------------------------------------------------------------------------------------------------------- * getStableTokenInfo,获取稳定币的数量、稳定币的价格插槽数组以及当前的标志位。 /// @notice get all stable token Info /// @param numberOfStable stable tokens' quantity /// @param tokenPriceStable stable tokens' price slot array. each data contains up to 3 token prices function getStableTokenInfo() public view returns ( uint256 numberOfStable, uint256[] memory tokenPriceStable, uint256 curFlag ) * getNSTokenInfo,获取非稳定币的数量、非稳定币的价格插槽数组以及当前的标志位。 /// @notice get all non-stable token Info /// @param number stable tokens' quantity /// @param tokenPrices stable tokens' price slot array. each data contains up to 3 token prices function getNSTokenInfo() public view returns ( uint256 number, uint256[] memory tokenPrices, uint256 curFlag ) * stickPrice,用于连接价格。给定完整的价格插槽、要在插槽中设置的代币以及该代币的新价格集合,形成一个新的价格插槽。 /// @notice used for construct several price in one price slot /// @param priceSlot origin price slot /// @param slotInnerIndex token index in slot /// @param priceSet the token info needed to update function stickPrice( uint256 priceSlot, uint256 slotInnerIndex, uint256 priceSet ) public pure returns (uint256 newPriceSlot) * multicall,用于将多个设置打包到一个事务中。 /// @notice maker could use multicall to set different params in one tx. function multicall(bytes[] calldata data) public returns (bytes[] memory results) * getOneTokenOriginIndex(),获取代币的原始索引,如前文所述。 /// @notice get one token index. odd for none-stable, even for stable, true index = tokenIndex[address] / 2 function getOneTokenOriginIndex(address token) public view returns (uint256) 参数数据拼接[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/liquidity-parameter-structure#can-shu-shu-ju-pin-jie) ---------------------------------------------------------------------------------------------------------------------- 以下是一些参数拼接的代码示例,供SP参考。当然,SP也可以实现自己的参数拼接方法,以实现更高的效率和节省 gas。 // 将四个数据拼接成一个插槽 // 一个插槽是 (16 | 8 | 16 | 8) // 这种方法可以用于将 amountSet(ask 金额 | ask 金额小数 | bid 金额 | bid 金额小数)拼接成一个插槽 // 注意返回值为 256 位,并需要进行转换。 function stickOneSlot( uint256 numberA, uint256 numberADecimal, uint256 numberB, uint256 numberBDecimal ) public pure returns (uint256 numberSet) { numberSet = (numberA << 32) + (numberADecimal << 24) + (numberB << 8) + numberBDecimal; } ### 拼接金额[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/liquidity-parameter-structure#pin-jie-jin-e) // 生成一个标准的 64 位 amountInfo。 function stickAmount( uint256 askAmount, uint256 askAmountDecimal, uint256 bidAmount, uint256 bidAmountDecimal ) public pure returns (uint64 amountSet) { amountSet = uint64( stickOneSlot( askAmount, askAmountDecimal, bidAmount, bidAmountDecimal ) ); } ### 拼接价格[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/liquidity-parameter-structure#pin-jie-jia-ge) function stickPrice( uint256 midPrice, uint256 midPriceDecimal, uint256 feeRate, uint256 askUpRate, uint256 bidDownRate ) public pure returns(uint80 priceInfo) { priceInfo = uint80( (midPrice << 56) + (midPriceDecimal << 48) + (feeRate << 32) + (askUpRate << 16) + bidDownRate ); } ### 拼接 k[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/liquidity-parameter-structure#pin-jie--k) function stickKs(uint256 kAsk, uint256 kBid) public pure returns (uint32 kSet) { kSet = uint32((kAsk << 16) + kBid); } 示例[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/liquidity-parameter-structure#shi-li) -------------------------------------------------------------------------------------------------- 在这个例子中,我们将设置 WBTC 的价格。假设我们想要根据以下参数分配 WBTC 的流动性: 买入价格范围是 27940-27990。 卖出价格范围是 28010-28040。 买入金额为 1000 美元(购买代币的美元金额)。 卖出数量为 0.1 WBTC(卖出的代币数量)。 中间价格设置为 28000,mtFee = 0.02%。 对于代币 A 的两个价格曲线,买入价格为 vUSD / A,卖出价格为 A / vUSD。 swapFee = (28000 - 27990) / 28000 ≈ 0.035% lpFee = swapFee - mtFee = 0.015% 舍入,lpFee = 0.02%,为 2 因此,实际 买入上限价格 = 28000 *(1 -(0.02% + 0.02%))= 27988.8 卖出下限价格 = 28000 *(1 +(0.02% + 0.02%))= 28011.2 类似地,按比例计算卖出上限和买入下限。 卖出上限 =(28040 - 28000)/ 28000 ≈ 0.14%,为 14 买入下限 =(27940 - 28000)/ 28000 ≈ 0.21%,为 21 买入金额为 1000,小数位数为 18(vUSD 的小数位数为 18) 卖出数量为 0.1,小数位数为 18(默认小数位数为 18) 去除小数点,并用于存储在合约中的数据。 中间价格 = 28000,中间价格小数位数 = 18 卖出上限比率 = 14,买入下限比率 = 21 买入金额 = 1000,小数位数 = 18 卖出数量 = 0.1,小数位数 = 17 ![](https://docs.dodoex.io/assets/developer-contract-dodov3-05.png) 一个价格集包含 72 位。 因此,PriceSet 为 [ 28000 | 18 | 14 | 21 ] ![](https://docs.dodoex.io/assets/developer-contract-dodov3-06.png) 一个 amount set 包含 48 位。 因此,AmountSet 为 [ 1 | 17 | 1000 | 18 ] 其他设置[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/liquidity-parameter-structure#qi-ta-she-zhi) ----------------------------------------------------------------------------------------------------------- 当前的 maxInterval 也由 D3Maker 管理,因此有以下设置函数: /// @notice set acceptable setting interval, if setting gap > maxInterval, swap will revert. function setHeartbeat(uint256 newMaxInterval) public onlyOwner { } --- # Liquidity Parameter Structure - DODO Docs ###### Links [Home](https://docs.dodoex.io/en/home) [Product](https://docs.dodoex.io/en/product) [Developer](https://docs.dodoex.io/en/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) Liquidity Parameter Structure ============================= Through the above diagram, we can understand that there are several parameters required to determine the bid curve: bid price down, bid price up, bid amount, and an additional parameter k to determine the shape of the curve. For more information about k, please refer to [the details of PMM algorithm.](https://docs.dodoex.io/en/product/pmm-algorithm) To determine the ask curve, we need four parameters: ask price down, ask price up, ask amount, and ask k. Therefore, all the parameters required for one token are as follows: bid price down, bid price up, kBid, bid amount ask price down, ask price up, kAsk, ask amount In order to save gas consumption, we store the decimal of the price separately. Similarly, the decimal of the amount can also be stored separately. In the new version, we have introduced a midPrice and a transaction fee parameter called swapFee. The swapFee is composed of lpFee set by the maker and mtFee charged by Dodo. swapFee = lpFee + mtFee, similar to DODO V2. The swapFee is represented as a percentage. Therefore, bid price up and ask price down are automatically generated based on midPrice and swapFee. The formula for this is: swapSpread = midPrice * swapFee bid price up = midPrice - swapSpread ask price down = midPrice + swapSpread In order to optimize storage, we will refer to the offset between the ask price up and midPrice as a percentage, known as the ask up rate. Similarly, we will refer to the offset of bid price down as a percentage. Therefore, we have conversion formulas for ask price up and bid price down. ask price up = midPrice * (1 + ask up rate) bid price down = midPrice * ( 1 - bid price down) In this structure, the default decimal for mid price is 18. For example, if the current price is 1642, then mid price = 1642 and mid price decimal = 18; if the current price is 0.0015, then mid price = 15 and mid price decimal = 14. Therefore, a total of two parameters are required for both curves: price param: midPrice, midPrice decimal, lpfee rate, ask up rate, bid down rate amount param:ask amount, bid amount curve param: kAsk, kBid Among them, the units of lpFee rate, ask up rate, and bid down rate are 10000, which means that if lpFee rate = 1000, it is equivalent to lpFee rate = 10%. The units for ask amount and bid amount are both set to 18 by default. Parameter Storage Optimization[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/liquidity-parameter-structure#parameter-storage-optimization) ------------------------------------------------------------------------------------------------------------------------------------------------------ For each currency, the following parameters are needed to determine the trading curve: 1. mid price- 16 bit 2. mid price decimal -8 bit 3. lp fee rate - 8 bit 4. ask up rate - 8 bit 5. bid down rate - 8 bit 6. ask k - 16 bit 7. ask amount - 16 bit 8. ask amount decimal - 8 bit 9. bid k - 16 bit 10. bid amount - 16 bit 11. bid amount decimal - 8 bit Please note that we only support 16-bit storage for price or amount, which means we do not support setting integers above 65535. If you need to set a number above 65535, you will need to convert it into decimal format. For example, if you want to set the actual ask amount as 400,000, you can set the contract parameters as ask\_amount = 40000 and ask\_amount\_decimal = 19. In the D3MM main body, the struct TokenMMInfo is used to store the relevant parameters of each token. However, in D3Maker, we will use a more compact structure called TokenMMInfoWithoutCum to store token-related parameters. In this struct, we employ bitwise operations to compress all price-related parameters into one uint and all amount-related parameters into another uint. In the following text, we will refer to the data that contains all price information for a token as priceISet. Similarly, the data that contains all amount information for the same token will be referred to as amountSet. The struct definition is as follows: struct TokenMMInfoWithoutCum { // [mid price(16) | mid price decimal(8) | fee rate(16) | ask up rate (16) | bid down rate(16)] // midprice unit is 1e18 // all rate unit is 10000 uint80 priceInfo; // Why is it 80 instead of 72? In order to match the following few numbers and make a total of 256 for storage efficiency. // [ask amounts(16) | ask amounts decimal(8) | bid amounts(16) | bid amounts decimal(8) ] uint64 amountInfo; // Why is it 64 instead of 48? In order to match the following few numbers and make a total of 256 for storage efficiency. // k is [0, 10000] uint16 kAsk; uint16 kBid; uint8 decimal; uint8 tokenIndex; } ![](https://docs.dodoex.io/assets/developer-contract-dodov3-01.png) One price set contains 72 bits. ![](https://docs.dodoex.io/assets/developer-contract-dodov3-02.png) One amount set contains 48 bits. It can be seen that, in this packaging method, all the data of a token price only requires 72 bits. In order to save gas for modifying multiple prices of SP, we have set up an additional array to package all the token price information. In this array, each uint256 stores the price information of 3 tokens. At the same time, considering that stablecoins and non-stablecoins may have different frequency of price updates, separate arrays can be used to store stablecoins and non-stablecoins. SP can adjust them flexibly. Please note that "stablecoin" and "non-stablecoin" here are not mandatory bindings to the actual types of currencies. SP can set them according to their own needs when adding tokens for the first time. For example, if a pool only has three tokens - USDT, WETH, WBTC - and USDT's token setting frequency is similar to WETH's, you can declare USDT as a non-stablecoin during initial setup. The contract will pack the priceSet related to USDT together with those of WETH and WBTC into one slot, saving gas. The specific structure of the price data is as follows: // pack three token price in one slot struct PriceListInfo { // odd for non-stable, even for stable, true index = tokenIndex[address] / 2 mapping(address => uint256) tokenIndexMap; uint256 numberOfNS; // quantity of not stable token uint256 numberOfStable; // quantity of stable token // [mid price(16) | mid price decimal(8) | fee rate(16) | ask up rate (16) | bid down rate(16)] = 72 bit // one slot contain = 80 * 3, 3 token price // [2 | 1 | 0] uint256[] tokenPriceNS; // non-stable token price uint256[] tokenPriceStable; // stable token price } Each token has an index, which can be obtained through the getOneTokenOriginIndex() function. function getOneTokenOriginIndex(address token) public view returns (uint256) OriginIndex is odd for non-stable coins, and even for stable coins. By dividing originIndex by 2, we get trueIndex. TrueIndex represents the index within the major category (stable/non-stable) of the coin. trueIndex divided by 3 gives us the position of the token's slot in the array, while trueIndex % 3 represents the sequence of the token within that slot. /* For example: 7 assets,WBTC,WETH,BNB,DODO,DAI,USDT,USDC numberOfNS = 4 numberOfStable = 3 origin index in tokenIndexMap: DAI 0 WBTC 1 USDT 2 WETH 3 USDC 4 BNB 5 DODO 7 trueIndex: DAI 0,USDT 1, USDC 2 WBTC 0, WETH 1, BNB 2, DODO 3 trueIndex / 3 : DAI 0, USDT 0, USDC 0 WBTC 0, WETH 0, BNB 0, DODO 1 trueIndex % 3 : DAI 0, USDT 1, USDC 2 WBTC 0, WETH 1, BNB 2, DODO 0 Therefore The structure of tokenPriceNS: [(BNB | WETH | WBTC), (empty | empty | DODO)] The structure of tokenPriceStable: [(USDC | USDT | DAI)] */ ![](https://docs.dodoex.io/assets/developer-contract-dodov3-03.png) D3Maker provides the following functions: First-time tokenInfo setup: * setNewToken Setting initialized Token-related information: * setTokensPrice * setNSPriceSlot * setStablePriceSlot * setTokensAmounts * setTokensKs The functions will be explained one by one in the following text. setNewToken[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/liquidity-parameter-structure#setnewtoken) ---------------------------------------------------------------------------------------------------------------- Set the information for a new token, including: whether to define it as a stablecoin, and can only be called once when adding the token. Example: (being updated) /// @notice maker set a new token info /// @param token token's address /// @param priceSet packed price, [mid price(16) | mid price decimal(8) | fee rate(16) | ask up rate (16) | bid down rate(16)] /// @param amountSet describe ask and bid amount and K, [ask amounts(16) | ask amounts decimal(8) | bid amounts(16) | bid amounts decimal(8) ] = one slot could contains 4 token info /// @param stableOrNot describe this token is stable or not, true = stable coin /// @param kAsk k of ask curve /// @param kBid k of bid curve /// @param tokenDecimal token's decimal function setNewToken( address token, bool stableOrNot, uint80 priceSet, uint64 amountSet, uint16 kAsk, uint16 kBid, uint8 tokenDecimal ) external onlyOwner { } setTokensPrice[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/liquidity-parameter-structure#settokensprice) ---------------------------------------------------------------------------------------------------------------------- Set the price information for multiple tokens at the same time by passing in an array of tokens and their corresponding price sets. The contract will internally concatenate the token information into a single slot. Example: (being updated) /// @notice set token prices /// @param tokens token address set /// @param tokenPrices token prices set, each number pack one token all price.Each format is the same with priceSet /// [mid price(16) | mid price decimal(8) | fee rate(16) | ask up rate (16) | bid down rate(16)] = one slot could contains 3 token info function setTokensPrice( address[] calldata tokens, uint80[] calldata tokenPrices ) external onlyOwner { setNSPriceSlot[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/liquidity-parameter-structure#setnspriceslot) ---------------------------------------------------------------------------------------------------------------------- The most efficient way to set multiple non-stable coin token prices is by packaging the corresponding price sets into a single slot beforehand. In the contract, only the slot data needs to be overwritten. The slot index can be calculated based on the method mentioned above. The contract will not split and check the data when setting it, so SP needs to carefully determine the slot data (reverting any bad data during swapping). For example, if we want to reset the prices of WBTC and WETH, since both WBTC and WETH belong to non-stable tokens in the tokenPriceNS storage, they are located in slot 0. Therefore, we need to call the setNSPriceSlot() method with \[0\] as the first parameter. The second parameter should be obtained by using getNSTokenInfo() to retrieve the current price data at position 0 in slot 0 and then overwrite it with new WBTC and WETH prices. As for the third parameter, it should also be obtained through getNSTokenInfo(), retrieving allFlag first and then setting its binary representation's first bit (corresponding to WBTC) and third bit (corresponding to WETH) as 0 since their original indices are 1 and 3 respectively. ![](https://docs.dodoex.io/assets/developer-contract-dodov3-04.png) /// @notice user set PriceListInfo.tokenPriceStable price info, only for stable coin /// @param slotIndex tokenPriceStable index /// @param priceSlots tokenPriceNS price info, every data has packed all 3 token price info /// @param newAllFlag maker update token cumulative status, /// for allFlag, tokenOriIndex represent bit index in allFlag. eg: tokenA has origin index 3, that means (allFlag >> 3) & 1 = token3's flag /// flag = 0 means to reset cumulative. flag = 1 means not to reset cumulative. /// @dev maker should be responsible for data availability function setNSPriceSlot( uint256[] calldata slotIndex, uint256[] calldata priceSlots, uint256 newAllFlag ) external onlyOwner { setStablePriceSlot[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/liquidity-parameter-structure#setstablepriceslot) ------------------------------------------------------------------------------------------------------------------------------ Used for overriding the stablecoin slot, similar to setNSPriceSlot. /// @notice user set PriceListInfo.tokenPriceStable price info, only for stable coin /// @param slotIndex tokenPriceStable index /// @param priceSlots tokenPriceStable price info, every data has packed all 3 token price info /// @param newAllFlag maker update token cumulative status, /// for allFlag, tokenOriIndex represent bit index in allFlag. eg: tokenA has origin index 3, that means (allFlag >> 3) & 1 = token3's flag /// flag = 0 means to reset cumulative. flag = 1 means not to reset cumulative. /// @dev maker should be responsible for data availability function setStablePriceSlot( uint256[] calldata slotIndex, uint256[] calldata priceSlots, uint256 newAllFlag ) external onlyOwner { setTokensAmounts[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/liquidity-parameter-structure#settokensamounts) -------------------------------------------------------------------------------------------------------------------------- Set the amounts information for multiple tokens by passing in an array of tokens and their corresponding amountSet data. For example: (being updated) /// @notice set token Amounts /// @param tokens token address set /// @param tokenAmounts token amounts set, each number pack one token all amounts.Each format is the same with amountSetAndK /// [ask amounts(16) | ask amounts decimal(8) | bid amounts(16) | bid amounts decimal(8) ] = one slot could contains 4 token info function setTokensAmounts( address[] calldata tokens, uint64[] calldata tokenAmounts ) public onlyOwner setTokensKs[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/liquidity-parameter-structure#settokensks) ---------------------------------------------------------------------------------------------------------------- Set multiple tokens' k data and write to both kAsk and kBid. Combine the same kAsk and kBid into a 32-bit data structure: \[kAsk(16) | kBid(16)\]. Example: (being updated). /// @notice set token Ks /// @param tokens token address set /// @param tokenKs token k_ask and k_bid, structure like [kAsk(16) | kBid(16)] function setTokensKs(address[] calldata tokens, uint32[] calldata tokenKs) public onlyOwner Other auxiliary function introduction[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/liquidity-parameter-structure#other-auxiliary-function-introduction) -------------------------------------------------------------------------------------------------------------------------------------------------------------------- * getStableTokenInfo, get the number of stablecoins, the array of price slots for stablecoins, and the current flag. /// @notice get all stable token Info /// @param numberOfStable stable tokens' quantity /// @param tokenPriceStable stable tokens' price slot array. each data contains up to 3 token prices function getStableTokenInfo() public view returns ( uint256 numberOfStable, uint256[] memory tokenPriceStable uint256 curFlag ) * getNSTokenInfo, get the number of non-stablecoins, the array of price slots for stablecoins, and the current flag. /// @notice get all non-stable token Info /// @param number stable tokens' quantity /// @param tokenPrices stable tokens' price slot array. each data contains up to 3 token prices function getNSTokenInfo() public view returns ( uint256 number, uint256[] memory tokenPrices, uint256 curFlag ) * stickPrice, to concatenate prices, given a complete price slot, the token to be set at the index in the slot, and the new priceSet for that token, form a new price slot. /// @notice used for construct several price in one price slot /// @param priceSlot origin price slot /// @param slotInnerIndex token index in slot /// @param priceSet the token info needed to update function stickPrice( uint256 priceSlot, uint256 slotInnerIndex, uint256 priceSet ) public pure returns (uint256 newPriceSlot) * multicall, used to package multiple settings in a single transaction. /// @notice maker could use multicall to set different params in one tx. function multicall(bytes[] calldata data) public returns (bytes[] memory results) * getOneTokenOriginIndex(), get the original index of the token, as described in the previous text. /// @notice get one token index. odd for none-stable, even for stable, true index = tokenIndex[address] / 2 function getOneTokenOriginIndex(address token) public view returns (uint256) Parameter Data Splicing[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/liquidity-parameter-structure#parameter-data-splicing) ---------------------------------------------------------------------------------------------------------------------------------------- Below are some examples of code for parameter splicing for reference by SP. Of course, SP can also implement their own method of parameter splicing to achieve higher efficiency and gas savings in market making. // Concatenate four data into one slot // A slot is (16 | 8 | 16 | 8) // This method can be used to concatenate into an amountSet (ask amount | ask amount decimal | bid amount | bid amount decimal) // Note that the return value is in 256 bits and needs to be converted. function stickOneSlot( uint256 numberA, uint256 numberADecimal, uint256 numberB, uint256 numberBDecimal ) public pure returns (uint256 numberSet) { numberSet = (numberA << 32) + (numberADecimal << 24) + (numberB << 8) + numberBDecimal; } ### Concatenate amount[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/liquidity-parameter-structure#concatenate-amount) // Generate a standard 64-bit amountInfo. function stickAmount( uint256 askAmount, uint256 askAmountDecimal, uint256 bidAmount, uint256 bidAmountDecimal ) public pure returns (uint64 amountSet) { amountSet = uint64( stickOneSlot( askAmount, askAmountDecimal, bidAmount, bidAmountDecimal ) ); } ### Concatenate price[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/liquidity-parameter-structure#concatenate-price) function stickPrice( uint256 midPrice, uint256 midPriceDecimal, uint256 feeRate, uint256 askUpRate, uint256 bidDownRate ) public pure returns(uint80 priceInfo) { priceInfo = uint80( (midPrice << 56) + (midPriceDecimal << 48) + (feeRate << 32) + (askUpRate << 16) + bidDownRate ); } ### Concatenate k[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/liquidity-parameter-structure#concatenate-k) function stickKs(uint256 kAsk, uint256 kBid) public pure returns (uint32 kSet) { kSet = uint32((kAsk << 16) + kBid); } Example[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/liquidity-parameter-structure#example) -------------------------------------------------------------------------------------------------------- In this example, we will set the price of WBTC. Let's assume that we want to distribute the liquidity of WBTC according to the following parameters: The bid price range is 27940-27990. The ask price range is 28010-28040. The bid amount is 1000 USD (how much USD to buy tokens). The ask amount is 0.1 WBTC (how many tokens to sell). The mid-point price is set at 28000, with mtFee = 0.02%. For the two price curves of token A, the bid price is vUSD / A and the ask price is A / vUSD. swapFee = (28000 - 27990) / 28000 ≈ 0.035% lpFee = swapFee - mtFee = 0.015% Rounding off, lpFee = 0.02% as 2 Therefore, the actual bid up price = 28000 * (1 -(0.02% + 0.02%)) = 27988.8 ask down price = 28000 * (1 +(0.02% + 0.02%)) = 28011.2 Calculate the ask up rate and bid down rate by analogy. ask up rate = (28040 - 28000) / 28000 ≈ 0.14% as 14 bid down rate = (27940 - 28000) / 28000 ≈0.21% as 21 bid_amount = 1000, decimal = 18 (vUSD's decimal is 18) ask_amount = 0.1, decimal = 18 (default decimal is 18) Remove the decimal point and use it for the data stored in the contract. mid price = 28000, mid price decimal = 18 ask up rate = 14, bid down rate = 21 bid_amount = 1000, decimal = 18 ask_amount = 1, decimal = 17 ![](https://docs.dodoex.io/assets/developer-contract-dodov3-05.png) One price set contains 72 bits. Therefore PriceSet is [ 28000 | 18 | 14 | 21 ] ![](https://docs.dodoex.io/assets/developer-contract-dodov3-06.png) One amount set contains 48 bits. Therefore AmountSet is [ 1 | 17 | 1000 | 18 ] Other Setting[#](https://docs.dodoex.io/en/developer/contracts/dodo-v3/liquidity-parameter-structure#other-setting) -------------------------------------------------------------------------------------------------------------------- The current maxInterval is also managed by D3Maker, so there are the following setting functions: /// @notice set acceptable setting interval, if setting gap > maxInterval, swap will revert. function setHeartbeat(uint256 newMaxInterval) public onlyOwner { } --- # Core - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) Core ==== ### D3MM[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/core#d3mm) 一个 DODO V3 用户将与之交互的主合约是 D3MM,也称为 DODO V3 市场做市商。 `D3MM` 继承了四个智能合约,每个合约都有其特定的函数: 1. [D3Funding](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/core/d3funding) 管理资产的存取 2. [D3Liquidation](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/core/d3liquidation) 定义与清算相关的函数 3. [D3Trading](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/core/d3trading) 为用户提供代币交换功能 4. [D3Maker](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/core/d3maker) 为流动性池的所有者提供做市商功能 ### D3MMFactory[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/core#d3mmfactory) [D3MMFactory](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/core/d3mmfactory) 是用于创建和注册流动性池的工厂合约。 ### D3Token[#](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/core#d3token) [D3Token](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/core/d3token) 是一个在 D3MM 流动性池内使用的 ERC-20 代币。当用户将代币存入流动性池时,相应的 D3Token 会被铸造并转移给用户。D3Token 可以看作是一个带有利息的 LP 代币,可以转让。持有 D3Token 的任何人都可以从 D3MM 池中提取相应的原始代币。 --- # Lib - DODO 文档中心 ###### Links [Home](https://docs.dodoex.io/zh/home) [Product](https://docs.dodoex.io/zh/product) [Developer](https://docs.dodoex.io/zh/developer) [NPM](https://www.npmjs.com/search?q=%40dodoex) [GitHub](https://github.com/DODOEX) Lib === Lib合约用作内部和外部库,为Core合约提供常用的代码逻辑,帮助减少Core合约的字节大小。 [D3Common](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/lib/d3common) 包含其他库的共享逻辑。 [FundingLibrary](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/lib/fundinglibrary) 包含 `D3Funding` 的逻辑代码。 [LiquidationLibrary](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/lib/liquidationlibrary) 包含 `D3Liquidation` 的逻辑代码。 [PMMRangeOrder](https://docs.dodoex.io/zh/developer/contracts/dodo-v3/lib/pmmrangeorder) 确定价格曲线。 ---