Lagoon
  • Back to App
  • Overview
    • What is Lagoon?
    • Lagoon Vault Architecture
    • FAQ
    • Terminology
  • VAULT
    • Overview
    • Deposit and Withdraw flows
    • Vault valuation
    • Fees
    • Roles and capacities
      • Vault admin
      • Valuation Oracle
      • Curator
      • Whitelist Manager
    • Create your vault
      • Vault post-deployment operations
      • Access your vault on Lagoon
    • How to?
      • Update the vault valuation & settle requests
      • Activate and manage a synchronous vault
      • Migrate an existing vault into a new Lagoon vault ?
      • How to pause a vault
  • Curation solutions
    • Safe & Zodiac Roles Modifier
    • MPC (Multi-Party Computation) wallet
    • How to?
      • Renounce Safe & Zodiac role modifier ownership
  • Developer hub
    • Key Data Structures and Epoch mechanism
    • Integration
      • Get a user position
      • Async deposit flow
      • Synchronous deposit flow
      • Vaults Frontend Integration
  • RESOURCES
    • Addresses
    • Audits
    • Brand Kit
    • Github
    • X
    • Blog
    • LinkedIn
Powered by GitBook
On this page
  • Overview
  • Function signature
  • Operations affected
  • Usage example
  • Events
  • Security considerations
  • Related functions
  • Error conditions
  1. VAULT
  2. How to?

How to pause a vault

Overview

The pause() function halts all core operations of the vault and can only be executed by the vault admin. This is a critical administrative function used for emergency situations or maintenance periods.

Function signature

function pause() public onlyOwner

Operations affected

The following core operations are halted when the vault is paused:

  • All request types - Any pending or new requests are blocked, including:

    • requestDeposit()

    • requestRedeem()

    • syncDeposit()

    • claimSharesAndRequestRedeem()

    • cancelRequestDeposit()

    • withdraw()

    • redeem()

    • deposit()

    • mint()

  • Settlement operations - Both deposit and redeem settlements are halted as well as closing operations, including:

    • settleDeposit()

    • settleRedeem()

    • initiateClosing()

    • close()

  • NAV proposals - The NAV update proposal functionality is disabled, including:

    • updateNewTotalAssets()

  • Share transfers - The _update() function is paused resulting in all transfers of shares being blocked

  • Operator operations - The setOperator() function is disabled

Usage example

// Only the owner can call this function
vault.pause();

You can also call pause from etherscan or any other Ethereum client that allows contract interaction

Events

This function emits a Paused event:

event Paused(address account);

Security considerations

  • ⚠️ Emergency use: Should only be used in emergency situations or planned maintenance

  • ⚠️ User impact: All user operations will be blocked until unpause() is called

Related functions

  • unpause() - Resumes vault operations

  • paused() - Checks if the vault is currently paused

Error conditions

  • Reverts if called by any address other than the owner

PreviousMigrate an existing vault into a new Lagoon vault ?NextSafe & Zodiac Roles Modifier

Last updated 13 days ago