This question already has an answer here:
i'm new to Solidity. After writing my first smart contract im fairly concerned about it's security, once deployed to the MainNet. What are the most important things i should check within my code? Also are there any resources where i can learn about attack patterns?