In the world of decentralized finance (DeFi), the importance of data analysis and visualization cannot be overstated. These tools not only help in understanding market dynamics but are also pivotal in gauging the health and trends of projects. While we can extract a wealth of raw data from Chainbase, this data often requires further cleaning and processing to provide us with more intuitive and specific information. This is where Flipside comes into play, offering a powerful data visualization platform that allows us to effortlessly transform the raw data extracted from Chainbase into vivid and insightful charts and analyses.
This article, using two illustrative examples, will walk you through the process of extracting MakerDAO data from Chainbase and visualizing it effectively with Flipside, enabling you to uncover the deeper insights and value hidden within the data.
To assess the health of the MakerDAO market, we first need to focus on the following key indicators:
We can extract this information using the following Chainbase query:
# chainbase
query MyQuery {
ilks {
marketAddress
}
markets {
createdTimestamp
cumulativeBorrowUSD
cumulativeDepositUSD
isActive
totalValueLockedUSD
}
To delve deeper into the analysis, we can import this data into Flipside and query for specific marketAddress values.
# filpside
SELECT
round(VALUE:"cumulativeBorrowUSD",2) AS "cumulativeBorrowUSD" ,
round(VALUE:"cumulativeDepositUSD",2) AS "cumulativeDepositUSD" ,
round(VALUE:"totalValueLockedUSD",2) AS "totalValueLockedUSD" ,
VALUE:"isActive"::string AS "isActive"
FROM
(
SELECT
chainbase_utils.post('/v1/subgraphs/ethereum_makerdao/1.0.0',
{
'operationName':'MyQuery',
'query':
'query MyQuery {
ilks(where: {marketAddress: "{{marketAddress}}"}) {
marketAddress
}
markets {
cumulativeBorrowUSD
cumulativeDepositUSD
isActive
totalValueLockedUSD
}
}'}) :: variant AS resp
) AS subquery,
LATERAL FLATTEN(input => resp:data:data:markets)
Where isActive = “TRUE”
## eg.
marketAddress: 0x24e459f61ceaa7b1ce70dbaea938940a7c5ad46e
Through visualization, we can get some insight from the data:
Liquidation events are a crucial metric in the DeFi market, helping us understand the risk conditions of the market. Here are the key data points we can analyze:
query MyQuery2 {
liquidates {
amountUSD
asset {
lastPriceUSD
name
symbol
}
timestamp
}
}
To delve deeper into the analysis, we can import this data into Flipside (similar to the first example).
We can conduct the following two analyses:
Display the changes in amountUSD over time to observe the frequency and scale of liquidation events. A high frequency of liquidation events might indicate market instability or high risks.
Using pie charts, showcase the average liquidation amounts and counts for different assets. This can help identify certain assets that might be more prone to liquidation, possibly due to their market volatility or liquidity.
After creating the dashboard, the final presentation is as shown below:
Link:https://flipsidecrypto.xyz/pyours/makerdao-1vJUeJ
MakerDAO stands as a pivotal player in the DeFi landscape. Analyzing and visualizing its data offers profound insights, proving indispensable for investors and market researchers alike. Through the analysis methods mentioned above, we can delve deeper into the market’s vitality, potential risks, and liquidation patterns. We hope this guide offers valuable insights and guidance for you.
Chainbase is an open Web3 data infrastructure for accessing, organizing, and analyzing on-chain data at scale. It helps people to better utilize on-chain data by combining rich datasets with open computing technologies in one data platform. Chainbase’s ultimate goal is to increase data freedom in the crypto.
More than 5,000 developers actively interact with our platform and over 200Mn data requests per day as their data backend and integrate chainbase into their main workflow. Additionally, we are working with ~10 top-tier public chains as first-tier validators and managing over US $500Mn tokens non-custodially as a validator provider. Find out more at: chainbase.com
Sign up for a free account, and Check out our documentation.
Website|Blog|Twitter|Discord|Link3
The Original Link:https://chainbase.com/blog/article/visualizing-maker-dao-data-using-chainbase-api-and-livequery
【免责声明】市场有风险,投资需谨慎。本文不构成投资建议,用户应考虑本文中的任何意见、观点或结论是否符合其特定状况。据此投资,责任自负。