{
    "Function": "redeemNFT",
    "File": "contracts/Sherlock.sol",
    "Parent Contracts": [
        "node_modules/@openzeppelin/contracts/security/Pausable.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/ISherlock.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/interfaces/ISherlockStrategy.sol",
        "contracts/interfaces/ISherlockPayout.sol",
        "contracts/interfaces/ISherlockGov.sol",
        "contracts/interfaces/ISherlockStake.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [
        "_sendSherRewardsToOwner",
        "whenNotPaused",
        "_redeemShares",
        "_burn",
        "_verifyUnlockableByOwner"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function redeemNFT(uint256 _id) external override whenNotPaused returns (uint256 _amount) {\n    // Checks to make sure caller is the owner of the NFT position, and that the lockup period is over\n    _verifyUnlockableByOwner(_id);\n\n    // This is the ERC-721 function to destroy an NFT (with owner's approval)\n    _burn(_id);\n\n    // Transfers USDC to the NFT owner based on the stake shares associated with this NFT ID\n    // Also burns the requisite amount of shares associated with this NFT position\n    // Returns the amount of USDC owed to these shares\n    _amount = _redeemShares(_id, stakeShares[_id], msg.sender);\n\n    // Sends the SHER tokens associated with this NFT ID to the NFT owner\n    _sendSherRewardsToOwner(_id, msg.sender);\n\n    // Removes the unlock deadline associated with this NFT\n    delete lockupEnd_[_id];\n  }"
}