Most yield optimisers pick the protocol with the highest APY and call it done. That single-metric approach ignores risk, gas costs, and rate volatility — factors that matter the moment market conditions shift.
In this paper I formalise the alternative: an off-chain Python agent applies Multi-Criteria Decision Making with weighted scoring across four dimensions — yield, risk, cost-efficiency, and stability — then signs each rebalance decision with EIP-712 typed data before submitting it on-chain. The result is a hybrid ERC-4626 vault that routes USDC between Aave V3 and Compound V3 with every allocation decision cryptographically verifiable on-chain.
The safety question is where I spent the most effort. Invariant testing ran 76,800+ randomised function calls against the contract with zero violations. The system also includes a Chainlink Automation fallback to preserve liveness if the agent is unavailable. The full system is deployed and validated on Ethereum Sepolia.
The practical implication: MCDM lets you encode explicit, auditable trade-offs rather than embedding them implicitly in code logic. When regulators or counterparties ask why the vault moved funds, there is a signed, verifiable answer on-chain — not a black box.
Paper: https://doi.org/10.6084/m9.figshare.32141167
#DeFi #AIagents #SmartContracts