Scout Chart Creator
  • Overview
  • Get Started
    • Tutorial 1: NMR Daily Transaction Count
    • Tutorial 2: LPT Weekly Volume (USD)
    • Tutorial 3: NMR vs LPT Daily comparison
  • Pipeline
    • Filter
    • Project
    • Group
      • Accumulators
    • Sort
    • Unwind
    • Custom
  • Data Source
    • Transactions
    • States
    • Contracts
    • Aragon
    • Livepeer
    • dYdX
    • Set
    • Token holders
  • Operators
    • Math operators
    • Logic operators
    • Function operators
    • Array operators
    • String operators
  • Config
  • Protocols
    • Dodo
      • 24H trade volume
      • Deposit & Withdraw
    • Livepeer
    • dYdX
      • Making sense of the trade data
    • MakerDao
    • Pickle Finance
      • Example: Daily deposit and withdraw of jar 0.88
      • Example: Listing all borrows of a strategy
  • FAQ
    • Dealing with "logs" field in "Transaction"
    • How to handle "Query Timeout" error?
    • How to use a variable in a Pipeline
  • Research
    • The circulating supply of DODO tokens
    • How are bitcoins doing on Ethereum? (as of Jan 20th 2021)
Powered by GitBook
On this page
  • 1. The "BuyBaseToken" and "SellBaseToken" logs
  • Example: "24H trade volume"
  • 2. The "Deposit" and "Withdraw" logs for providing or withdraw liquidities
  • Example: Deposit & Withdraw
  • 3 The "Deposit" log for mining
  • 4. Trading fees

Was this helpful?

  1. Protocols

Dodo

https://dodoex.github.io/docs/docs/deployedInfo

PreviousProtocolsNext24H trade volume

Last updated 4 years ago

Was this helpful?

is a new type of on-chain liquidity provider that is powered by the concept of .

Full dashboard is here:

There are three basic actions a user takes on Dodo: Trading, providing liquidity and mining. By understanding how to trace these behaviors on the blockchain, you can easily visualize the volume, total value, unique users and many other basic metrics of the protocol.

1. The "BuyBaseToken" and "SellBaseToken" logs

When you are doing trading on DODO, the BuyBaseToken and SellBaseToken are the two logs you want to pay attention to. As of now, DODO has 12 trading pairs and each one of them is a smart contract. In each pair, there is a base token and a quote token. Using the "WETH-USDC" pair as an example, WETH is the base token and USDC is the quote token. When you buy or sell a base token, you will pay or be paid in the quote token.

Here is a when someone did a trade on DODO. And here is what the "BuyBaseToken" log looks like:

2. The "Deposit" and "Withdraw" logs for providing or withdraw liquidities

When you provide or withdraw liquidities on DODO, the Deposit and Withdraw logs are the ones to pay attention to. Each trading pair has its own liquidity pool. The logs.address attribute shows you which trading pair sent this log. In the below examples, both Deposit and Withdraw logs are from the same contract "0x0D04146" which is the "COMP-USDC" trading pair.

3 The "Deposit" log for mining

When you withdraw from the mining contract, there is no special "Withdraw" log. Instead, your DLP token will be burned (sent to the 0x00000000000 address) and you will automatically withdraw from the liquidity pool.

4. Trading fees

When you trade most tokens, there will be a trading fee. For example, in this transaction, you will find a "Donate" log. Based on the address of the log, it is a "LINK-USDC" pair (0x562c0b21). In this example, the amount parameter of "Donate" log is 4031233500000000000 and the isBaseToken parameter is true. That means 4.0312 LINK tokens (18 decimals) were paid as a fee. In the "BuyBaseToken" log, 1151.781 LINK tokens were purchased. So that's roughly 0.3% trading fee collected.

The log.address "0xCa7b063" is the contract address of the trading pair SNX-USDC. The receiveBaseparameter shows the amount of SNX token that was bought and the payQuote parameter shows the amount of USDC that was paid. You can find the whole list of the trading pairs .

The log on the left shows that a person deposit 9.17 COMP tokens (18 decimals) while the log on the right shows a person withdraw 25491.608084 USDC tokens (6 decimals). The parameter isBaseToken is the key to tell whether it's COMP (base token) or USDC (quote token).

Once you deposit tokens into a liquidity pool, you will receive "DLP tokens" in return. After you deposit the "" into the mining pool, your official mining career will kick off . Although the log is called "Deposit", its parameters are very different from the "Deposit" log for providing liquidities. And the address of the log is 0xaeD7384 which is . Take a look at below screenshot.

But there is an exception for trading pair wCRES-USDC. In the below , instead of recording the fee in "Donate" log, the new log is called "ChargeMaintainerFee" which is 0.1% of the trading amount.

👆
here
Example: "24H trade volume"
Example: Deposit & Withdraw
😁
DLP tokens
DODO Mining contract
transaction
Dodo
Proactive Market Making
https://scout.cool/dodoex/mainnet/dashboards/dashboard-1
transaction