🔍
Risk Engine
The Risk Engine acts as nervous system of YOP

## What is the Risk Engine?

The aim of the Risk Engine is to bring transparency to DeFi and effectively communicate the risk that is being taken to achieve a certain level of return. Apart from communicating the risk/reward, the Risk Engine also aims to educate users by clearly breaking down risk factors and what they mean.

## What is the Trust Score?

The Risk Engine takes in numerical inputs to determine the level of risk when utilising a particular DeFi strategy to generate yield on your tokens. This is done by combining identified risk factors in varying weights in order to output a Trust Score out of 10 (higher score = less risk).
In the formula below, we can see the Risk Factors (AU, TS, AS...) being combines with weights. These weights are pre-determined for each factor and add up to 1. Each of the Risk Factors are scored out of 10 (they are detailed in section below).
Note: This documentation is work in progress and calculation methodology will be subject to change. Updates will be effectively communicated.

## What are the Risk Factors?

In the following, there is a description of the 6 factors that are individually scored and combined to calculate the Trust Score for a strategy. The datapoints used to score the individual factors are also outlined.
Each of the following 6 Risk Factors can be categorised into 2 types:
• Smart Contract Risk: Refers to the potential of a smart contract exploit result in a loss of funds for users.
• Strategy Specific Risk: Considers specific risk elements of the strategy that could result in a significant impact to returns.
1. 1.
Audit Score (AU): Smart Contract Risk
This highlights the quality and quantity of external audits that have been conducted on the smart contract being utilised for the strategy. Higher score = lower likelihood of exploit.
$AuditScore = AuditBreadth * AuditorTrust$
$AuditBreadth = Contracts Audited / Contracts Used$
Notes:
• AuditorTrust is assigned to each auditor based on their quality of historical audits, reputation and experience. These scores are scored internally.
2. TVL Score (TS): Smart Contract Risk
This looks at the total value locked (TVL) of the particular protocol that is being utilised to generate yield. This highlights the extent to which the protocol has matured and established trust within the community. Higher score = lower likelihood of exploit.
$TVLScore = TVLScoreBand(ProtocolTVL, Chain)$
Notes:
• TVLScoreBand function takes in the total value locked and chain as input, to return a score out of 10.
• Score boundaries adjust based on the chain being utilised
• TVL is a 1-month average based on historical data
3. Age Score (AS): Smart Contract Risk
This factor refers to how long the set of smart contract being utilised have been live for. The idea comes from Lindy's Law - stating that longevity implies a resistance to change, competition and greater odds of continued existence. Higher score = lower likelihood of exploit.
$AgeScore = AgeScoreBand(ContractAge)$
Notes:
• AgeScoreBand function takes in the age of the smart contract being utilised to return a score out of 10.
4. Underlying Liquidity Score (UL): Strategy Specific Risk
This factor refers to the liquidity of the pegged asset(s) that need to be held to participate in a particular strategy. Higher score = lower likelihood of losses due to slippage.
$UnderlyingLiqScore = UnderlyingLiqBand(MarketCap, Minus2Liq)$
Notes:
• UnderlyingLiqBand function takes in the market cap and the -2% liquidity of the underlying token to return a score out of 10.
• Market Cap & -2% liquidity of underlying is a 1-month average based on historical figures
5. Reward Liquidity Score (RL): Strategy Specific Risk
This factor refers to the liquidity of the reward tokens (if applicable) - that usually make up a large majority of returns. Low liquidity tokens have the potential to impact overall returns. Higher score = lower likelihood of losses due to slippage
$RewardLiqScore = RewardLiqBand(MarketCap, Minus2Liq)$
RewardLidBand function takes in the market cap and -2% liquidity of the reward tokens to return a score out of 10.
6. Principal Safety Score (PS): Strategy Specific Risk
This looks specifically at the degree to which the principal amount invested in the strategy is "safe". Considers elements such as impermanent loss, bank run and price risks. Higher score = lower likelihood of loosing portion of principal investment.
$PrincipleScore = PrincipleBand(StategyType, Relevant Input)$
Notes:
• The PrincipleBand function takes in the type of strategy and relevant numerical input based on the strategy, to return a score out of 10.
• Current supported strategy are Liquidity Provision (looking at pair correlation) and Lending (looking at pool utilisation rate).

## Where can I see the Trust Score in the YOP dApp?

Currently, the TrustScore is being utilised internally to evaluate Strategies. The user facing implementation will come into effect in the "Strategy Deep Analytics" phase of YOP - see Roadmap.