{
    "Function": "slitherConstructorConstantVariables",
    "File": "contracts/mock/MockzpaToken.sol",
    "Parent Contracts": [
        "contracts/interfaces/Stabilize.sol",
        "node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol",
        "node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "node_modules/@openzeppelin/contracts/GSN/Context.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "contract MockzpaToken is ERC20, IZPAToken {\n    using SafeMath for uint256;\n    using SafeERC20 for IERC20;\n\n    address constant DEAD = 0x000000000000000000000000000000000000dEaD;\n    uint256 constant divisionFactor = 100000;\n\n    address public override underlyingAsset;\n    uint256 public override initialFee = 1000; // 1000 = 1%, 100000 = 100%, max fee restricted in contract is 10%\n    uint256 public override endFee = 100; // 100 = 0.1%\n    uint256 public override feeDuration = 604800; // The amount of seconds it takes from the initial to end fee\n\n    // Info of each user.\n    struct UserInfo {\n        uint256 depositTime; // The time the user made a deposit, every deposit resets the time\n    }\n\n    mapping(address => UserInfo) private userInfo;\n\n    constructor(\n        string memory _name,\n        string memory _symbol,\n        address _underlyingAsset\n    )\n        public\n        ERC20(_name, _symbol)\n    {\n        underlyingAsset = _underlyingAsset;\n    }\n\n    function deposit(uint256 _amount) external override {\n        uint256 _toMint = _amount.mul(1e18).div(pricePerToken());\n        IERC20(underlyingAsset).safeTransferFrom(msg.sender, address(this), _amount);\n        _mint(msg.sender, _toMint);\n        userInfo[_msgSender()].depositTime = block.timestamp; // Update the deposit time\n    }\n\n    function redeem(uint256 _amount) external override {\n        uint256 _underlyingAmount = _amount.mul(pricePerToken()).div(1e18);\n        _burn(msg.sender, _amount);\n\n        // Pay fee upon withdrawing\n        if (userInfo[_msgSender()].depositTime == 0) {\n            // The user has never deposited here\n            userInfo[_msgSender()].depositTime = block.timestamp; // Give them the max fee\n        }\n\n        uint256 feeSubtraction = initialFee.sub(endFee).mul(block.timestamp.sub(userInfo[_msgSender()].depositTime)).div(feeDuration);\n        if (feeSubtraction > initialFee.sub(endFee)) {\n            // Cannot reduce fee more than this\n            feeSubtraction = initialFee.sub(endFee);\n        }\n        uint256 fee = initialFee.sub(feeSubtraction);\n        fee = _underlyingAmount.mul(fee).div(divisionFactor);\n        _underlyingAmount = _underlyingAmount.sub(fee);\n\n        // Now withdraw this amount to the user and send fee to treasury\n        IERC20(underlyingAsset).safeTransfer(msg.sender, _underlyingAmount);\n        IERC20(underlyingAsset).safeTransfer(DEAD, fee);\n    }\n\n    function pricePerToken() public view override returns (uint256) {\n        return 2e18;\n    }\n}"
}