{
    "Function": "slitherConstructorVariables",
    "File": "contracts/dex/pool/VaderPool.sol",
    "Parent Contracts": [
        "contracts/dex/pool/BasePool.sol",
        "node_modules/@openzeppelin/contracts/security/ReentrancyGuard.sol",
        "node_modules/@openzeppelin/contracts/access/Ownable.sol",
        "node_modules/@openzeppelin/contracts/token/ERC721/ERC721.sol",
        "node_modules/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol",
        "contracts/interfaces/dex/pool/IVaderPool.sol",
        "node_modules/@openzeppelin/contracts/token/ERC721/IERC721.sol",
        "node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol",
        "node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol",
        "node_modules/@openzeppelin/contracts/utils/Context.sol",
        "contracts/dex/utils/GasThrottle.sol",
        "contracts/shared/ProtocolConstants.sol",
        "contracts/interfaces/dex/pool/IBasePool.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "contract VaderPool is IVaderPool, BasePool {\r\n    /* ========== STATE VARIABLES ========== */\r\n\r\n    // Denotes whether the queue system is active\r\n    bool public queueActive;\r\n\r\n    /* ========== CONSTRUCTOR ========== */\r\n\r\n    /*\r\n     * @dev Initializes contract's state by passing addresses of\r\n     * native and foreign assets to {BasePool} contract and setting\r\n     * active status of queue.\r\n     **/\r\n    constructor(\r\n        bool _queueActive,\r\n        IERC20Extended _nativeAsset,\r\n        IERC20Extended _foreignAsset\r\n    ) BasePool(_nativeAsset, _foreignAsset) {\r\n        queueActive = _queueActive;\r\n    }\r\n\r\n    /* ========== VIEWS ========== */\r\n\r\n    /* ========== MUTATIVE FUNCTIONS ========== */\r\n\r\n    /*\r\n     * @dev Allows burning of NFT represented by param {id} for liquidity redeeming.\r\n     *\r\n     * Deletes the position in {positions} mapping against the burned NFT token.\r\n     *\r\n     * Internally calls `_burn` function on {BasePool} contract.\r\n     *\r\n     * Calculates the impermanent loss incurred by the position.\r\n     *\r\n     * Returns the amounts for native and foreign assets sent to the {to} address\r\n     * along with the covered loss.\r\n     **/\r\n    // NOTE: IL is only covered via router!\r\n    function burn(uint256 id, address to)\r\n        external\r\n        override\r\n        returns (\r\n            uint256 amountNative,\r\n            uint256 amountForeign,\r\n            uint256 coveredLoss\r\n        )\r\n    {\r\n        (amountNative, amountForeign) = _burn(id, to);\r\n\r\n        Position storage position = positions[id];\r\n\r\n        uint256 creation = position.creation;\r\n        uint256 originalNative = position.originalNative;\r\n        uint256 originalForeign = position.originalForeign;\r\n\r\n        delete positions[id];\r\n\r\n        // NOTE: Validate it behaves as expected for non-18 decimal tokens\r\n        uint256 loss = VaderMath.calculateLoss(\r\n            originalNative,\r\n            originalForeign,\r\n            amountNative,\r\n            amountForeign\r\n        );\r\n\r\n        // TODO: Original Implementation Applied 100 Days\r\n        coveredLoss =\r\n            (loss * _min(block.timestamp - creation, _ONE_YEAR)) /\r\n            _ONE_YEAR;\r\n    }\r\n\r\n    /* ========== RESTRICTED FUNCTIONS ========== */\r\n\r\n    // TODO: Investigate Necessity\r\n    function toggleQueue() external override onlyOwner {\r\n        bool _queueActive = !queueActive;\r\n        queueActive = _queueActive;\r\n        emit QueueActive(_queueActive);\r\n    }\r\n\r\n    /* ========== INTERNAL FUNCTIONS ========== */\r\n\r\n    /* ========== PRIVATE FUNCTIONS ========== */\r\n\r\n    /**\r\n     * @dev Ensures only the DAO is able to invoke a particular function by validating that\r\n     * the owner is the msg.sender, equivalent to the DAO address\r\n     */\r\n    function _onlyDAO() private view {\r\n        require(\r\n            owner() == _msgSender(),\r\n            \"BasePool::_onlyDAO: Insufficient Privileges\"\r\n        );\r\n    }\r\n\r\n    /**\r\n     * @dev Calculates the minimum of the two values\r\n     */\r\n    function _min(uint256 a, uint256 b) private pure returns (uint256) {\r\n        return a < b ? a : b;\r\n    }\r\n\r\n    /* ========== MODIFIERS ========== */\r\n\r\n    /**\r\n     * @dev Throws if invoked by anyone else other than the DAO\r\n     */\r\n    modifier onlyDAO() {\r\n        _onlyDAO();\r\n        _;\r\n    }\r\n}"
}