Akropolis
  • 🕶️Introduction
  • 🧠Using Akropolis
  • 💸Products
    • 🌀Vortex
      • 💫Overview
      • 💻How it works
      • 🛣️Roadmap
      • ✍️Competitor Comparison
    • 🎆Yearn Integration
    • 💜AKRO staking
  • 🏛️Governance
    • 🟣AKRO token
    • 📋Governance process
  • 🏗️Developer documentation
    • 💫Vortex
      • 👓High-Level View
      • 🍭Contract Design
      • 🌾Key Function - harvest
      • 🧑‍💻🧑💻 Integration guide
      • ❗Risk Management
        • Position Buffer
        • remargin()
        • unwind()
        • emergencyExit()
        • Funding Rate Monitoring
    • 🚦Deployed Contracts
      • Vortex
        • Testnet contracts
    • 🐧Open Source Development
      • Amun Ra
      • Pensify
      • C2FC
      • AkropolisOS
      • Sparta
      • Delphi
      • Polkahub
      • Ethereum <-> Substrate bridge
      • Web3 Wallet Kit
      • Substrate Staking portal
  • 🔐Security
    • 🔮Audits
    • 🐞Bug Bounty
  • 📚Additional Resources
    • 📑FAQ
    • 💥Community Channels
    • 📓Basis Trading and Perpetual Contracts
Powered by GitBook
On this page
  1. Developer documentation
  2. Vortex
  3. Risk Management

emergencyExit()

In a situation where an immediate exit is required - such as if positions were to be liquidated or in the event of an exploit that may affect the system - a Manager can perform an emergencyExit(). This is where all positions are unwound and sent to the Vortex Governance multisig.

    /**
     * @notice  emergency exit the entire strategy in extreme circumstances
     *          unwind the strategy and send the funds to governance
     * @dev     only callable by governance
     */
    function emergencyExit() external onlyGovernance {
        // unwind strategy unless it is already unwound
        if (!isUnwind) {
            unwind();
        }
        uint256 wantBalance = IERC20(want).balanceOf(address(this));
        // send funds to governance
        IERC20(want).safeTransfer(governance, wantBalance);
        emit EmergencyExit(governance, wantBalance);
    }

This is a function of last resort, but is important to maintain security over funds.

Previousunwind()NextFunding Rate Monitoring

Last updated 3 years ago

🏗️
💫
❗