Architecture
The system operates on a trust-minimized architecture separating Decision Making from Execution:
Ditto Keeper (Off-chain): Watches yield opportunities across the connected protocols and proposes a new allocation.
APR Oracle (On-chain): Snapshots realized APRs from underlying protocols to prevent manipulation.
Rebalance execution (On-chain): The vault's own keeper-gated
executeRebalanceapplies a proposed allocation. It only goes through if the on-chain estimator scores the new allocation above the current one by a configured margin, and a cooldown applies between rebalances.Vault (ERC-4626): Atomically executes deposits/withdrawals across strategies.
Security Measures
Non-Custodial: User funds are held in the smart contract, never by Ditto or the integrator.
Atomic Execution: Rebalances happen in a single transaction.
Slippage Protection: The vault snapshots Total Value Locked (TVL) before and after every rebalance.
Reward Debt Model: Protocol fees are minted exclusively from yield. The principal deposit is never touched.
Fail-closed guards: A price guard and a protocol blocklist guard must hold fresh state. If that state goes stale, or a guard reports a problem, deposits and rebalances are blocked. Withdrawals are never gated by the guards.

Last updated

