Naught Coin

Transfer all your initial Naught Coins to another address, bypassing the transfer lock.

Vulnerable Code
Analyze the Solidity code below to find the vulnerability.
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/token/ERC20/ERC20.sol'; // Simple ERC20 token with a time lock on transfers for the initial owner contract NaughtCoin is ERC20 { uint public timeLock; address public player; // The initial owner/player // Modifier to lock transfers for the player until timeLock expires modifier lock() { if (msg.sender == player) { require(block.timestamp > timeLock, "Tokens are locked for the player"); } _; // Continue execution } constructor(address _player) ERC20('NaughtCoin', '0g') { player = _player; // Lock tokens for 10 years initially timeLock = block.timestamp + 10 * 365 days; // Mint initial supply to the player _mint(player, 1000000 * (10**18)); } // Override the standard transfer function to add the lock modifier function transfer(address _to, uint256 _amount) public override lock returns (bool) { return super.transfer(_to, _amount); } // Allow approve and transferFrom without the lock modifier // These standard ERC20 functions are inherited and NOT overridden with the lock. }
Submit Explanation
Explain the vulnerability and how to exploit it.
Hints (3)
Just a little peak
Hint 1
Hint 2
Hint 3
Explanation
Discomfort = Learning