Fuse Pool DAI Allocation
Q1. How are the tokens in the DAI Vault being allocated into the various Fuse Pools?
Introduction
Rari Capital is a suite of decentralized finance protocols on a mission to bridge the gap between technical and non-technical minds, in order to bring the next wave of mass users into this industry.
Product EARN
The Yield Aggregator system optimizes for the highest returns across a series of protocols within the Ethereum DeFi ecosystem. Our USDC and DAI pools are broadcast into stable-asset strategies, while the ETH pool maintains exposure to price volatility of Ethereum. These pools earn yield for users by lending and farming across various DeFi protocols such as Compound Finance, dYdX, KeeperDAO, mStable, yEarn, Aave, and Fuse Pools. We are actively expanding our strategy set to focus on more sustainable yields on and off of the blockchain. The pools are now playing an active role within Fuse by providing liquidity to borrowers, as well as letting pool depositors reap the benefits of high-yield opportunities.
Rari Capital DAI Pool
The Rari Capital DAI Pool allows users to deposit DAI or any ERC20 token and receive $RDPT in return. The $RDPT token tracks your interest-accruing position. All ERC20s will be swapped to DAI (meaning there is slippage for all deposits except DAI). As a holder of $RDPT, the Yield Aggregator protocol is working autonomously to deliver the highest yield on your principle.
Rari Capital USDC Pool
The Rari Capital USDC Pool allows users to deposit USDC or any ERC20 token and receive $RSPT in return. The $RSPT token tracks your interest-accruing position. All ERC20s will be swapped to USDC (meaning there is slippage for all deposits except USDC). As a holder of $RSPT, the Yield Aggregator protocol is working autonomously to deliver the highest yield on your principle.
Methodology
This analysis will explore how the tokens in the DAI Vault are allocated to different Fuse Pools since they are not an important part of the investment strategy compared to other yield platforms or investments.
Rari DAI Vault Dashboard shows some useful data for our analysis. On the lower left part, the most recent transactions are shown and on the lower right part, a transaction history is linked. By comparing a couple of transaction logs, I am abe to identify two addresses that are common for all transactions:
tx_to_address = '0xafd2aade64e6ea690173f6de59fc09f5c9190d74'
as the DAI Vault Controllertx_from_address = '0x1e87ebbe2e02037dd4697d443c5507ff97959c99'
as the address sending the funds
The transactions found have different events. I will use the Pool Allocation events to identify the pools and the Transfer events to gather the amounts allocated as well as the type of transfer (deposit or withdrawal).
Results summary
-
Each pool received a big 7M deposit on November 1st 2021.
-
Prior to that Fuse-6 and Fuse-18 had received several smaller allocations, and on October 11th, two withdrawals of were done from these pools (1.8M for Fuse-6 and 1.7M for Fuse-18). Fuse-7 received a deposit of 1.7M on that same day.
-
On January 31st 2022, Fuse-18 got a withdrawal of 2.2M that was deposited in Fuse-6 on the same day, while Fuse-7 received a deposit of 1.1M after the same amount was withdrawn from Fuse-6.
Conclusion
A very interesting bounty that was a big challenge due to the intricacies of the smart contract controlling Rari's DAI Vault. Although the 3 main pools are correctly identified according to the Rari DAI Vault Dashboard, distribution is slighty different and quantities are off by a magnitude order. I couldn't find a way to get to the same results.
This bounty was updated on May 22nd after being discussed originally 2 months before personally with user s.castellano as well as on Discord chat. Analysis and queries are my own.
Two CTE are created and joined following the structure below:
-
POOLS table queries the
ethereum.emitted_events
table for transactions with the two addresses identified above as contrains and additionallyevent_name = 'PoolAllocation'
. By searching the tx_id on etherscan I can map theevent_inputs:pool
variable to the pool name with a case. -
TRANSFERS table queries the
ethereum.emitted_events
table for transactions with the two addresses identified above as contrains and additionallyevent_name = 'Transfers'
. I will identify txs with theevent_inputs:from = '0xafd2aade64e6ea690173f6de59fc09f5c9190d74'
as deposits to a Fuse Pool (+ amount) andevent_inputs:to = '0xafd2aade64e6ea690173f6de59fc09f5c9190d74'
as withdrawals from a Fuse Pool (-amount). -
These two tables are joined to obtain the distribution of all transfers to and from the DAI Vault Controller by pool name.
Figure 2. shows the single transfers by amount with Deposits as positive amount and Withdrawals as negative. Aditionally, Figure 3. shows the pool allocations over time by type, with marker size as the allocation amount.
From these graphs, three big deposits of 7M to each of the Fuse Pools on the same day can be identified. Smaller deposits and withdrawals can also be seen, specially for the Fuse-6 pool.
The query has been set to refresh daily, so results can change slighty, especially to concrete numbers mentioned in the dashboard.
Analysis by @KaskCEA powered by Flipside Crypto