MeridianVault is now a Coordinator contract! #368
collinsezedike
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The Meridian coordinator vault is live, and it's a different architecture from what was there before: protocol-agnostic by design, not tied to Blend or DeFindex specifically.
Deposits now go through
MeridianVault, a coordinator contract that holds no opinion about where funds actually earn yield. It delegates to a swappable adapter (BlendAdaptertoday,DefindexAdapterbuilt and ready for its first live vault) that does the protocol-specific work. Which protocol a vault routes to is on-chain state,vault.get_adapter(), changeable via an admin-onlyset_adaptercall, no vault redeploy required (#329).Self-updating rate discovery. Each adapter exposes
get_pool()andget_protocol(), so the frontend discovers live rate data by walkingvault.get_adapter()→adapter.get_pool()/get_protocol()rather than tracking pool addresses in config. If the adapter is ever swapped, the app picks up the new pool automatically on the next fetch (#357).Live yield.
BlendAdapter.accrue()refreshes the vault's cached position value from Blend's own reserve data (#356). It shipped with a real bug, caught and fixed same-day: the divisor was wrong, and it briefly inflated a test position's displayed value by ~100,000x. No funds were ever at risk, only a cached display number, and it's fixed and redeployed now (#366, #367) with a regression test that reproduces the exact corruption against the old code.What came with it:
amounts.get(0)edge case (test: add unit tests for Blend and DeFindex adapter contracts #363), and for the SDK's transaction-building layer,coordinator.tshad zero coverage before this (test: add unit tests for the SDK transaction-building layer #364)DEPLOYER/ADMINkey split (docs: rewrite architecture and deployment docs for adapter pattern #361)If you still have funds in the old vault, deposits made before this migration, here's a previous deployment URL to withdraw.
Back to building.
— Collins
All reactions