Timestamp Dependency in Smart Contracts: A Common Vulnerability and How to Fix It