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
Functions
|
Get IERC4626 deployed at some address. |
|
Get IERC4626 interface. |
|
Deduct vault protocol name based on Vault smart contract features. |
Classes
A ERC-4626 detection. |
|
Additional extensionsERc-4626 vault may have. |
- 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
- 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
- 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'
- gains_like = 'gains_like'
Gains network and Ostium gToken vaults https://github.com/GainsNetwork
- ostium_like = 'ostium_like'
ALmost like Gains, but Ostium LP
- 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 metavault https://github.com/0xZunia/Kiln.MetaVault
- 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
- 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
- liquidity_royalty_like = 'liquidity_royalty_like'
Liquidity Royalty Tranching
https://github.com/stratosphere-network/LiquidRoyaltyContracts
- csigma_like = 'csigma_like'
cSigma Finance
- spark_like = 'spark_like'
Spark
- 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/
- 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/
- 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
- 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/
- 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/
- 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/
- get_vault_protocol_name(features)
Deduct vault protocol name based on Vault smart contract features.
At least one feature must match.
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
- 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)
- 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) –
- Return type
None