{
    "Function": "_redeemShares",
    "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": [
        "_redeemSharesCalc",
        "_transferTokensOut"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function _redeemShares(\n    uint256 _id,\n    uint256 _stakeShares,\n    address _receiver\n  ) internal returns (uint256 _amount) {\n    // Returns the amount of USDC owed to this amount of stakeShares\n    _amount = _redeemSharesCalc(_stakeShares);\n    // Transfers _amount of tokens to _receiver address\n    if (_amount != 0) _transferTokensOut(_receiver, _amount);\n\n    // Subtracts this amount of stakeShares from the NFT position\n    stakeShares[_id] -= _stakeShares;\n    // Subtracts this amount of stakeShares from the total amount of stakeShares outstanding\n    totalStakeShares -= _stakeShares;\n  }"
}