top of page
Search

No Ponzi No Problem - Method for evaluating Risk in DeFi

  • Writer: Adaptive Alph
    Adaptive Alph
  • May 22, 2022
  • 12 min read

Risk Management in DeFi

Unless you are 100% confident in your own ability to comeback or perhaps just enjoy living simply then never experiencing total loss is by far the most important objective in investing. The absolute simplest approach to prevent total loss is not putting all eggs in one basket, which is achieved through diversification. In Tradfi, sophisticated banks, investors and institutions have methodically developed and refined risk management frameworks relying on robust analysis including standard deviation, skew, counterparty analysis, credit risk, beta, kurtosis, volatility, correlation, covariance, factor analysis and basket approach to underpin prudent and diversified investment portfolios. However, although some of these measurements are useful in DeFi, digital asset risk management frameworks require additional methods and measurements to analyze risks specific to DeFi protocols including concentration, oracle, admin, governance, blockchain and operational risk. Some DeFi risks are idiosyncratic meaning protocol specific, while others are systematic meaning risks impacting the entire digital asset space. Analyzing the impact of systematic risk in digital assets is therefore super important considering how a certain protocol is impacted by systematic and idiosyncratic risk, which I have done by comparing the risks for Anchor protocol versus a Balancer Stable pool. Keep in mind that all numbers and conclusions were made prior to the Terra Luna collapse.

What is Risk Management in Crypto?

A risk-management framework is both a method and a tool in a toolbox for degens and normies to make informed decisions when investing in DeFi protocols. DeFi is different from Tradfi because software code replaces functions like custody, exchanges, insurance and lending provided by institutions like banks in Tradfi. Ultimately, DeFi is just a word for describing financial applications that use open source algorithms or so called smart contracts built on top of blockchains to circumvent intermediaries, which essentially creates functioning markets in a more transparent and democratic fashion. DeFi involves manual risks that I do not want to analyze because advances in DeFi technology will remove those. However, these manual risks include inconveniences like creating multiple decentralized wallets for different blockchains, safekeeping passwords, high transaction fees and fat finger mistakes preventing institutions and high net-worth individuals from tapping into the DeFi market Despite above inconveniences normal to any new technology, DeFi protocols have some useful properties compared to Tradfi, as DeFi is:

o Interoperable § No arbitrary restriction such as wealth, nationality, age or bank § No middlemen and rent seekers control the system o Programmable § Smart contracts that are transparent and can be permissionless o Composable § DeFi is built lego structures, but instead of lego pieces code is written to interact with

existing code, which in turn creates new DeFi structures

Following DeFi applications exist: o Gambling o Payments o Farming o Lending borrowing o Bridges o Insurance o DAO o Derivative markets o Prediction Markets o Videogame economy DeFi democratizes access to capital by allowing individual users to pool together resources and take on credit and market making risk instead of institutions. The analysis between Anchor and Balancer is a proprietary risk management scoring system as a tool to facilitate informed DeFi investment decisions. With an agnostic framework for measuring DeFi protocol risk, investors can compare and invest in preferred protocols more easily.

My Risk Management Framework

The key to create a holistic DeFi risk framework is to standardize risk scores so that evaluating risk between different types of DeFi protocols is possible. Developing a risk scoring method that is invariant to DeFi protocols requires both a macro and micro risk analysis. After the initial analysis, I categorize and breakdown risks into underlying components that become risk scores. Capturing all risks associated with a DeFi protocol is a herculean task, but the objective of my framework is to be as close as possible. I will demonstrate the risk-management framework through application on two different DeFi platforms for investors seeking fixed income-like yield generated by assuming systematic and idiosyncratic risk including credit and market making risk, which is what the risk-management framework aims to break down further.

- DeFi yields come in the form of transaction fees, staking profits and rewards from counterparties like borrowers or traders and platforms seeking to increase leverage, repaying liabilities without realizing tax on gains and losses or expanding user base.

- The first DeFi platform is the Anchor Protocol, which is a lending platform on the Terra Blockchain

- The second platform is the Automated Market Making Polygon blockchain based stable pool on Balancer.

- Note that Balancer is a multi-chain Automated Portfolio manager and liquidity provider platform consisting of many different types of AMM pools.


· Risk Scoring System is equal weighted and applicable across DeFi Applications o DeFi lacks history to robustly quantify risks o Protocol scores and weights will adjust over time · Main Risk components out of 100 % with 100% being the riskiest o Systematic Risk o Operational/Smart Contract Risk o Financial Risk o Credit Risk o Centralization Risk · Sub-component rating between 1-10 to capture structural DeFi differences · Analysis for all tokens is based on a 365 day timeseries from Yahoo Finance o Anchor and the Balancer Stable Pool both went live in 2021 · Score System uses monthly and daily data capturing spikes and trends in Collateral o The 95-VaR is based on daily data o Rolling Volatility and pair Correlation is based on 30-days o Marginal VaR and Volatility is based simple additive math (no corr) o Balancer uses a point in time method for marginal contribution How to break down idiosyncratic and systematic risk in a risk management framework?

o Systematic risk

§ Factors impacting the entire DeFi space such as regulation and macroeconomics § DeFi protocols can be more or less exposed to systematic risk o Idiosyncratic risk

§ Risk specific to the DeFi platform o DeFi protocols can be divided into smart contract risk, financial risk and centralization risk. § The risk is equal weighted across risk factors § The four main risk factors are further decomposed into equal weighted sub-components o Systematic risk § Regulatory risk § Currency and Blockchain risk o Operational/Smart Contract risk § Time on main-net § Previous exploits § Public Audit § Recent Audit § Bug bounty program o Financial risk § Credit risk · Collateral Volatility · Collateral Makeup · Utilization ratio · Absolute Liquidity § Governance Risk § Market Making Risk o Centralization risk § Oracle risk § Admin risk



Holistic Framework and Risk Scoring Assumptions


DeFi investors earn Risk Premiums

Holistic Framework

Proprietary method to quantitatively and qualitatively accounting for:

- Systematic, Operational/Smart Contract, Financial, Credit and Centralized Risks

Each risk component is divided into sub-components to standardize structural differences between investment platforms

The Risk Score is a method to standardize risks across DeFi applications

The Final Risk Score is relative and not absolute

Lower Risk Score is better


“ A Risk protocol score of 40% compared to 60% means that for the same level of expected return the 40% protocol has higher risk-adjusted return even if the two protocols generate returns to investors from engaging in separate activities like Lending and Automated Market Making”








Understanding the Risk Factors


Systematic Risk: Impacts all blockchains, DeFi protocols and currencies.


Systematic DeFi risk decreases with general public acceptance. If a platform is regulated in many countries that means acceptance. However, if platform tokens, blockchains or admins are being investigated that is a risk to liquidity providers and lenders. The Anchor Protocol is under SEC subpoena, which is a risk. For Balancer, I could not find anything special so the regulatory risk is general in comparison to the DeFi industry.


· https://www.theblockcrypto.com/linked/134758/judge-orders-terraform-labs-to-comply-with-sec-subpoenas



All DeFi protocols are exposed to interconnected currency and blockchain risk. For example, stablecoins like USDC in the Balancer Stable Pool are used as collateral for minting DAI, which is an algorithmic stablecoin. On the Anchor Protocol, the APR received by lending UST to borrowers is exposed to price risk of Luna and Eth. Depreciation in Eth also impacts Ethereum based platforms like Balancer. Although though both Anchor and Balancer are two of the largest DeFi platforms in the world, neither of them has proven track records. The Balancer Stable Pool is on a layer 2 blockchain and riskier than a layer 1 pool due to the Polygon Bridge, which is a centralized attack vector for a hacker. Anchor is risky because the collateral has a high beta exposure to volatile cryptos like Luna.





Operational/ Smart Contract Risk: DeFi relies on software code. To minimize coding risks, a DeFi platform should have at least one public audit and also offer a bug bounty program to prevent future hacker attacks. Previous exploits demonstrate that the platform is insecure and more time on a mainnet shows long-term vitality.


Anything DeFi before the first well-known DeFi platform Maker in 2014 is BC. Longer time on the mainnet is better because the risk score adjusts dynamically with time (the metric score dates back to 2014: 8/5 = 1.6). Balancer and Anchor launched on respective Mainnet in 2021, which means that in terms of long-term viability both are in the bottom 20% and have demonstrated almost nothing. If the two platforms survive over time, they will improve on the mainnet score.


· https://dyor-crypto.fandom.com/wiki/Anchor_(ANC)?so=search


More exploits lead to a relatively worse exploit score. After doing some research, I concluded that more than 3 shows lack of coding skills, but this may change with time as hacker attacks increase. Anchor has not been hacked directly although it had an oracle misspricing in December 2021. Balancer suffered a pool drain of 535 KUSD and a dydx flash loan potentially draining unclaimed Comp token in June 2020.



More recent audits show code strength. Anchor, according to my research, only has one audit prior to launch on the mainnet so it fails to get the highest score. Balancer gets the highest score.


· https://dyor-crypto.fandom.com/wiki/Balancer_(BAL)


Bug Bounty Programs demonstrate the protocols willingness to prevent future attacks. Both protocols have massive bug bounty programs.





Financial Risk: is the possibility of losing money from investing. To minimize investment loss in DeFi when making simple parameter tweaks and more complicated protocol maintenance updates, decentralized protocol governance is preferred over centralized governance to prevent whale accumulation, hacks and manipulation. APR and rewards should be consistent and based on fundamentals rather than just incentivizing short-term high trade volume. Borrowers should be overcollateralized and uncorrelated. Tokens in a liquidity pool should be correlated. In addition, the Stable pool and lending protocol should demonstrate market depth to limit market making risk.


Governance risk in DeFi refers to the probability that whales, admins or hackers manipulate or take advantage of protocol proposals for their own benefit. Both Balancer and Anchor use native governance tokens to prevent concentration of power by distributing the token widely within their respective community. Each governance token represents a vote. Holders of more governance tokens have a stronger voice when voting on proposals to improve the DeFi platform. Anchor is based purely on programming risk as no admin keys exist. This can be good if whale concentration is low, but sadly there is a large whale concentration in Anc. Balancer also has a large whale concentration, but admin keys allow at least some type of power balancing mechanism.



Market making risk and price impact is basically impermanent loss, which is low for stable pools like Balancer even if the single vault model increases smart contract risks due to complexities. Balancer uses Stable Math, which is a tailored approach to liquidity provisioning that increases capital efficiency and liquidity around the 1:1 peg ratio, which increases trading volume and lowers fees. From a lending perspective, Anchor provides users with immediate withdrawal with no market making risk. The Anchor fee is high, but expected to decrease.



APR should be consistent and high. The Anchor Protocol holds around 4.4 billion of BLuna and 1.3 billion dollars of Beth in collateral. With current 19% APR and based on 11.3 billion in Anchor deposits, around 2.1 billion needs to be paid out to depositors in 2022, which means an underfunding of 1.5 billion dollars per year. The Anchor APR is derived from two components. Part 1 of the lending reward is distributed through Bluna and Beth staking rewards and part 2 is interest paid by UST borrowers. Anchor Protocol’s proposal 20 just passed so Anchor APR will drop by 1.5% per month until the equilibrium rate is achieved. Note that the Anchor protocol has a special treasury used to fund Anchor lenders, which recently received injected liquidity of 450 MUSD.


The Balancer DAI-USDC-USDT-MiMatic stable pool APR comes from 3 parts. Part 1 and 2 rewards are distributed in the form of Bal and Qi tokens, as Balancer partnered with QIDAO when launching the stable pool. These special rewards are likely to decrease over time, but hopefully the rewards increase volume and transaction fees generated to LP’s, which is the third and final part of the Balancer APR.


The Bal token is more fundamentally driven with all the updates coming to Balancer and I therefore see spillover effects including increased pool trading volumes across the board, while Anchor and Anc is almost purely reward driven.


· https://wantfi.com/terra-luna-anchor-protocol-savings-account.html


Concentration risk is related to correlation risks in supplied collateral or tokens invested in a liquidity pool. For the Anchor protocol investors, UST is the only asset deposited, but the correlation of Eth/Luna collateral provided by borrowers is 0.65 on monthly basis on data from Yahoo finance (not staked price) over the past year, which suggest high collateral correlation. Eth can be sold quickly, but Luna staking borrowers must wait 21 days for locked Luna to be sold, which decreases the likelihood of repaying UST loans in a flash crash. This means a high concentration risk and a potential haircut for Anchor lenders. In addition, over 50% of BLuna borrower collateral in Anchor is held by 4 wallets.


For Balancer the concentration risk is high due to off protocol use of USDC and USDT as collateral for DAI. In turn, DAI is used as collateral for MiMatic. If either USDC and USDT is a fraud or frozen, it will have a severe impact on all Balancer liquidity pools. That means the four stablecoins in the pool might not be as safe as one might think even if they are highly correlated.


· https://wantfi.com/terra-luna-anchor-protocol-savings-account.html





Credit Risk: is the loss from failure to repay loans and is a big part of lending protocols like Anchor, while perhaps less so for Balancer.


Even if Bitcoin is deflationary, it makes sense to use the gold standard as a comparison tool for crypto volatility. The 30-day volatility metric aims to capture medium term trends in collateral volatility. Higher collateral volatility implies a higher likelihood for liquidations. Based on data from April 2021 until April 2022 from Yahoo finance with Luna accounting for 80% of collateral value and Eth only accounting for 20%s, Anchor’s collateral volatility is much higher than Bitcoin. Over the past year, Luna has had a monthly volatility of 46% compared to Bicoin’s 26%.

Balancer uses four stablecoins with very low individual monthly volatility. Balancer does not get the highest score because MiMatic’s rolling 30 day volatility looks strange (Look at graph in the presentation).


Unlike 30-day volatility, the daily 95VaR metric measures spikes in token price over a very short one day time frame. Having two different methods over two different time periods to measure price swings is important to evaluate the stability of a DeFi platform. Luna and Eth collateral on Anchor both have a daily 95-VaR that is much higher than BTC, but there are some correlation benefits, while borrowed UST has a low daily VaR. The Balancer stable pool consists of assets that have extremely low VaR. MiMatic daily VaR sticks out and prevents Balancer from a perfect score.


AAVE is perhaps the most tested DeFi platform existing today and sets the baseline for the Collateral/Provider Ratio risk scoring metric. Depending on existing market conditions, the highest LTV achievable on AAVE is 80% for some stables. In comparison, Anchor has a max 60% and 80% LTV for Beth and Bluna respectively, which is high for volatile cryptos. Current Anchor LTV is around 47%, but it’s concentrated with few holders. Unlike Anchor, Balancer is an automated portfolio manager meaning there is no LTV. However, some Balancer assets are used as collateral in LTV format on other chains, which adds some risk. USDC is for example locked up in the DAI protocol and that is why Balancer does not get the highest score.



Illiquidity with high gas fees leads to higher risks and unpopular DeFi products. Constant product pools are wasteful for coins with a stable relationship because it provides liquidity across an infinite spectrum rather than concentrating depth around the stable price. For Balancer, the stable price is 1 so Stable Math increases liquidity and market depth around 1, which in turn increases capital efficiency relative to constant product pools or concentrated pools with higher volatility assets. Anchor is a lending protocol offering immediate withdrawal and therefore gets the perfect score.




Centralized Risk: The whole objective of DeFi is to move away from centralized sources of risk. Admin risk and Oracle pricing risks are perhaps the two most important attack vectors to protect against in DeFi because they are difficult to decentralize!


DeFi prefers democratic voting by governance token holders rather than yielding power to developers. In Balancer, 11 key community members have access to the admin key. However, a multi-sig access means that individuals have no decision power or custody control over Balancer protocol contracts. Balancer V2 allows multi-sigs to set protocol fees. Changes by Balancer admins is time-locked and a potential DAO decentralization governance is in the works. Anchor protocol relies on smart contracts and there is no admin key.


· https://dyor-crypto.fandom.com/wiki/Anchor_(ANC)?so=search


Oracles are responsible for pricing DeFi assets accurately either based on on-chain or off-chain data. These oracles can be centralized or decentralized and obviously DeFi prefers that latter as it lowers oracle risk. Anchor has traditionally used its own oracle and actually miscalculated the BLuna price on December 9 2021. If the change has not already happened there is a proposal to let an outside oracle like Chainlink for accurate pricing. The recent oracle problem leads to a low score for Anchor on this metric. For Balancer, the price of the tokens is determined by the supply of tokens in the pool. If someone buys one asset in the pools with another asset. The price of the bought asset increases and the price of the remaining assets decreases. Balancer uses single deposit and stable math so Balancer is extremely efficient in terms of pricing.


· https://dyor-crypto.fandom.com/wiki/Oracle

 
 
 

Comentarios


Post: Blog2_Post

Subscribe Form

Thanks for submitting!

  • Facebook
  • Twitter
  • LinkedIn

©2019 by Finance 3.0 - Adaptive Alpha. Proudly created with Wix.com

bottom of page