core3.vault_protocol

Documentation for eth_defi.core3.vault_protocol Python module.

Look up Core3 risk intelligence for our vault protocols.

Resolves our vault protocol slugs to Core3 project slugs via CORE3_MAPPINGS, then fetches the latest snapshot from the local DuckDB database.

Example:

from pathlib import Path
from eth_defi.core3.database import Core3Database
from eth_defi.core3.constants import CORE3_DATABASE_PATH
from eth_defi.core3.vault_protocol import get_core3_protocol_record

db = Core3Database(CORE3_DATABASE_PATH)
record = get_core3_protocol_record(db, "morpho")
if record:
    print(f"PoL score: {record['pol']['score']}")
    print(f"Top risks: {len(record['top_risks'])}")
db.close()

Functions

build_core3_protocols_for_export(db, ...)

Build a protocol-slug-keyed dict of Core3 records for the JSON export.

build_core3_vault_section(record)

Flatten a Core3 export record into a compact per-vault risk summary.

get_core3_protocol_record(db, ...)

Look up the latest Core3 risk record for a vault protocol.

Classes

Core3Category

Core3 project category classification.

Core3Chain

A blockchain network where the project is deployed.

Core3DataCoverage

Core3 data coverage indicator.

Core3ExportRecord

Serialised Core3 project record for JSON export.

Core3Links

Project external links from Core3.

Core3MarketCap

Market capitalisation data from Core3.

Core3PolCategories

Latest per-category Probability of Loss (PoL) sub-scores.

Core3PolScore

Core3 Probability of Loss (PoL) score and rating.

Core3RecentChange

A recent change detected by Core3 monitoring.

Core3Record

Full Core3 project record from the latest DuckDB snapshot.

Core3Seal

A single Core3 trust seal status.

Core3Seals

Core3 trust seals for a project.

Core3Social

A social link entry from Core3.

Core3TopRisk

A top risk finding from Core3's risk assessment.

Core3VaultSection

Compact per-vault Core3 risk summary.

class Core3Seal

Bases: TypedDict

A single Core3 trust seal status.

value: bool

Whether the seal is currently awarded.

URL to the seal logo image, or None if not awarded.

__init__(*args, **kwargs)
__new__(**kwargs)
clear()

Remove all items from the dict.

copy()

Return a shallow copy of the dict.

fromkeys(value=None, /)

Create a new dictionary with keys from iterable and values set to value.

get(key, default=None, /)

Return the value for key if key is in the dictionary, else default.

items()

Return a set-like object providing a view on the dict’s items.

keys()

Return a set-like object providing a view on the dict’s keys.

pop(k[, d]) v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault(key, default=None, /)

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

Return an object providing a view on the dict’s values.

class Core3Seals

Bases: TypedDict

Core3 trust seals for a project.

Verifiable marks awarded by Core3 based on project practices.

security_measures: eth_defi.core3.vault_protocol.Core3Seal

Whether the project demonstrates adequate security measures (audits, monitoring, bug bounty).

independent_certificates: eth_defi.core3.vault_protocol.Core3Seal

Whether the project holds independent certifications (ISO 27001, CCSS, SOC 2).

self_regulation: eth_defi.core3.vault_protocol.Core3Seal

Whether the project participates in self-regulation initiatives (KYC, KYT, legal compliance).

__init__(*args, **kwargs)
__new__(**kwargs)
clear()

Remove all items from the dict.

copy()

Return a shallow copy of the dict.

fromkeys(value=None, /)

Create a new dictionary with keys from iterable and values set to value.

get(key, default=None, /)

Return the value for key if key is in the dictionary, else default.

items()

Return a set-like object providing a view on the dict’s items.

keys()

Return a set-like object providing a view on the dict’s keys.

pop(k[, d]) v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault(key, default=None, /)

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

Return an object providing a view on the dict’s values.

class Core3PolScore

Bases: TypedDict

Core3 Probability of Loss (PoL) score and rating.

PoL is a data-driven, non-price risk metric. Lower scores indicate less risk of loss.

score: float

Numeric PoL score from 0 (Exceptional) to 100 (Critical).

rating: Optional[str]

Credit-style letter rating: "AAA", "AA", "A", "BBB", "BB", "B", "CCC", "CC", "C", "DDD", "DD", "D", or None if not yet rated.

confidence: Optional[str]

Human-readable confidence label: "Exceptional", "High", "Medium", "Low", "Critical", or None.

__init__(*args, **kwargs)
__new__(**kwargs)
clear()

Remove all items from the dict.

copy()

Return a shallow copy of the dict.

fromkeys(value=None, /)

Create a new dictionary with keys from iterable and values set to value.

get(key, default=None, /)

Return the value for key if key is in the dictionary, else default.

items()

Return a set-like object providing a view on the dict’s items.

keys()

Return a set-like object providing a view on the dict’s keys.

pop(k[, d]) v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault(key, default=None, /)

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

Return an object providing a view on the dict’s values.

class Core3PolCategories

Bases: TypedDict

Latest per-category Probability of Loss (PoL) sub-scores.

Core3 assesses PoL across five risk categories, each with its own sub-score on the same 0 (Exceptional) to 100 (Critical) scale as the overall PoL. Sourced from the API-native category breakdown (/v1/{slug}/pol/by_category), stored daily in pol_category_daily. Any sub-score may be None for less-covered projects.

ts: Optional[str]

ISO 8601 timestamp of the category snapshot these scores come from. None if not available.

security: Optional[float]

Security sub-score: audits, bug bounty, contract verification, monitoring.

financial: Optional[float]

Financial sub-score: revenue sources, treasury quality, token inflation.

operational: Optional[float]

Operational sub-score: GitHub activity, team track record, liquidity.

reputational: Optional[float]

Reputational sub-score: auditor ratings, incidents, social metrics, insurance.

regulatory: Optional[float]

Regulatory sub-score: KYC/KYT, jurisdiction, legal documentation, transparency.

__init__(*args, **kwargs)
__new__(**kwargs)
clear()

Remove all items from the dict.

copy()

Return a shallow copy of the dict.

fromkeys(value=None, /)

Create a new dictionary with keys from iterable and values set to value.

get(key, default=None, /)

Return the value for key if key is in the dictionary, else default.

items()

Return a set-like object providing a view on the dict’s items.

keys()

Return a set-like object providing a view on the dict’s keys.

pop(k[, d]) v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault(key, default=None, /)

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

Return an object providing a view on the dict’s values.

class Core3MarketCap

Bases: TypedDict

Market capitalisation data from Core3.

Values are returned as strings from the API (not numbers).

in_usd: Optional[str]

Market cap in USD as a string, e.g. "1246877334".

change_24h_percentage: Optional[float]

24h percentage change as a float, e.g. -0.71437.

change_24h_in_usd: Optional[str]

24h absolute change in USD as a string, e.g. "-8971443.42".

__init__(*args, **kwargs)
__new__(**kwargs)
clear()

Remove all items from the dict.

copy()

Return a shallow copy of the dict.

fromkeys(value=None, /)

Create a new dictionary with keys from iterable and values set to value.

get(key, default=None, /)

Return the value for key if key is in the dictionary, else default.

items()

Return a set-like object providing a view on the dict’s items.

keys()

Return a set-like object providing a view on the dict’s keys.

pop(k[, d]) v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault(key, default=None, /)

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

Return an object providing a view on the dict’s values.

class Core3Chain

Bases: TypedDict

A blockchain network where the project is deployed.

name: str

Chain display name, e.g. "Ethereum", "Base", "Arbitrum One".

__init__(*args, **kwargs)
__new__(**kwargs)
clear()

Remove all items from the dict.

copy()

Return a shallow copy of the dict.

fromkeys(value=None, /)

Create a new dictionary with keys from iterable and values set to value.

get(key, default=None, /)

Return the value for key if key is in the dictionary, else default.

items()

Return a set-like object providing a view on the dict’s items.

keys()

Return a set-like object providing a view on the dict’s keys.

pop(k[, d]) v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault(key, default=None, /)

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

Return an object providing a view on the dict’s values.

class Core3Social

Bases: TypedDict

A social link entry from Core3.

name: str

Link type label: "Website", "Twitter", "GitHub", "YouTube", "Discord", etc.

Full URL to the social profile or page.

__init__(*args, **kwargs)
__new__(**kwargs)
clear()

Remove all items from the dict.

copy()

Return a shallow copy of the dict.

fromkeys(value=None, /)

Create a new dictionary with keys from iterable and values set to value.

get(key, default=None, /)

Return the value for key if key is in the dictionary, else default.

items()

Return a set-like object providing a view on the dict’s items.

keys()

Return a set-like object providing a view on the dict’s keys.

pop(k[, d]) v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault(key, default=None, /)

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

Return an object providing a view on the dict’s values.

Bases: TypedDict

Project external links from Core3.

website: Optional[str]

Primary website URL, e.g. "https://morpho.org/".

legal: Optional[str]

Link to legal documentation or terms of service.

whitepaper: Optional[str]

Link to the project whitepaper.

socials: list[eth_defi.core3.vault_protocol.Core3Social]

List of social media and external resource links.

__init__(*args, **kwargs)
__new__(**kwargs)
clear()

Remove all items from the dict.

copy()

Return a shallow copy of the dict.

fromkeys(value=None, /)

Create a new dictionary with keys from iterable and values set to value.

get(key, default=None, /)

Return the value for key if key is in the dictionary, else default.

items()

Return a set-like object providing a view on the dict’s items.

keys()

Return a set-like object providing a view on the dict’s keys.

pop(k[, d]) v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault(key, default=None, /)

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

Return an object providing a view on the dict’s values.

class Core3TopRisk

Bases: TypedDict

A top risk finding from Core3’s risk assessment.

Core3 surfaces the most significant risk factors identified across security, financial, operational, reputational, and regulatory categories.

content: str

Human-readable risk description, e.g. "A treasury composed entirely of the project's own native token...".

date: str

ISO 8601 timestamp when the risk was identified, e.g. "2026-04-02T07:43:02.240Z".

__init__(*args, **kwargs)
__new__(**kwargs)
clear()

Remove all items from the dict.

copy()

Return a shallow copy of the dict.

fromkeys(value=None, /)

Create a new dictionary with keys from iterable and values set to value.

get(key, default=None, /)

Return the value for key if key is in the dictionary, else default.

items()

Return a set-like object providing a view on the dict’s items.

keys()

Return a set-like object providing a view on the dict’s keys.

pop(k[, d]) v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault(key, default=None, /)

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

Return an object providing a view on the dict’s values.

class Core3RecentChange

Bases: TypedDict

A recent change detected by Core3 monitoring.

Tracks notable metric movements like traffic drops or engagement changes.

content: str

Human-readable change description, e.g. "Website traffic has dropped to below-average levels...".

date: str

ISO 8601 timestamp when the change was detected.

__init__(*args, **kwargs)
__new__(**kwargs)
clear()

Remove all items from the dict.

copy()

Return a shallow copy of the dict.

fromkeys(value=None, /)

Create a new dictionary with keys from iterable and values set to value.

get(key, default=None, /)

Return the value for key if key is in the dictionary, else default.

items()

Return a set-like object providing a view on the dict’s items.

keys()

Return a set-like object providing a view on the dict’s keys.

pop(k[, d]) v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault(key, default=None, /)

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

Return an object providing a view on the dict’s values.

class Core3Category

Bases: TypedDict

Core3 project category classification.

name: str

Category display name, e.g. "Decentralized Finance", "Lending/Borrowing", "Decentralized Exchange", "Layer 1", "Layer 2", "RWA".

__init__(*args, **kwargs)
__new__(**kwargs)
clear()

Remove all items from the dict.

copy()

Return a shallow copy of the dict.

fromkeys(value=None, /)

Create a new dictionary with keys from iterable and values set to value.

get(key, default=None, /)

Return the value for key if key is in the dictionary, else default.

items()

Return a set-like object providing a view on the dict’s items.

keys()

Return a set-like object providing a view on the dict’s keys.

pop(k[, d]) v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault(key, default=None, /)

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

Return an object providing a view on the dict’s values.

class Core3DataCoverage

Bases: TypedDict

Core3 data coverage indicator.

Shows how much of the project’s data Core3 has been able to collect and verify.

percentage: float

Percentage of data coverage, 0–100. Higher values mean more comprehensive risk assessment.

__init__(*args, **kwargs)
__new__(**kwargs)
clear()

Remove all items from the dict.

copy()

Return a shallow copy of the dict.

fromkeys(value=None, /)

Create a new dictionary with keys from iterable and values set to value.

get(key, default=None, /)

Return the value for key if key is in the dictionary, else default.

items()

Return a set-like object providing a view on the dict’s items.

keys()

Return a set-like object providing a view on the dict’s keys.

pop(k[, d]) v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault(key, default=None, /)

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

Return an object providing a view on the dict’s values.

class Core3Record

Bases: TypedDict

Full Core3 project record from the latest DuckDB snapshot.

Contains the complete JSON payload stored by insert_project_snapshot(), plus database metadata fields.

See README-core3 for the API documentation that produces this data.

slug: str

Core3 project slug (CoinGecko-style), e.g. "morpho", "instadapp", "syrup".

name: str

Project display name, e.g. "Morpho", "Fluid".

description: Optional[str]

Project description text from Core3 (may contain newlines).

rank: Optional[int]

Core3 global rank (1 = lowest risk). None if unranked.

pol: eth_defi.core3.vault_protocol.Core3PolScore

Probability of Loss score, rating, and confidence level.

pol_categories: Optional[eth_defi.core3.vault_protocol.Core3PolCategories]

Latest per-category PoL sub-scores (security, financial, etc.). None if the project has no category breakdown in the database. Added by the database layer, not present in the original API response.

ticker: Optional[str]

Token ticker symbol, e.g. "MORPHO", "EUL". Some projects omit this key entirely from the API response.

coingecko_id: Optional[str]

CoinGecko ID for cross-referencing, e.g. "morpho", "euler". Some projects omit this key entirely from the API response.

URL to the project logo image on CoinGecko CDN.

Core3 project page link (note: may have malformed URLs like "https://core3.iomorpho" — missing /).

launched_at: Optional[str]

ISO 8601 launch date string, or None if unknown.

category: Optional[eth_defi.core3.vault_protocol.Core3Category]

Project category classification.

data_coverage: Optional[eth_defi.core3.vault_protocol.Core3DataCoverage]

Data coverage percentage indicator.

market_cap: Optional[eth_defi.core3.vault_protocol.Core3MarketCap]

Market capitalisation data.

chains: list[eth_defi.core3.vault_protocol.Core3Chain]

Blockchain networks where the project is deployed.

External links (website, legal, whitepaper, socials).

tags: list[str]

Project tags (often empty).

top_risks: list[eth_defi.core3.vault_protocol.Core3TopRisk]

Top risk findings from Core3’s assessment. Typically 10–30 risk items covering security, financial, operational, reputational, and regulatory concerns.

recent_changes: list[eth_defi.core3.vault_protocol.Core3RecentChange]

Recent monitoring changes detected by Core3.

seals: Optional[eth_defi.core3.vault_protocol.Core3Seals]

Trust seals status (security measures, independent certs, self-regulation).

fetched_at: datetime.datetime

Timestamp when this snapshot was fetched from the Core3 API. Added by the database layer, not present in the original API response.

__init__(*args, **kwargs)
__new__(**kwargs)
clear()

Remove all items from the dict.

copy()

Return a shallow copy of the dict.

fromkeys(value=None, /)

Create a new dictionary with keys from iterable and values set to value.

get(key, default=None, /)

Return the value for key if key is in the dictionary, else default.

items()

Return a set-like object providing a view on the dict’s items.

keys()

Return a set-like object providing a view on the dict’s keys.

pop(k[, d]) v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault(key, default=None, /)

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

Return an object providing a view on the dict’s values.

get_core3_protocol_record(db, vault_protocol_slug)

Look up the latest Core3 risk record for a vault protocol.

Resolves our vault protocol slug to a Core3 project slug using CORE3_MAPPINGS, then reads the most recent project snapshot from the DuckDB database.

Parameters
Returns

The latest Core3Record for the protocol, or None if the protocol has no Core3 mapping or the Core3 slug is not found in the database.

Return type

Optional[eth_defi.core3.vault_protocol.Core3Record]

class Core3ExportRecord

Bases: TypedDict

Serialised Core3 project record for JSON export.

Same structure as Core3Record but with fetched_at as an ISO 8601 string instead of datetime, since the JSON export cannot contain raw datetime objects.

slug: str

Core3 project slug (CoinGecko-style), e.g. "morpho", "instadapp", "syrup".

name: str

Project display name, e.g. "Morpho", "Fluid".

description: Optional[str]

Project description text from Core3 (may contain newlines).

rank: Optional[int]

Core3 global rank (1 = lowest risk). None if unranked.

pol: eth_defi.core3.vault_protocol.Core3PolScore

Probability of Loss score, rating, and confidence level.

pol_categories: Optional[eth_defi.core3.vault_protocol.Core3PolCategories]

Latest per-category PoL sub-scores (security, financial, etc.). None if the project has no category breakdown in the database.

ticker: Optional[str]

Token ticker symbol, e.g. "MORPHO", "EUL".

coingecko_id: Optional[str]

CoinGecko ID for cross-referencing.

URL to the project logo image on CoinGecko CDN.

Core3 project page link.

launched_at: Optional[str]

ISO 8601 launch date string, or None if unknown.

category: Optional[eth_defi.core3.vault_protocol.Core3Category]

Project category classification.

data_coverage: Optional[eth_defi.core3.vault_protocol.Core3DataCoverage]

Data coverage percentage indicator.

market_cap: Optional[eth_defi.core3.vault_protocol.Core3MarketCap]

Market capitalisation data.

chains: list[eth_defi.core3.vault_protocol.Core3Chain]

Blockchain networks where the project is deployed.

External links (website, legal, whitepaper, socials).

tags: list[str]

Project tags (often empty).

top_risks: list[eth_defi.core3.vault_protocol.Core3TopRisk]

Top risk findings from Core3’s assessment.

recent_changes: list[eth_defi.core3.vault_protocol.Core3RecentChange]

Recent monitoring changes detected by Core3.

seals: Optional[eth_defi.core3.vault_protocol.Core3Seals]

Trust seals status.

fetched_at: str

ISO 8601 timestamp when this snapshot was fetched.

__init__(*args, **kwargs)
__new__(**kwargs)
clear()

Remove all items from the dict.

copy()

Return a shallow copy of the dict.

fromkeys(value=None, /)

Create a new dictionary with keys from iterable and values set to value.

get(key, default=None, /)

Return the value for key if key is in the dictionary, else default.

items()

Return a set-like object providing a view on the dict’s items.

keys()

Return a set-like object providing a view on the dict’s keys.

pop(k[, d]) v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault(key, default=None, /)

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

Return an object providing a view on the dict’s values.

class Core3VaultSection

Bases: TypedDict

Compact per-vault Core3 risk summary.

A flattened subset of Core3ExportRecord embedded under the core3 key of each vault record produced by eth_defi.research.vault_metrics.calculate_vault_record(). Individual values are None when the underlying Core3 field is missing; the whole section is None when the vault’s protocol has no Core3 data (see build_core3_vault_section()).

risk_score: Optional[float]

Overall Probability of Loss score, 0 (Exceptional) – 100 (Critical).

market_cap: Optional[float]

Total cross-chain market capitalisation in USD.

core3_ranking: Optional[int]

Core3 global rank (1 = lowest risk).

data_coverage: Optional[float]

Data coverage percentage, 0–100.

confidence: Optional[str]

PoL confidence label, e.g. "High", "Medium", "Low".

risk_rating_label: Optional[str]

Credit-style PoL rating label, e.g. "BB", "AAA".

__init__(*args, **kwargs)
__new__(**kwargs)
clear()

Remove all items from the dict.

copy()

Return a shallow copy of the dict.

fromkeys(value=None, /)

Create a new dictionary with keys from iterable and values set to value.

get(key, default=None, /)

Return the value for key if key is in the dictionary, else default.

items()

Return a set-like object providing a view on the dict’s items.

keys()

Return a set-like object providing a view on the dict’s keys.

pop(k[, d]) v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault(key, default=None, /)

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

Return an object providing a view on the dict’s values.

build_core3_vault_section(record)

Flatten a Core3 export record into a compact per-vault risk summary.

Picks the handful of headline risk fields the frontend shows on each vault row, flattening the nested Core3ExportRecord structure (pol.score, market_cap.in_usd, data_coverage.percentage) into a single flat dict.

Parameters

record (Optional[eth_defi.core3.vault_protocol.Core3ExportRecord]) – The Core3 export record for the vault’s protocol, as returned by build_core3_protocols_for_export(), or None if the protocol has no Core3 data.

Returns

A Core3VaultSection dict, or None if record is None. Individual keys are None when the corresponding Core3 field is absent.

Return type

Optional[eth_defi.core3.vault_protocol.Core3VaultSection]

build_core3_protocols_for_export(db, protocol_slugs)

Build a protocol-slug-keyed dict of Core3 records for the JSON export.

Looks up each vault protocol slug in the Core3 database and returns a dict suitable for embedding as the top-level core3_protocols key in the vault metrics JSON export. Records are keyed by our internal protocol slugs (e.g. "fluid"), not Core3’s own slugs (e.g. "instadapp").

Parameters
Returns

Dict mapping protocol slug to Core3ExportRecord. Slugs with no Core3 mapping or no database record are excluded.

Return type

dict[str, eth_defi.core3.vault_protocol.Core3ExportRecord]