vault.risk

Documentation for eth_defi.vault.risk Python module.

Vault risk classification.

  • What are the vault risk levels and how they are classified

  • The current data of known protocols

Module Attributes

VAULT_PROTOCOL_RISK_MATRIX

Default classification of vault protocols by their risk profile.

VAULT_SPECIFIC_RISK

Particular vaults that are broken, misleading or otherwise problematic.

BROKEN_VAULT_CONTRACTS

Cause excessive gas fees, RPC havoc.

Functions

get_vault_risk(protocol_name[, ...])

Get technical and developer risk associated with a particular vault

Classes

VaultTechnicalRisk

Vault risk profile enum.

class VaultTechnicalRisk

Bases: enum.Enum

Vault risk profile enum.

This risk profile classification is about the technical risk of the vault. Outside technical risk, you have market risk, volatility risk and such risk factors which can be modelled separately using finance best practices.

  • Used to classify vaults by their risk profile

  • How this vault risk compares to other vaults (All vaults are high risk compared to the traditional finance)

  • Having a point of time technical audit does not meaningfully lower the risk, because all systems should be evaluated as a whole and have continuous transparency and open source development to be considered low risk.

The unverified smart contracts are the biggest red flag, because we cannot verify if they match what the audit says (if there is any).

negligible = 1

See vault technicak risk matrix documentation.

minimal = 10

See vault technicak risk matrix documentation.

low = 20

See vault technicak risk matrix documentation.

high = 30

See vault technicak risk matrix documentation.

severe = 40

See vault technicak risk matrix documentation.

dangerous = 50

See vault technicak risk matrix documentation.

blacklisted = 999

This vault is blacklisted because it is known not to be “real” in a sense it is a developer test, using fake stablecoins or tokens, etc.

By blacklisting vaults, we get them off the reports.

VAULT_PROTOCOL_RISK_MATRIX = {'AUTO Finance': VaultTechnicalRisk.low, 'Accountable': VaultTechnicalRisk.severe, 'Altura': VaultTechnicalRisk.severe, 'Avant': VaultTechnicalRisk.severe, 'Brink': None, 'Centrifuge': VaultTechnicalRisk.negligible, 'Curvance': None, 'D2 Finance': VaultTechnicalRisk.high, 'Decentralized USD': VaultTechnicalRisk.severe, 'Deltr': VaultTechnicalRisk.dangerous, 'Dolomite': None, 'ETH Strategy': VaultTechnicalRisk.low, 'Enzyme': VaultTechnicalRisk.negligible, 'Ethena': VaultTechnicalRisk.negligible, 'Euler': VaultTechnicalRisk.negligible, 'Fluid': VaultTechnicalRisk.low, 'Foxify': VaultTechnicalRisk.dangerous, 'Frax': VaultTechnicalRisk.low, 'Gearbox': VaultTechnicalRisk.low, 'Goat Protocol': VaultTechnicalRisk.low, 'Harvest Finance': VaultTechnicalRisk.low, 'Hyperlend': VaultTechnicalRisk.severe, 'HypurrFi': VaultTechnicalRisk.severe, 'IPOR': VaultTechnicalRisk.minimal, 'Lagoon Finance': VaultTechnicalRisk.minimal, 'Liquidity Royalty Tranching': VaultTechnicalRisk.severe, 'Llama Lend': VaultTechnicalRisk.low, 'Mainstreet Finance': None, 'Maple': VaultTechnicalRisk.negligible, 'Morpho': VaultTechnicalRisk.negligible, 'NashPoint': VaultTechnicalRisk.low, 'Ostium': VaultTechnicalRisk.high, 'Peapods': VaultTechnicalRisk.dangerous, 'Plutus': VaultTechnicalRisk.severe, 'Renalta': VaultTechnicalRisk.dangerous, 'Resolv': None, 'Royco': None, 'Sentiment': VaultTechnicalRisk.low, 'Silo Finance': VaultTechnicalRisk.low, 'Singularity Finance': None, 'Sky': VaultTechnicalRisk.negligible, 'Spark': VaultTechnicalRisk.negligible, 'Spectra': VaultTechnicalRisk.low, 'Summer.fi': VaultTechnicalRisk.low, 'Superform': VaultTechnicalRisk.severe, 'Teller': VaultTechnicalRisk.severe, 'Term Finance': VaultTechnicalRisk.low, 'USDX Money': None, 'USDai': VaultTechnicalRisk.low, 'Umami': VaultTechnicalRisk.severe, 'Untangle Finance': VaultTechnicalRisk.low, 'Upshift': VaultTechnicalRisk.severe, 'Velvet Capital': VaultTechnicalRisk.high, 'Yearn': VaultTechnicalRisk.minimal, 'YieldFi': None, 'YieldNest': VaultTechnicalRisk.low, 'Yo': VaultTechnicalRisk.severe, 'Yuzu Money': VaultTechnicalRisk.low, 'ZeroLend': VaultTechnicalRisk.dangerous, 'aarnâ': None, 'cSigma Finance': VaultTechnicalRisk.severe, 'gTrade': VaultTechnicalRisk.high, 'infiniFi': None}

Default classification of vault protocols by their risk profile.

See eth_defi.erc_4626.core.get_vault_protocol_name() for the names list.

VAULT_SPECIFIC_RISK = {'0x43e3e6ffb2e363e64cd480cbb7cd0cf47bc6b477': VaultTechnicalRisk.blacklisted, '0x942bed98560e9b2aa0d4ec76bbda7a7e55f6b2d6': VaultTechnicalRisk.blacklisted, '0xe5a4f22fcb8893ba0831babf9a15558b5e83446f': VaultTechnicalRisk.blacklisted, '0xea50f402653c41cadbafd1f788341db7b7f37816': VaultTechnicalRisk.blacklisted}

Particular vaults that are broken, misleading or otherwise problematic. Users do not want to interact with these and they cause confusion, so we just drop them from reports.

Lower case address mapping to problem vaults

get_vault_risk(protocol_name, vault_address=None, default=None)

Get technical and developer risk associated with a particular vault

Parameters
Return type

eth_defi.vault.risk.VaultTechnicalRisk | None

BROKEN_VAULT_CONTRACTS = {'0x055ac8b974f075b86fb963e940407168e677585a', '0x061dcb33bba38b2337eb450b89683f0522b1535f', '0x145c56886e2d51f25845624342b461f1b02e8423', '0x1dbfce32a70787002d48b775e774c17b5673aa4a', '0x249caccae4b8a4bc9e0f8e468d7cc9ebfc7e0811', '0x2a0077ed1df4be3963b60191011c76dfe0dd4d9b3', '0x2a7c424a06e1483ceb8f895afacf9561f0786a77', '0x2ccc36852446ad785385d9e4446d4bbeb1cb1bf8', '0x33e6ea47f3dcf45a36fe3e9be1cb9e155d946202', '0x37743836b6011d0655cf6608044c705571417371', '0x390066ab82d71c644fadd977c7e0d3a839b80250', '0x41a5b8aa081dcd69ace566061d5b6adcb92cae1c', '0x4b6ddb08e3ca085dd52266e7fd8ec91010f6f8b5', '0x5705554baa86da01ff4a82d29a1598c5b3a8b476', '0x58383879cec79368ea71ea96dbbf9625f031f08e', '0x5af90c9f0f51e918b19a0be1a0dcd8238bf414a1', '0x6a6e4ad4a5ca14b940cd6949b1a90f947ae21c19', '0x6df33a763e416889724e8913717710cc7c31d8c7', '0x6ea91b94bca202851ccbb73ff4a16a9f879ef414', '0x71829ed960594f5e764b9854c89a308c70500432', '0x7994157f0c9e6199b15e480fdacf702ac4f6d8bb', '0x8529019503c5bd707d8eb98c5c87bf5237f89135', '0x872def0be6a91b212e67bbd56d37b6cc9513b7b7', '0x8763e4686ba2fdcd0b71cee0411100585c875278', '0x89567ea00650df98604cd09cdfac630cf492e4ab', '0x8af4dfc5c55ef2d3bce511e4c14d631253533540', '0x8ff6adbc653405245b6b686e31b14a7da7000281', '0x916a3f321834386dd02dafd1abc1aa610bc2507c', '0x9419fbecfa0a9e38a96be2d818daa13dca72396e', '0x9a2d163ab40f88c625fd475e807bbc3556566f80', '0xa2851ec1cf891d138087bac4c06e53499e76b7cb', '0xaa29bc726a2e2807aa1d4d79ca610f3e52295d8c', '0xb591d637cfd989a21e31873dbe64afa4bf18f169', '0xba74368aa52ad58d08309f1f549aa63bab0c7e2a', '0xbb2ee36248da67c87777f43aa19e6158bb319fc7', '0xc3c12a9e63e466a3ba99e07f3ef1f38b8b81ae1b', '0xc5138d4bd0ec5c51b6b6bdfcb8528ad9c333af97', '0xc5a9938f265690e3c904fc37c27d1b6d0aab8612', '0xc6493bc0b9ebdfe45aecda36c4783e1c892c8d99', '0xc6b330df38d6ef288c953f1f2835723531073ce2', '0xcb804b9ceb413c3940134b1e2a022402f3b35d50', '0xd1c54a7896e52d3337a0acaa41dea4c66504eb18', '0xdb212bb6dd0c9cbc9fc0c5ffe88be35b81cbeb92', '0xe1746aa4c9489acabab5e5fcfe154a8cd8f40edf', '0xe18898c76a39ba4cd46a544b87ebe1166fbe7052', '0xe6a4ecff9f9179b7bbb910c8a3d0bfd5de55d3ad', '0xea5e5b5af68c4d03482a79573222400b905b37f9', '0xec65d776a9624e1186fabe988280b2f8e13bbf80', '0xf1d402fcbeb2d0c8946f13196d72db7258b0b296', '0xf36fb419a6bd6ebfe8a16797519dea43e164ca70', '0xf7709f447aebc89b31f42bddb7c4a6caaed6f566', '0xf921798598877baf6808b944413d9a4d6ee15087'}

Cause excessive gas fees, RPC havoc.

Old Ethereum mainnet contracts when revert was not properly existing. Harmless but cause extra RPC load. These fail when we probe contract calls to identify them.