AIP - 41: IntoTheBlock Economic Risk Explorer Proposal

Description of Proposal and IntoTheBlock

Summary

IntoTheBlock (ITB) is requesting a grant to build a suite of risk management indicators and dashboard for Angle and its community.

  1. Dashboards that include indicators that allow monitoring of both protocol, pool-specific, and asset-specific economic risks
  2. API access and interactive documentation
  3. Raw data access via CSV download for all metrics at hourly resolution
  4. Documentation of each indicator with practical examples of how to use them in order to prevent risks. similar to our resources pages (Appendix).
  5. Quarterly updates by ITB’s team to add support for new assets

The dashboard would be hosted and accessible within ITB’s platform in a new risk management section. The offered indicators and its raw data would be openly available for anyone without any additional costs or account needed, similarly to how our DeFi Insights (Appendix) are accessible now. These indicators will be easily accessible through our app by all current ITB analytics users, giving Angle’s protocol additional exposure to new potential users.

About IntoTheBlock

ITB was founded in 2019 and is currently one of the largest crypto market intelligence providers. We have support in our app for custom analytics for more than 9 blockchains, +1000 coins, +5000 NFT collections, and 10 DeFi protocols, as well as other traditional finance metrics. Our analytics are available for both retail users and institutions, integrating with partners such as Binance, CoinGecko, CoinMarketCap, Bitstamp, Deribit, Decrypt, Coindesk, and Tradingview, in addition to 300+ other companies.

IntoTheBlock has been deeply involved in the DeFi ecosystem over the past two years. Specifically, the recent work has been on building quantitative strategies for institutions based on DeFi protocols. Through our DeFi Quant Platform, we have helped over 20 of the largest crypto institutions deploy more than $1B in assets via sophisticated, non-custodial strategies aided by our risk management models. Risk monitoring and management are the cornerstone of the ITB DeFi Quant platform allowing institutions to interact with DeFi protocols while effectively managing economic risk.

Motivation

DeFi protocols are susceptible to two overarching types of attacks. Hacks are the first type of attack that protocols face. These attacks are mitigated through a team’s coding expertise and audits from external groups.

Economic attacks are the second type of attack. Lending and Collateralized Debt Position protocols have increased exposure to these attacks due to the interactions that external actors (e.g., borrowers, lenders and liquidators) have with the protocol. The risks that transactions such as borrowing, leverage, perpetuals, and liquidations carry cannot be fully mitigated by smart-contract code and therefore need to be monitored.

Through ITB’s research into Angle protocol, we have identified three primary categories for risk monitoring. First are the risks associated with the borrowing component of the protocol. Indicators for this category will include assessments of loan health, liquidation metrics, and information on leveraged positions. The second category focuses on the agEUR stable coin from Angle, with indicators that cover available liquidity across DEXes, slippage simulations in liquidity pools and liquidity pool asset distributions. Third, ITB will develop indicators to monitor the health of the perpetuals market on Angle. As the perpetuals market plays a pivotal role in hedging price volatility of the collateral used in backing the minted stable coins from the protocol, monitoring the health of this market supports the overall stability of the protocol. Within each of these categories, ITB will develop indicators with an exclusive focus on monitoring whale activity. Whale activity can have systemic impacts on protocols and therefore it is important to monitor their positions.

ITB has expertise in risk management models from our experience in safeguarding assets deployed by institutional investors into DeFi protocols. Through our risk explorer initiative, ITB aims to bring access to our risk indicators to the larger DeFi ecosystem and community. If the Angle grant proposal passes, the risk dashboard for the protocol will be publicly available. Both Angle’s team and users will have access to the indicators through ITB’s risk explorer app, via an open API, and by downloadable csv data.

Risk and Implications

The development of the risk dashboard for Angle will carry negligible risk to the protocol itself. This is in part due to the dashboard not requiring any changes to Angle contracts. Implementation of the risk dashboard aims to reduce the potential impact of economic risks to Angle protocol by providing advanced monitoring capabilities to the team and community.

Added Value to Angle Protocol

ITB’s risk dashboard will add value to Angle Protocol by developing new and complementary risk indicators to the existing analytics on Angle Analytics and Angle’s Dune dashboard. Specifically, the dashboard will add value through:

  • Data accessibility: All indicators will have historical CSV exports and API access. This will allow the Angle team to incorporate indicators into their website or allow users to access and develop their own dashboards for personalized analysis.
  • Democratizing analysis and monitoring capacities: ITB’s innovative indicators such as DEX pool and whale concentration metrics broaden the types of analysis that the team and users can accomplish. Since all indicators will be publicly available, both the team and community can monitor the health of the protocol and flag potential risks quicker.
  • Real time risk monitoring: All indicators are calculated with near real time data. This further improves the speed that different economic risks to the protocol can be identified and addressed.
  • Additional proven metrics: ITB’s risk indicators are well regarded among some of the largest institutions in the DeFi ecosystem. They have been developed by our battle tested engineering team and are in the risk management models ITB uses for the non-custodial investment strategies institutions use. These indicators will provide additional assurance to large institutions who are choosing strategies on capital deployment.

ITB is committed to contributing to DeFi and we believe that through open risk management we can help improve the security and overall health of the space. The goal with this effort is to both help protocols transparently monitor economic risk in their platforms, while also providing tools that allow users to initiate their own autonomous research to provide further insights and strengthen the community. This process has started with approved proposals to other lending protocols such as Euler, Benqi, and soon others that have not been announced yet.

Implementation Requirements

IntoTheBlock is requesting $100,000 to enable near real-time economic risk monitoring and analytics for the Angle protocol. If the proposal passes through community vote, the Angle core team will only need to work with ITB to set up a payment process that is agreed upon by both parties. The risk dashboard and all indicators will be developed by the ITB team and will cover the four main chains Angle operates on (Ethereum, Arbitrum, Polygon, and Optimism). Specifically, the grant will cover the following deliverables:

  • Risk API: REST API enabling access to all the proposed indicators.
  • Risk dashboard: Web interface that includes visualizations of the risk indicators.
  • Documentation and use cases: Complete documentation of all risk indicators included in the release.

A list of the proposed risk indicators and their descriptions can be found in the Appendix. Additionally, ITB’s UX team has created a mock-up (Appendix) to visualize how the indicators will appear in the dashboard (mock-up is currently example data).

Proposal Milestones & Payments

IntoTheBlock is requesting payments to be structured by milestones along with an initial set up fee in the following way:

  1. Upfront payment ($20k)
  2. Risk indicators (dashboard + API) ($40k)
  3. Documentation covering Angle’s risk dynamics ($20k)
  4. Quarterly upgrades and maintenance, such as adding new tokens, modifying metrics based on feedback and to cover infrastructure costs ($20k)

The breakdown of the costs proposed in this budget can be found in the Appendix document.

These indicators are subject to modification based on feedback from the community and Angle’s team. ITB is committed to maintain and expand the capabilities of the Angle risk monitoring solution that address changes to the protocol or market conditions.

Appendix

Proposed Risk Indicators

Risk Parameter By Protocol/Collateral Sub-Category Description Visualization Why is it Useful?
Whale Borrows Concentration Both Demand-Side Historical concentration of deposits by address Stacked line Risk of concentrated exposure from large borrowers
Whale Supply Concentration Both Supply-Side Historical concentration of borrowing activity by address Stacked line Risk of liquidity not being able to be withdrawn if a whale withdraws their liquidity
Whale Credit History Both Demand-Side Tracking large depositors’ loans, repayments and liquidations Table If a whale has a track record of being liquidated, could be likely that gets liquidated again
Whale Liquidity Both Demand-Side Funds available in whale addresses Line An illiquid address could have a hard time at repaying the debt being liquidated
Health Factor Distribution Both Demand-Side Distribution of assets held by addresses grouped by their collateral ratio Stacked line with buckets color-coded based on how close to liquidation (e.g. <1.05 HR = red, 2.0+ = green) If most of the supply has a low health factor, the solvency of the pool/protocol is at risk due to big liquidations.
High Risk Loans Both Demand-Side Value of loans against volatile collateral within 5% of liquidation Line and stacked line (showing % considered as high risk) To understand exposure to high risk loans and anticipating future liquidations
Blocks Elapsed to Complete Liquidations Both Liquidations The number of blocks it takes for an arbitrage opportunity to be filled, showing the USD amount and percentage of the arbitrage filled per block Bar chart up to 100% The faster liquidations are done, the less risk of insolvency.

Blocks elapsed since a $10k liquidation opportunity arises.
Open Liquidations Both Liquidations Number of positions and corresponding volume pending to be liquidated Line + bar Could be a leading indicator of insolvency
Liquidations Simulator Collateral Liquidations Amount of liquidity that would be available given x amount of liquidations taking place Line + custom selection Monitoring liquidators returns after slippage are important since a protocol can have an insolvency in the case that it becomes unprofitable (or less attractive) for someone to liquidate undercollateralized positions
Collateral Asset Liquidity Collateral Asset Liquidity of the asset available in pools outside of the protocol Line If liquidity on the most liquid pools/exchanges drops the profitability of an arbitrageur could be minimized due to slippage and could affect the stability of the protocol by reducing liquidations.

Low liquidity assets are the most vulnerable to flashloan+price oracle manipulation attacks
Whale Exit Evolution Pool Supply-Side Impact that largest addresses would cause on utilization ratio if they were to exit Bar + Line If large depositors withdraw their liquidity, the pool may reach a point where there is no cash available to withdraw at its worst, or sharply increase borrowing costs
Liquidation Levels Collateral Liquidations Price liquidation levels for assets Stacked Bar Know at what asset price big liquidations occur
Collateral to Debt Ratio Protocol Liquidations Ratio of agEUR Market Cap to Angle’s TVL Line Helps to gauge the amount of debt issued by the protocol
agEUR Peg Performance agEUR Stablecoin Historical agEUR price Line Tracks agEUR’s peg to the Euro to monitor for depegging events
Curve/Univ3 Pool Asset Distributions agEUR Stablecoin Distribution of assets for agEURpools in Curve and Univ3 Stacked Line Distribution of assets within stable pools can lead to slippage conditions and precede de-pegging events
DEX Exit Fee Evolution agEUR Stablecoin Simulations projecting agEUR slippage for depositors if whale addresses withdraw their liquidity Bar + Line Projects slippage conditions if largest depositors withdraw
DEX Pool Concentration agEUR Stablecoin Amount and percentage of liquidity provided by largest addresses into agEUR pools Stacked line If DEX pool liquidity is concentrated amongst few depositors, if one of these depositors exit the pool, it can lead to large slippage fees for other users who want to make trades or exit their position in the pool.
Collateral and Vault Leverage Ratio Collateral/vault type Liquidations Current and historical percentage of assets in vaults that are leveraged by X leverage amount stacked area chart Help determine the health of the vault liquidity. Higher amounts of leverage could indicate risk of cascading liquidations.
Perpetuals Open Interest Collateral Perpetuals Stacked bar chart showing perpetuals open interest by addresses ( top 10 largest address and then other addresses) stacked bar chart Hedging agents that open perpetuals help reduce price volatility for collateral used to mint agEUR. Large reductions in O/I can reduce Angle’s volatility hedge and risk destabilizing agEUR’s collateral backing
Perpetuals Whales Protocol Perpetuals Bubble chart showing largest perpetuals users by percent of total open interest. Hovering over bubble gives breakdown of open interest per collateral bubble chart Identifies key perpetual users on the protocol. Understanding the composition of perpetual users helps determine the resilience of the volatility hedge as a whole if certain perpetual whales are liquidated or close their positions.

Risk Indicator Dashboard Mock-up

Link to interactive dashboard mock-up

Document to External Links

Link to the document containing links to ITB’s websites and analytics applications.

Angle Proposal Costs Transparency

The proposal for Angle’s risk monitoring interface will support the engineering and infrastructure costs associated with the solution. Specifically, ITB will rely on the following team and infrastructure components:

Engineering Resources

Role Responsibility Approx Cost
Data Scientist Modeling and backtesting the risk indicators for the Angle protocol $20,000.00
Full Stack Engineer Develop the API endpoints to enable programmable access to Angle’ risk indicators. $20,000.00
Data Engineer Develop the data processing pipeline to collect, cleanup and persist datasets from the Angle protocols in order to be analyzed. $40,000.00
Total $80,000.00

Infrastructure Resources

Component Description Cost
Data Processing Pipeline ETL pipeline based on Apache Airflow to orchestrate the collection of data from the Angle protocol APIs.
Data Lake The data collected from the data processing pipeline will be added to ITB’s data lake based on Google BigQuery. Currently, ITB’s data lake hosts over 150TB of data.
Risk Data Models The risk models will be developed using Keras and TensorFlow stacks
Risk Monitoring APIs The API endpoints will be implemented as a combination of AWS Lambda and AWS API Gateway.
Total $20,000.00
2 Likes

Thank you for putting the proposal. While I can only stress the importance to accurately track risk for the Angle Protocol, I am not sure this kind of risk explorer should be supported by the protocol at the moment.

The protocol already has an analytics and several Dune Dashboards. There are strict requirements and simulations put in place before adding any collateral asset to the protocol, and conservative debt ceilings and limits are ensuring that the protocol is safe in many conditions.
As such, I believe that most of the data that we would get here is data we can already have easily in some way.

As the protocol scales and grows, this is something we could further explore I believe though.

Thank you for your reply and comments @sogipec.

When choosing the risk indicators for this proposal, ITB’s aim was to add indicators that would be complementary to the analytics that Angle has already developed on the protocol and Dune dashboards. The indicators listed in the proposal, we believe align best with this aim, but we are open to suggestions of other risk related indicators from the team and community to add/replace indicators we have proposed.

In regards to the collateral assets chosen by the protocol, the economic risk dashboard ITB is proposing focuses less on the protocol’s parameters for an asset, but instead on user’s interactions with the protocol and external economic risks that can have an impact on the stability of the protocol and the agEUR token. The whale indicators, pool asset distribution, and DEX exit fee evolution indicators are good examples of metrics outside of the purview of the protocol’s parameters for each collateral asset that the economic risk dashboard tracks.

ITB works with some of the largest institutions in the ecosystem. These institutions seek out risk indicators such as the examples above to evaluate their investments and ensure that they deploy into pools and assets where they can minimize the impact of slippage fees and other economic costs of large sized deposits. Therefore, the proposed risk indicators have the potential to increase protocol growth as large institutions have the additional analytics they need to make their deployment decisions.

Nice proposal @itbresearch, thank you. I do agree with @sogipec that I don’t think spending 100k on another risk dashboard at this point would be a wise usage of our treasury, as we already have numerous dune dashboards and our internal analytics, and we could build more indicators if there is demand for it

2 Likes