Crypto Training
Veda vs Mellow: Architecture, Fund Flows, and Security Tradeoffs
A code-level comparison of Veda BoringVault and Mellow Flexible Vaults: module boundaries, async flows, curator calldata controls, oracle models, and security assumptions.
Veda and Mellow both market modular vault systems, but they optimize different trust surfaces.
- Veda keeps a thin vault and pushes policy into manager/teller/accountant modules.
- Mellow keeps explicit queue/oracle/risk machinery around a core vault and strategy containers.
This post compares them from Solidity code and operational semantics.
Codebases:
- Mellow Flexible Vaults: github.com/mellow-finance/flexible-vaults/tree/main/src
- Veda Boring Vault: github.com/Veda-Labs/boring-vault/tree/main/src
Scope and framing#
The comparison focuses on:
- module boundaries and responsibilities
- end-to-end fund flows
- curator execution controls
- pricing/oracle update paths
- failure modes and user protections
Component-by-component architecture#
Mellow core graph#
Primary contracts:
src/vaults/Vault.solsrc/modules/ShareModule.solsrc/modules/VaultModule.solsrc/queues/DepositQueue.solsrc/queues/RedeemQueue.solsrc/oracles/Oracle.solsrc/managers/RiskManager.solsrc/vaults/Subvault.solsrc/modules/CallModule.solsrc/permissions/Verifier.sol
Veda core graph#
Primary contracts:
src/base/BoringVault.solsrc/base/Roles/ManagerWithMerkleVerification.solsrc/base/Roles/TellerWithMultiAssetSupport.solsrc/base/Roles/AccountantWithRateProviders.solsrc/base/Roles/WithdrawQueue.solsrc/base/Roles/ShareWarden.sol
Side-by-side responsibility map#
| Responsibility | Mellow | Veda |
|---|---|---|
| Vault core | Vault composes modules | BoringVault stays minimal (manage, enter, exit) |
| Deposit path | Explicit async DepositQueue request/claim | TellerWithMultiAssetSupport sync mint path |
| Redeem path | Explicit async RedeemQueue batch/claim | WithdrawQueue or delayed withdraw modules |
| Strategy execution | Subvault + CallModule + Verifier | ManagerWithMerkleVerification controlling BoringVault.manage |
| Calldata authorization | Compact/extended/merkle/custom verification types | Merkle leaf over decoder + target + selector + sensitive args |
| Pricing | Oracle.submitReports + suspicious report handling | AccountantWithRateProviders.updateExchangeRate bounds and pause |
| Risk accounting | RiskManager tracks pending/vault/subvault balances | Strong call-level policy; less native queue risk accounting |
| Transfer controls | Share manager flags and queue constraints | BeforeTransferHook, deny/allow lists, optional permissioned transfers |
Fund flow: deposits and redemptions#
Mellow deposit flow (asynchronous)#
Mellow redeem flow (asynchronous with batches)#
Veda deposit flow (synchronous teller path)#
Veda withdraw flow (request then completion)#
Curator calldata control: where each stack is strict#
Mellow verification model#
CallModule.call always invokes Verifier.verifyCall first.
ONCHAIN_COMPACT: allowlist by(caller, target, selector)MERKLE_COMPACT: same compact tuple but Merkle-provedMERKLE_EXTENDED: exact(caller, target, value, full calldata)CUSTOM_VERIFIER: pluggable verifier logic
Veda verification model#
ManagerWithMerkleVerification verifies every call leaf using a decoder/sanitizer staticcall.
Leaf shape includes:
- decoder/sanitizer contract
- target
- non-zero value bit
- selector
- packed sensitive address arguments
Oracle and pricing trust surfaces#
Mellow oracle pipeline#
Oracle.submitReports validates deviation windows, marks suspicious reports, and can route suspicious reports through explicit acceptance.
Veda accountant pipeline#
AccountantWithRateProviders expects off-chain computed exchange rate updates but enforces bounds and update delays; violations pause.
Security model and blast radius#
Mellow#
- Strength: transparent on-chain async state machine for requests/claims.
- Strength: explicit risk manager accounting channels (
pending,vault,subvault). - Risk: if curator does not unwind external positions, redeem batches can stall until liquidity returns.
- Risk: oracle/report submitter authority remains operationally sensitive.
Veda#
- Strength: very strict per-call policy surface via Merkle + decoder/sanitizer.
- Strength: share lock and permissioned withdrawal controls are explicit anti-MEV/operations tools.
- Risk: exchange-rate update trust sits with authorized updater pipeline.
- Risk: policy correctness depends on decoder/sanitizer coverage quality.
Where Veda is stronger#
-
Calldata precision by default Veda’s manager path forces each strategy call through a Merkle leaf derived from decoded sensitive arguments. This is a tight, explicit policy envelope for strategist execution.
-
Operational pause posture around pricing Rate updates are bounded and delayed, and invalid updates move the system into paused mode. This creates a deterministic brake at the accounting layer.
-
Transfer and withdrawal controls Share lock windows, deny/allow lists, and optional permissioned transfers are native in teller/hook workflows.
Where Mellow is stronger#
-
First-class asynchronous vault semantics Deposit and redeem queues are explicit on-chain request/claim machines with report-driven settlement, which is very clear for users and auditors.
-
Integrated risk/accounting channels The architecture has dedicated
RiskManager,FeeManager,ShareManager, and queue handlers integrated with oracle reports, making state transitions explicit and inspectable. -
Strategy containerization Subvault isolation gives an extra blast-radius boundary between core accounting and strategy execution wallets.
Practical design takeaway#
The two systems are not substitutes at every layer.
- If the priority is tight per-call strategy policy, Veda’s manager/decoder model is hard to beat.
- If the priority is transparent async user lifecycle and queue semantics, Mellow’s core architecture is stronger.
A robust vault platform can combine both ideas: queue-native lifecycle plus strict, argument-aware call verification.