Offense and Defense in Smart Contracts