It was a single huge function, called from cron every 5 minutes. No locking to prevent concurrent runs if it took longer than five minutes to execute. No exception handling. One giant nearly incomprehensible everything-function. Global variables. Bugs everywhere.
Easily hundreds of thousands of dollars of net profit per hour (some hours).
Since then I never worry much about code quality in my prototypes. Build one to throw away.