```\n   function redeem(bytes32 _termsHash, uint256 tokenAmount) public {\n       if (blocklist.isBlocklisted(msg.sender)) {\n           revert AddressBlocklisted();\n       }\n       if (termsHash != _termsHash) {\n           revert TermsNotCorrect();\n       }\n       if (block.timestamp > endingTimestamp) {\n           revert RedemptionPeriodFinished();\n       }\n\n       token.transferFrom(msg.sender, address(this), tokenAmount);\n       uint256 ethToSend = (tokenAmount * tokenToEthRate) / tokenAmountBase;\n       (bool result, ) = msg.sender.call{value: ethToSend}("");\n       if (!result) {\n           revert FailedToSendEth();\n       }\n\n       emit EthClaimed(msg.sender, tokenAmount, ethToSend);\n\n```\n