Skip to main content
Every transaction through Blend passes through 3 independent security layers before it executes: transaction guards, rate limiting, and slippage verification.

Transaction guards

Every Safe has a RolesGuard installed as its transaction guard. The guard runs two pre-execution hooks. checkTransaction fires before any direct transaction. When the system is paused, only Safe owners can execute. Non-owners receive a SystemPaused() revert. checkModuleTransaction fires before any module-initiated transaction. When paused, ALL module transactions are blocked. There is no owner bypass for module calls. Module execution stops completely during a pause, even if the Safe owner tries to trigger it. The pause mechanism is controlled by PAUSER_ROLE via pause(bool _shouldPause). This is a kill switch for module execution that does not affect the owner’s ability to withdraw directly.

Rate limiting

Every rebalance and vault action is rate-limited per (safe, vault) pair. The key is keccak256(abi.encodePacked(safe, vault)). MIN_SECONDS_BETWEEN_OPERATIONS is set between 1 and 300 seconds at deployment. The contract enforces strictly-greater-than comparison against the last operation timestamp. The timestamp is set before execution. If the transaction reverts, all state changes (including the timestamp) roll back.

Slippage protection

Four independent layers protect against unfavorable execution. Layer 1: Governance maximum. maxSlippageBps is a hard ceiling set by governance. No swap can exceed this tolerance, regardless of what the caller requests. Layer 2: Per-swap limit. Every swap call includes a slippageBps parameter. The SwapAdapter rejects any value exceeding maxSlippageBps. Layer 3: Oracle verification. The SwapAdapter calculates the expected output using PriceLib.quoteToBase (or baseToQuote for reverse swaps) and then applies the slippage tolerance to derive a minimum acceptable output. The actual swap result must meet or exceed this minimum. Layer 4: Off-chain cross-check. For vault deposits and withdrawals, MorphoVaultLib validates against an expectation computed off-chain. The caller passes in assetPerShare, and the vault’s actual assets/shares ratio must stay within its bounds. Slippage is never accepted on oracle prices alone. The oracle check and the off-chain expectation both have to agree. Beyond these layers, checkSwapInvariants enforces a zero-balance invariant. The SwapAdapter must hold zero tokens of both the input and output before and after every swap. This prevents residual token accumulation that could be drained.

Access control

Multiple layers restrict who can call what. onlyExecutor - StrategyManager.executeRebalance and executeVaultAction are restricted to a single authorized executor address. This is the off-chain worker that triggers operations. _onlyDelegateCall - All VaultControllers, including UserWithdrawController, compare address(this) against an immutable SELF address. This ensures the code only runs via delegatecall from a Safe, never as a standalone call. Timelocked configuration - Only the operational timelock can update vault configs on RolesReceiver, and each change waits 2 days. Only the security timelock can change the executor, and its changes wait 7 days. Single-owner validation - UserWithdrawController requires the Safe to have exactly one owner. This resolves the withdrawal recipient on-chain without relying on off-chain input.

Sanctions screening

Blend screens wallet addresses against OFAC and global sanctions lists at three stages before any funds move. This is the implementation behind Compliance Controls. Screening fails closed. If Blend cannot complete a required check, it blocks the request with HTTP 503 instead of allowing the operation through.
Platforms can’t bypass or disable sanctions screening.

Haltable operations

The API supports a per-account-type halt state. When isHalted is true, the API returns HTTP 423 Locked for deposit-related operations. Withdrawals are intentionally allowed during halt. Users can always retrieve their funds, even when the system is in a degraded state. The halt flag is set at the account type level, not globally. One platform’s account type can be halted while others continue operating.

Architecture overview

See how Safe isolation and cross-chain coordination work.

Contracts

Explore the 9 contract systems powering the protocol.

Security model

Understand the defense-in-depth model and real-world scenarios.

Audits

Review independent security audit reports.
Last modified on November 25, 2026