erc_4626.core
Documentation for eth_defi.erc_4626.core Python module.
ERC-4626 core functions.
Access ERC-4626 ABI
Feature flags vaults can have
Module Attributes
Minimum deposit events for a vault to be included in the price scanner. |
|
Minimum configuration events for a T3tris migration-pool vault to bypass |
|
Features that identify lending protocol vaults. |
Functions
|
Get IERC4626 deployed at some address. |
|
Get IERC4626 interface. |
|
Deduct vault protocol name based on Vault smart contract features. |
|
Check if a vault detection bypasses deposit/redeem count filters. |
|
Is this protocol slug an explicit generic ERC-4626 marker. |
|
Check if the vault features indicate a lending protocol. |
|
Check whether a vault has enough activity for historical price scanning. |
Classes
A ERC-4626 detection. |
|
Additional extensionsERc-4626 vault may have. |
- MIN_PRICE_SCAN_DEPOSIT_COUNT = 5
Minimum deposit events for a vault to be included in the price scanner.
Low-activity vaults are skipped unless protocol-specific exemptions apply.
- MIN_PRICE_SCAN_CONFIGURATION_EVENT_COUNT = 1
Minimum configuration events for a T3tris migration-pool vault to bypass
MIN_PRICE_SCAN_DEPOSIT_COUNT.
- class ERC4626Feature
Bases:
enum.EnumAdditional extensionsERc-4626 vault may have.
Helps to classify for which protocol the vault belongs and then extract useful data out of it, like proprietary fee calls.
Flag ERC-4626 matches in the scan with features detected from the smart contract probes
Use name/known calls to flag the protocol for which the vault belongs
Feature values are persisted in
eth_defi.vault.vaultdb.VaultDatabasepickles. Removing or renaming a value breaks existing vault databases at unpickling time. Any such migration must add a value-level compatibility case in_missing_()that maps the retired value to its canonical replacement; see PR #1318.- broken = 'broken'
Failed when probing with multicall, Deposit() event likely for other protocol
- erc_7540_like = 'erc_7540_like'
Asynchronous vault extension (ERC-7540) https://eips.ethereum.org/EIPS/eip-7540
- erc_7575_like = 'erc_7575_like'
Multi-asset vault extension (ERC-7575) https://eips.ethereum.org/EIPS/eip-7575
- lagoon_like = 'lagoon_like'
Lagoon protocol
- t3tris_like = 't3tris_like'
T3tris protocol
- oda_fact_like = 'oda_fact_like'
Kinexys tokenised fund contract using the ODA-FACT surface.
Routing marker for non-ERC-4626 ODA-FACT instruments that are read through a
eth_defi.vault.base.VaultBaseadapter.
- midas_like = 'midas_like'
Midas tokenised investment products.
Routing marker for non-ERC-4626 mToken instruments that are read through a
eth_defi.vault.base.VaultBaseadapter.
- asseto_like = 'asseto_like'
Asseto tokenised fund products.
Routing marker for non-ERC-4626 Asseto products that are read through a
eth_defi.vault.base.VaultBaseadapter.
- franklin_like = 'franklin_like'
Franklin Templeton Benji tokenised fund share.
https://digitalassets.franklintempleton.com/benji/ Routing marker for non-ERC-4626 permissioned Benji instruments read through a
eth_defi.vault.base.VaultBaseadapter.
- securitize_like = 'securitize_like'
Securitize Digital Securities Protocol token.
Routing marker for non-ERC-4626
DSTokeninstruments that are read through aeth_defi.vault.base.VaultBaseadapter.
- ondo_like = 'ondo_like'
Ondo permissioned tokenised fund products.
Routing marker for non-ERC-4626 issuer share tokens read through a
eth_defi.vault.base.VaultBaseadapter.
- usyc_like = 'usyc_like'
Circle USYC tokenised money market fund.
Routing marker for the non-ERC-4626, permissioned USYC ERC-20 token read through a
eth_defi.vault.base.VaultBaseadapter.
- centrifuge_tranche_like = 'centrifuge_tranche_like'
Centrifuge permissioned
Trancheshare token.This marks a direct share token, not Centrifuge’s separate ERC-7540 LiquidityPool vault contract.
- wisdomtree_like = 'wisdomtree_like'
WisdomTree permissioned tokenised-fund products.
Routing marker for non-ERC-4626 compliance ERC-20 fund shares read through a
eth_defi.vault.base.VaultBaseadapter.
- superstate_like = 'superstate_like'
Superstate tokenised fund products.
Routing marker for non-ERC-4626 allowlisted fund tokens that are read through a
eth_defi.vault.base.VaultBaseadapter.
- libeara_like = 'libeara_like'
Libeara CMTAT tokenised fund shares.
- spiko_like = 'spiko_like'
Spiko permissioned tokenised fund shares.
- sygnum_like = 'sygnum_like'
Sygnum permissioned FILQ share tokens.
- fdit_like = 'fdit_like'
Fidelity Digital Interest Token permissioned fund shares.
- kaio_like = 'kaio_like'
KAIO permissioned CASHx fund shares.
- openeden_like = 'openeden_like'
OpenEden permissioned TBILL fund shares.
- theo_itoken_like = 'theo_itoken_like'
Theo multi-asset iToken tokenised funds.
- wstgbp_like = 'wstgbp_like'
wstGBP tokenised asset contracts.
Routing marker for the non-ERC-4626 wstGBP instrument that is read through a
eth_defi.vault.base.VaultBaseadapter.
- vault_street_like = 'vault_street_like'
Vault Street permissioned tokenised investment products.
Routing marker for non-ERC-4626 products read through a
eth_defi.vault.base.VaultBaseadapter.
- ipor_like = 'ipor_like'
Ipor protocol
- moonwell_like = 'moonwell_like'
Moonwell protocol
- morpho_like = 'morpho_like'
Morpho protocol (V1)
Uses MORPHO() function for identification
- morpho_v2_like = 'morpho_v2_like'
Morpho Vault V2
Newer version with adapter-based architecture for multi-protocol yield allocation. Uses adaptersLength() function for identification. https://docs.morpho.org/learn/concepts/vault-v2/ https://github.com/morpho-org/vault-v2
- harvest_finance = 'harvest_finance'
Harvest Finance like protocol
- panoptic_like = 'panoptic_like'
Panoptic https://panoptic.xyz/
- baklava_space_like = 'baklava_space_like'
Baklavaf BRT2
- astrolab_like = 'astrolab_like'
- kiloex_like = 'kiloex_like'
KiloEx Hybrid Vault.
- gains_like = 'gains_like'
Gains network and Ostium gToken vaults https://github.com/GainsNetwork
- ostium_like = 'ostium_like'
ALmost like Gains, but Ostium LP
- domination_finance_like = 'domination_finance_like'
Domination Finance
Gains/Ostium-family counterparty liquidity vault for dominance perpetual futures. https://domination.finance/
- gains_tranche_like = 'gains_tranche_like'
Gains tranche? https://basescan.org/address/0x2ac590a4a78298093e5bc7742685446af96d56e7#code
- return_finance_like = 'return_finance_like'
Return Finacne
- arcadia_finance_like = 'arcadia_finance_like'
Arcadia Finance https://defillama.com/protocol/arcadia-finance
- satoshi_stablecoin = 'satoshi_stablecoin'
SATS DAO https://github.com/satsDAO/Satoshi
- athena_like = 'athena_like'
- reserve_like = 'reserve_like'
Reserve https://reserve.org/
- fluid_like = 'fluid_like'
- kiln_metavault_like = 'kiln_metavault_like'
Kiln OmniVaults.
- peapods_like = 'peapods_like'
Peopods https://beta.peapods.finance/
- yearn_compounder_like = 'yearn_compounder_like'
Yearn compounding vault. Written in Solidiy. https://yearn.fi/ https://etherscan.io/address/0x4cE9c93513DfF543Bc392870d57dF8C04e89Ba0a#readProxyContract Contracts have both proxy and non-proxy functions.
- yearn_v3_like = 'yearn_v3_like'
Yearn v3 Written in vyper. https://yearn.fi/ https://etherscan.io/address/0xa10c40f9e318b0ed67ecc3499d702d8db9437228#readProxyContract
- yearn_tokenised_strategy = 'yearn_tokenised_strategy'
Yearn silo strategy By
- superform_like = 'superform_like'
Superform Metavault - cross-chain yield. https://www.superform.xyz/vault/BB5FPH0VNwM1AxdvVnhn8/ Non-metavault? https://www.superform.xyz/vault/b6XXUtR2K4ktxzAuDhZUI/ https://etherscan.io//address/0x862c57d48becB45583AEbA3f489696D22466Ca1b#readProxyContract https://basescan.org/address/0x84d7549557f0fb69efbd1229d8e2f350b483c09b#code
- term_finance_like = 'term_finance_like'
Term Finance https://mytermfinance.com/ https://etherscan.io/address/0xa10c40f9e318b0ed67ecc3499d702d8db9437228#readProxyContract
- euler_like = 'euler_like'
Euler
In vault names EVK stands for “Euler Vault Kit” https://github.com/euler-xyz/euler-vault-kit/blob/master/docs/whitepaper.md
https://app.euler.finance/vault/0xC063C3b3625DF5F362F60f35B0bcd98e0fa650fb?network=base https://basescan.org/address/0x30a9a9654804f1e5b3291a86e83eded7cf281618#code
- euler_earn_like = 'euler_earn_like'
EulerEarn
EulerEarn is a Metamorpho-based metavault that aggregates deposits into multiple ERC-4626 vaults. Built on top of Euler Vault Kit (EVK). https://github.com/euler-xyz/euler-earn https://docs.euler.finance/developers/euler-earn/
Example vault: https://snowtrace.io/address/0xE1A62FDcC6666847d5EA752634E45e134B2F824B
- umami_like = 'umami_like'
Umami DAO
gmUSDC vault - ERC-4626 custom in-house, no Github repo https://arbiscan.io/address/0x5f851f67d24419982ecd7b7765defd64fbb50a97#readContract
deposit() custom signature
- plutus_like = 'plutus_like'
Plutus
- bulla_like = 'bulla_like'
Bulla Network invoice-factoring vaults.
- d2_like = 'd2_like'
D2 Finance
https://arbiscan.io/address/0x75288264fdfea8ce68e6d852696ab1ce2f3e5004#code
- untangled_like = 'untangled_like'
Untangled Finance
https://arbiscan.io/address/0x4a3f7dd63077cde8d7eff3c958eb69a3dd7d31a9#readContract
- goat_like = 'goat_like'
Goat protocol
https://github.com/goatfi/contracts/blob/main/src/infra/multistrategy/Multistrategy.sol
- usdai_like = 'usdai_like'
USD.ai
- autopool_like = 'autopool_like'
AUTO Finance Prev. Tokemak Autopilot
https://app.auto.finance/ https://github.com/Tokemak/v2-core-pub?tab=readme-ov-file
- nashpoint_like = 'nashpoint_like'
NashPoint
- llamma_like = 'llamma_like'
Llama Lend (powered by LLAMMA)
Llama Lend is Curve Finance’s lending protocol powered by the liquidation protection mechanism provided by LLAMMA (Lending Liquidating Automated Market Maker Algorithm). https://lend.curve.fi/
- summer_like = 'summer_like'
Summer Earn
“FleerCommander” contract https://github.com/OasisDEX/summer-earn-protocol/blob/8a0eaa6e0ff420f4e574042855514590e0cc610e/packages/core-contracts/src/contracts/FleetCommander.sol
- silo_like = 'silo_like'
Silo Finance
https://arbiscan.io/address/0xacb7432a4bb15402ce2afe0a7c9d5b738604f6f9#readContract
- gyroscope = 'gyroscope'
Savings GYD
https://app.gyro.finance/sgyd/arbitrum/https://app.gyro.finance/sgyd/arbitrum/
- truefi_like = 'truefi_like'
TrueFi
https://truefi.io/ https://arbiscan.io/address/0x8626a4234721a605fc84bb49d55194869ae95d98#readContract
- cap_like = 'cap_like'
Covered Agent Protocol (CAP)
https://cap.ag/ Uses Yearn V3 vault infrastructure https://etherscan.io/address/0x3ed6aa32c930253fc990de58ff882b9186cd0072
- foxify_like = 'foxify_like'
Foxify
- liquid_royalty_like = 'liquid_royalty_like'
Liquid Royalty
- liquidity_royalty_like = 'liquidity_royalty_like'
Deprecated: renamed to liquid_royalty_like. Kept for backwards compatibility with pickled databases.
- csigma_like = 'csigma_like'
cSigma Finance
- spark_like = 'spark_like'
Spark
- frankencoin_like = 'frankencoin_like'
Frankencoin savings vault
- yearn_morpho_compounder_like = 'yearn_morpho_compounder_like'
Yearn Morpho Compounder strategy
A Yearn V3 vault that uses MorphoCompounder strategies to invest in Morpho vaults and compound rewards. https://yearn.fi/ https://etherscan.io/address/0x6D2981FF9b8d7edbb7604de7A65BAC8694ac849F
- teller_like = 'teller_like'
Teller Protocol
Long-tail lending pools where lenders deposit assets to earn yield from borrower interest payments. Uses time-based loan expiration instead of price-based liquidations. https://www.teller.org/ https://basescan.org/address/0x13cd7cf42ccbaca8cd97e7f09572b6ea0de1097b
- deltr_like = 'deltr_like'
Deltr
StakeddUSD vault for dUSD staking. https://etherscan.io/address/0xa7a31e6a81300120b7c4488ec3126bc1ad11f320
- upshift_like = 'upshift_like'
Upshift
Institutional-grade DeFi yield strategies through non-custodial vaults. https://www.upshift.finance/
- upshift_multi_asset_like = 'upshift_multi_asset_like'
Upshift multi-asset vault.
Uses a vault proxy for accounting calls and a separate
lpTokenAddress()ERC-20 token for share metadata and supply. https://etherscan.io/address/0xEB5f80aCEa6060764E91c185bE93752Ab40F01c2#code
- sky_like = 'sky_like'
Sky (formerly MakerDAO)
stUSDS vault for USDS staking. https://sky.money/ https://etherscan.io/address/0x99cd4ec3f88a45940936f469e4bb72a2a701eeb9
- maple_like = 'maple_like'
Maple Finance Syrup
Institutional-grade DeFi lending protocol with Syrup yield products. https://maple.finance/
- maple_aqru_like = 'maple_aqru_like'
Maple Finance AQRU Pool
AQRU Receivables Pool for IRS tax credit receivables on Maple Finance. Real-world receivables pool bridging DeFi with traditional assets. https://aqru.io/real-world-receivables/
- centrifuge_like = 'centrifuge_like'
Centrifuge
Real-world asset (RWA) tokenisation and financing protocol. Each pool can have multiple tranches, and each tranche is a separate deployment of an ERC-7540 Vault and a Tranche Token. https://centrifuge.io/
- ethena_like = 'ethena_like'
Ethena
Synthetic dollar protocol with sUSDe staking vault. https://ethena.fi/
- usdd_like = 'usdd_like'
Decentralized USD (USDD)
Decentralized stablecoin protocol with sUSDD savings vault. https://usdd.io/
- royco_like = 'royco_like'
Royco Protocol
Incentivised Action Market (IAM) Protocol with WrappedVault infrastructure. https://royco.org/
- royco_tranche_like = 'royco_tranche_like'
Royco tranche vaults
Senior/junior tranche vaults with Royco
AssetClaimstuple accounting. https://royco.org/
- zerolend_like = 'zerolend_like'
ZeroLend
Multi-chain DeFi lending protocol built on Layer 2 solutions, based on Aave V3. Uses Royco WrappedVault infrastructure for incentivised vaults. https://zerolend.xyz/
- eth_strategy_like = 'eth_strategy_like'
ETH Strategy
DeFi treasury protocol offering leveraged ETH exposure without liquidation risk. https://www.ethstrat.xyz/
- yuzu_money_like = 'yuzu_money_like'
Yuzu Money
DeFi protocol packaging high-yield strategies into an overcollateralised stablecoin. Deployed on Plasma chain with yzUSD, syzUSD, and yzPP products. https://yuzu.money/
- altura_like = 'altura_like'
Altura
Multi-strategy yield protocol on HyperEVM (Hyperliquid) with NAV oracle pricing. https://altura.trade/
- spectra_usdn_wrapper_like = 'spectra_usdn_wrapper_like'
Spectra USDN Wrapper
Spectra ERC4626 wrapper for WUSDN (SmarDex delta-neutral synthetic dollar). This is a wrapper contract, not a core Spectra yield tokenisation vault. https://www.spectra.finance/ https://smardex.io/usdn
- gearbox_like = 'gearbox_like'
Gearbox Protocol
Composable leverage protocol with ERC-4626 compatible lending pools (PoolV3). https://gearbox.finance/
- mainstreet_like = 'mainstreet_like'
Mainstreet Finance
Synthetic USD stablecoin ecosystem with smsUSD staking vault on Sonic. https://mainstreet.finance/
- yieldfi_like = 'yieldfi_like'
YieldFi
Web3 asset management platform with vyToken vaults. https://yield.fi/
- resolv_like = 'resolv_like'
Resolv
Delta-neutral stablecoin protocol with wstUSR wrapped staking vault. https://resolv.xyz/
- curvance_like = 'curvance_like'
Curvance
Next-generation DeFi lending protocol with capital-efficient money markets. https://www.curvance.com/
- spectra_erc4626_wrapper_like = 'spectra_erc4626_wrapper_like'
Spectra ERC4626 Wrapper
Generic Spectra ERC4626 wrapper for rebasing tokens on various chains. These wrappers make rebasing tokens compatible with Spectra’s PT/YT system. https://www.spectra.finance/
- singularity_like = 'singularity_like'
Singularity Finance
AI-powered DeFi yield vaults using DynaVaults framework. https://singularityfinance.ai/
- brink_like = 'brink_like'
Brink
Brink vaults on Mantle and other chains. Uses modified events (DepositFunds/WithdrawFunds) instead of standard ERC-4626 events. https://brink.trade/
- accountable_like = 'accountable_like'
Accountable Capital
Blockchain-based financial verification technology with ERC-7540 async redemption vaults. Primarily deployed on Monad. https://www.accountable.capital/
- yieldnest_like = 'yieldnest_like'
YieldNest
- secured_finance_like = 'secured_finance_like'
Secured Finance
Fixed-rate lending protocol with ERC-4626 lender vaults. https://secured.finance/
- dolomite_like = 'dolomite_like'
Dolomite
Next-generation DeFi lending and borrowing platform on Arbitrum. https://dolomite.io/
- hypurrfi_like = 'hypurrfi_like'
HypurrFi
Lending market on HyperEVM (Hyperliquid) for leveraged yield strategies. https://www.hypurr.fi/
- usdx_money_like = 'usdx_money_like'
USDX Money
Synthetic USD stablecoin protocol with sUSDX staking vault. https://usdx.money/
- nara_like = 'nara_like'
Nara
PayFi-backed NaraUSD+ staking vault. https://www.nara.io/
- hyperlend_like = 'hyperlend_like'
Hyperlend
Wrapped HLP vault for HyperLiquidity Provider on HyperEVM. https://app.hyperlend.finance/hlp
- sentiment_like = 'sentiment_like'
Sentiment
Decentralised leverage lending protocol with SuperPool vault aggregators. https://www.sentiment.xyz/
- infinifi_like = 'infinifi_like'
infiniFi
On-chain fractional reserve banking protocol with siUSD liquid staking. https://infinifi.xyz/
- renalta_like = 'renalta_like'
Renalta
Unverified smart contract source code - treat with caution. https://renalta.com/
- avant_like = 'avant_like'
Avant Protocol
Stablecoin protocol on Avalanche with savUSD staking vault. https://www.avantprotocol.com/
- aarna_like = 'aarna_like'
aarnâ
Agentic Onchain Treasury (AOT) protocol using AI agents for DeFi management. https://www.aarna.ai/
- aera_like = 'aera_like'
Aera
Onchain vault infrastructure for treasury management and multi-depositor yield strategies. https://www.aera.finance/
- yo_like = 'yo_like'
Yo Protocol
DeFi protocol with ERC-4626 vault and asynchronous redemption mechanism. https://www.yo.xyz/
- frax_like = 'frax_like'
Frax
Decentralised stablecoin and lending protocol with Fraxlend lending pairs. https://frax.com/
- frax_staking_like = 'frax_staking_like'
Frax stablecoin staking vault.
Address-routed sFRAX and sfrxUSD vaults. This is separate from
frax_like, which is retained for Fraxlend compatibility. https://frax.com/earn
- hyperdrive_hl_like = 'hyperdrive_hl_like'
Hyperdrive (HyperEVM)
Stablecoin money market and yield hub on Hyperliquid (HyperEVM). https://hyperdrive.fi/
- basevol_like = 'basevol_like'
BaseVol
Onchain options protocol with AI-managed yield vaults on Base. https://basevol.com/
- sbold_like = 'sbold_like'
sBOLD
Yield-bearing tokenised representation of deposits into Liquity V2 Stability Pools. https://www.k3.capital/
- hypercore_native = 'hypercore_native'
Hypercore native vault
Native Hyperliquid perpetuals trading vault on Hypercore (non-EVM). Not an ERC-4626 vault but shares the same metrics interface. https://app.hyperliquid.xyz/vaults
- grvt_native = 'grvt_native'
GRVT native vault
Native GRVT (Gravity Markets) perpetuals trading vault. Not an ERC-4626 vault but shares the same metrics interface. https://grvt.io/exchange/strategies
- lighter_native = 'lighter_native'
Lighter native pool
Native Lighter perpetuals trading pool on their ZK-rollup. Not an ERC-4626 vault but shares the same metrics interface. https://lighter.xyz
- hibachi_native = 'hibachi_native'
Hibachi native vault
Native Hibachi perpetuals trading vault (non-EVM, custom L2). Not an ERC-4626 vault but shares the same metrics interface. https://hibachi.xyz/vaults
- ember_like = 'ember_like'
Ember Protocol
Investment platform for launching and distributing onchain financial products. Uses custom VaultDeposit/RequestRedeemed events instead of standard ERC-4626. https://ember.so/
- inverse_finance_like = 'inverse_finance_like'
Inverse Finance
sDOLA savings vault — yield-bearing ERC-4626 vault for DOLA staking. Yield from FiRM lending revenues via DBR auction mechanism. https://www.inverse.finance/
- forty_acres_like = 'forty_acres_like'
40acres
Cashflow lending protocol for veNFT collateral with USDC supply vaults. https://www.40acres.finance/
- forgeyields_like = 'forgeyields_like'
ForgeYields
Cross-chain, non-custodial yield aggregator for underwritten frontier DeFi strategies. Uses TokenGateway cross-chain deposit architecture (Hyperlane-based). https://www.forgeyields.com/
- crystalclear_like = 'crystalclear_like'
CrystalClear
Algorithmic trading vaults on HyperEVM that trade perpetuals on HyperCore. ERC-4626 with UUPS proxy, two-step withdrawal, externalised performance fee. https://crystalclear.finance/
- threejane_like = 'threejane_like'
3Jane
Decentralised credit-based money market issuing the USD3 (senior) and sUSD3 (junior) ERC-4626 tranche vaults backed by uncollateralised lending. https://www.3jane.xyz/
- aave_like = 'aave_like'
Aave (v3 and v4)
Aave V3 ATokenVault wraps an interest-bearing Aave aToken into ERC-4626 shares. Aave v4 Tokenization Spokes tokenise Hub assets into fungible
wa{Hub}{Asset}shares (e.g.waCoreUSDC). V3 ATokenVaults are identified by a chain-aware address registry; v4 spokes expose the spoke-specificSPOKE_REVISION()accessor. https://aave.com/
- mellow_like = 'mellow_like'
Mellow Core Vault.
Routing marker for Mellow vaults discovered through Core Vault factory events. Mellow vaults are not ERC-4626 vault contracts; the primary vault address is separate from the ERC-20 ShareManager. https://docs.mellow.finance/core-vaults
- atoma_like = 'atoma_like'
Atoma
Delta-neutral USDC vault on Arbitrum with epoch-based withdrawals. https://app.atoma.fi/
- LENDING_PROTOCOL_FEATURES: frozenset[eth_defi.erc_4626.core.ERC4626Feature] = frozenset({<ERC4626Feature.morpho_like: 'morpho_like'>, <ERC4626Feature.llamma_like: 'llamma_like'>, <ERC4626Feature.gearbox_like: 'gearbox_like'>, <ERC4626Feature.silo_like: 'silo_like'>, <ERC4626Feature.euler_earn_like: 'euler_earn_like'>, <ERC4626Feature.fluid_like: 'fluid_like'>, <ERC4626Feature.euler_like: 'euler_like'>, <ERC4626Feature.morpho_v2_like: 'morpho_v2_like'>, <ERC4626Feature.ipor_like: 'ipor_like'>})
Features that identify lending protocol vaults.
Lending protocols have borrowers and lenders, with utilisation-based liquidity. These vaults support fetch_available_liquidity() and fetch_utilisation_percent() APIs.
- is_lending_protocol(features)
Check if the vault features indicate a lending protocol.
Lending protocols have borrowers and lenders with utilisation-based liquidity. These vaults support fetch_available_liquidity() and fetch_utilisation_percent() APIs.
- Parameters
features (set[eth_defi.erc_4626.core.ERC4626Feature]) – Set of detected vault features.
- Returns
True if the vault is a lending protocol vault.
- Return type
- is_activity_filter_exempt(detection)
Check if a vault detection bypasses deposit/redeem count filters.
Some shared vault database entries are not discovered from canonical ERC-4626
DepositandWithdrawevents emitted by the vault address. Mellow Core Vaults are the first EVM example: the vault identity comes fromFactory.Createdwhile user flow events live on per-asset queue contracts. Upshift multi-asset vaults are another exception: older production metadata can be seeded or refreshed by address after the custom event support lands, and targeted price rescans should not be blocked by a stale low deposit counter. T3tris migration-pool vaults are handled separately bypasses_price_scan_activity_filter(), which requires a recorded configuration event instead of broadly exempting the protocol.- Parameters
detection (eth_defi.erc_4626.core.ERC4262VaultDetection) – Shared vault detection envelope.
- Returns
Trueif low activity count filters should not drop this detection.- Return type
- passes_price_scan_activity_filter(detection, min_deposit_threshold)
Check whether a vault has enough activity for historical price scanning.
- Parameters
detection (eth_defi.erc_4626.core.ERC4262VaultDetection) – Shared vault detection envelope.
min_deposit_threshold (int) – Minimum number of vault-local deposit events for ordinary vaults.
- Returns
Truewhen the deposit threshold is met, the protocol has a known alternative activity source, or a T3tris vault has at least one configuration event.- Return type
- is_generic_erc4626_protocol_slug(protocol_slug)
Is this protocol slug an explicit generic ERC-4626 marker.
- get_vault_protocol_name(features)
Deduct vault protocol name based on Vault smart contract features.
Empty features mean a generic synchronous ERC-4626 vault.
See
eth_defi.erc_4626.classification.identify_vault_features().- Parameters
features (set[eth_defi.erc_4626.core.ERC4626Feature]) – List of detected features for a vault
- Return type
- get_erc_4626_contract(web3)
Get IERC4626 interface.
- Parameters
web3 (web3.main.Web3) –
- Return type
Type[web3.contract.contract.Contract]
- get_deployed_erc_4626_contract(web3, address, abi_fname='lagoon/IERC4626.json')
Get IERC4626 deployed at some address.
- Parameters
web3 (web3.main.Web3) –
address (eth_typing.evm.HexAddress) –
- Return type
web3.contract.contract.Contract
- class ERC4262VaultDetection
Bases:
objectA ERC-4626 detection.
- address: eth_typing.evm.HexAddress
Vault contract address
- first_seen_at: datetime.datetime
When this vault was first seen
- features: set[eth_defi.erc_4626.core.ERC4626Feature]
Detected features fo this vault
- updated_at: datetime.datetime
When this entry was scanned on chain
- deposit_count: int
Number of on-chain deposit events observed.
Zero for native protocols (GRVT, Lighter, Hibachi) that do not support on-chain deposit/redeem event tracking.
- redeem_count: int
Number of on-chain redeem events observed.
Zero for native protocols that do not support on-chain event tracking.
- configuration_count: int
Number of vault configuration events observed.
Used by T3tris migration-pool vaults, which may never emit vault-local deposit events.
getattraccess in activity filtering keeps old persisted detections compatible after this slot was added.
- get_spec()
Chain id/address tuple identifying this vault.
- Return type
- __init__(chain, address, first_seen_at_block, first_seen_at, features, updated_at, deposit_count, redeem_count, configuration_count=0)
- Parameters
chain (int) –
address (eth_typing.evm.HexAddress) –
first_seen_at_block (int) –
first_seen_at (datetime.datetime) –
features (set[eth_defi.erc_4626.core.ERC4626Feature]) –
updated_at (datetime.datetime) –
deposit_count (int) –
redeem_count (int) –
configuration_count (int) –
- Return type
None