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
  • Constructor
  • Core Methods
  • Modifiers
  • Events
  1. MELLOW LRT (LST) PRIMITIVE
  2. LRT Contracts
  3. Strategies

SimpleDVTStakingStrategy

Overview

The SimpleDVTStakingStrategy contract manages staking operations by interacting with a staking module and vault. It extends the DefaultAccessControl to incorporate robust access management while providing functionalities to set staking parameters, initiate deposits, and process withdrawals.

Key Features

  • Staking Operations: Manages the conversion and deposit of tokens for staking.

  • Withdrawal Management: Handles withdrawals from the vault based on the staking strategy.

  • Parameter Management: Allows setting the maximum allowable remainder of staked assets in the vault after instant staking operation.

Constructor

  • Initializes the contract with an admin, a vault, and a staking module.

    • Parameters:

      • admin: Administrator of the contract.

      • vault_: Address of the associated vault.

      • stakingModule_: Address of the staking module used for conversion and deposit operations.

Core Methods

  1. Staking Operations

    • convertAndDeposit(uint256, uint256, bytes32, bytes32, uint256, bytes, IDepositSecurityModule.Signature[]): Converts a specified amount of WETH into WSTETH using StakingModule and DepositSecurityModule

      • Parameters:

        • amount: The amount to convert and deposit.

        • blockNumber: The block number for the deposit.

        • blockHash: The hash of the block.

        • depositRoot: The root hash of the deposit.

        • nonce: A unique identifier for the operation.

        • depositCalldata: Additional calldata for the deposit.

        • sortedGuardianSignatures: Signatures from guardians for security validation.

      • Returns:

        • success: Indicates if the deposit was successful.

      • Event:

        • ConvertAndDeposit: Emitted upon a deposit attempt.

  2. Withdrawal Management

    • processWithdrawals(address[], uint256): Processes withdrawals for specified users.

      • Parameters:

        • users: Array of user addresses to process withdrawals for.

        • amountForStake: Amount of tokens to convert for staking before processing withdrawals.

      • Returns:

        • statuses: Array indicating the success or failure of withdrawals for each user.

      • Event:

        • ProcessWithdrawals: Emitted when withdrawals are processed.

  3. Parameter Management

    • setMaxAllowedRemainder(uint256): Sets the maximum allowed remainder of staked tokens in the vault.

      • Parameters:

        • newMaxAllowedRemainder: The new limit for the maximum remainder.

      • Event:

        • MaxAllowedRemainderChanged: Emitted when the max allowed remainder is updated.

Modifiers

  • _requireAdmin(): Ensures that only an administrator can perform certain actions.

  • _requireAtLeastOperator(): Ensures that only operators or higher level roles can perform specific operations.

Events

  • MaxAllowedRemainderChanged: Emitted when the maximum allowed remainder is updated.

  • ConvertAndDeposit: Emitted after attempting to convert and deposit tokens.

  • ProcessWithdrawals: Emitted when withdrawals are processed.

PreviousDefaultBondStrategyNextOracles
🎛️
🧬