Morpho Vaults V2 Adapter
Differences from V1
- Different factory contract
- Different event signatures (
CreateVaultV2instead ofCreateMetaMorpho) - Same basic tracking logic
Manifest
export const manifest: Manifest = {
name: 'morpho-vaultsv2',
version: '0.0.1',
chainArch: 'evm',
trackables: {
vaults: {
kind: 'position',
quantityType: 'token_based',
params: {
vaultAddress: evmAddress('The vault contract address'),
},
requiredPricer: morphov2vaultsFeed, // V2 pricer
},
createMetaMorphoFactory: {
kind: 'action',
quantityType: 'none',
params: {
factoryAddress: evmAddress('The factory contract address'),
},
},
},
};
Example Config
{
"adapterConfig": {
"adapterId": "morpho-vaultsv2",
"config": {
"createMetaMorphoFactory": [
{
"params": {
"factoryAddress": "0xA1D94F746dEfa1928926b84fB2596c06926C0405"
}
}
],
"vaults": [
{
"params": {
"vaultAddress": "0x90b482ca9769807569998b20e062e024b1a0a39d"
},
"pricing": {
"kind": "morphov2vaults",
"underlyingAsset": {
"kind": "coingecko",
"id": "usd-coin"
}
}
}
]
}
}
}
Config Fields
| Trackable | Field | Description |
|---|---|---|
| createMetaMorphoFactory | params.factoryAddress | The V2 vault factory contract |
| vaults | params.vaultAddress | The specific vault to track |
| vaults | pricing.underlyingAsset | How to price the underlying asset |
Key Differences from V1
| Aspect | V1 | V2 |
|---|---|---|
| Factory Address | 0x1897A8997241C1cD4bD0698647e4EB7213535c24 | 0xA1D94F746dEfa1928926b84fB2596c06926C0405 |
| Factory Event | CreateMetaMorpho | CreateVaultV2 |
| Pricer | morphov1vaults | morphov2vaults |
When to Use V1 vs V2
- V1: For older MetaMorpho vaults created before the V2 factory
- V2: For newer vaults created with the V2 factory