Mellow Protocol
  • 💡Overview
  • 🎛️MELLOW LRT (LST) PRIMITIVE
    • Overview
    • Simple-LRT
    • LRT Contracts
      • 🏦Vault
      • 🔧VaultConfigurator
      • ⚖️Validators
        • ManagedValidator
        • ERC20SwapValidator
        • DefaultBondValidator
        • AllowAllValidator
      • 🧬Strategies
        • DefaultBondStrategy
        • SimpleDVTStakingStrategy
      • 🔎Oracles
        • ChainlinkOracle
        • ManagedRatiosOracle
      • 🧱Modules
        • DelegateModules
          • ERC20SwapModule
          • DefaultBondModule
          • StakingModule
        • ExternalModules
        • TvlModules
          • DefaultBondTvlModule
          • ERC20TvlModule
          • ManagedTvlModule
      • 🪛Utils
        • DepositWrapper
        • DefaultAccessControl
      • 🔐Security
        • AdminProxy
    • DVstETH vault overview
    • Interoperable vaults
    • Contract deployments
    • Security
    • Loyalty Points
      • Points in Symbiotic pre-deposit contracts
      • DeFi points integration instructions
    • User Tutorials
      • Deposit guide
      • Withdrawal guide
      • Emergency withdrawal guide (advanced)
    • API
  • 🤖MELLOW ALM
    • Mellow ALM Toolkit
      • Overview
      • 📘Domain objects
      • 🧩Components
      • 🍜Processes
      • 💎Core
      • 🔮Oracles
        • VeloOracle
      • 🎯Strategy
        • PulseStrategyModule
      • 🔌AMM Adapters
        • VeloAmmModule
      • 🚙Utility contracts
        • AmmDepositWithdrawModule
        • Counter
        • LpWrapper
        • VeloDeployFactory
    • Mellow permissionless vaults
      • Overview
      • Core
      • Contracts API
      • Strategies
        • Fearless Gearbox strategy
        • LStrategy
        • Uni V3 Boosted strategy
        • Pulse strategy
        • Pulse strategy V2
        • Tamper strategy
      • Governance parameters
      • Contracts specs
      • Tutorials
        • Contracts deployments
        • Deploy your own strategy
        • wstETH strategies deposit guide
      • Mellow contracts addresses
        • Mellow Protocol Addresses (Polygon)
        • Mellow Protocol Addresses (Mainnet)
        • Gearbox Fearless Strategy
        • Tamper Strategy
        • UniV3 Pulse wstETH-USDC
        • UniV3 Pulse V2 wstETH-USDC
        • Velodrome CL strategies
        • Aerodrome CL strategies
      • Glossary
      • FAQ
    • Mellow Backtesting SDK
  • 🗄️Resources
    • Media kit
    • Twitter
    • Discord
Powered by GitBook
On this page
  • Overview
  • Key Features
  • Error Definitions
  • Core Methods
  • Event
  1. MELLOW LRT (LST) PRIMITIVE
  2. LRT Contracts
  3. Validators

DefaultBondValidator

Overview

DefaultBondValidator ensures that only authorized bonds are involved in deposit and withdrawal operations. It uses validation methods, mappings for supported bonds, and emits events when bonds are updated, ensuring comprehensive control over delegate DefaultBondModule.

Key Features

  • Bond Support: Determines which bonds are authorized for deposits and withdrawals.

  • Validation: Enforces compliance for bond operations, ensuring only supported bonds are accessed.

  • Error Reporting: Raises specific errors when bond operations fail validation.

Error Definitions

  • InvalidLength: Raised when the data length for bond transactions is incorrect.

  • ZeroAmount: Indicates that the transaction specifies a zero amount, which is invalid.

  • InvalidSelector: The function selector is unrecognized.

  • UnsupportedBond: The bond used in the transaction is unsupported.

Core Methods

  1. View Functions

    • isSupportedBond(address): Checks if a bond is authorized for deposits and withdrawals.

  2. Configuration Functions

    • setSupportedBond(address, bool): Sets a bond's supported status.

  3. Validation Function

    • validate(address, address, bytes): Verifies that the bond transaction complies with the rules:

      • Checks for proper data formatting.

      • Verifies that the bond is authorized.

      • Checks for deposit and withdraw function signatures.

Event

  • DefaultBondValidatorSetSupportedBond(address, bool, uint256): Emitted when a bond's support status is updated.

    • bond: Address of the bond.

    • flag: Boolean indicating support status.

    • timestamp: Timestamp of the action.

PreviousERC20SwapValidatorNextAllowAllValidator
🎛️
⚖️