Smart contract are an attractive target for hackers because vast amounts of money are transacted through them. Even small mistakes in the code can lead to huge amounts of money being stolen.