I don't know much about this at all so apologies if this is a stupid question, but presumably the owner of that $8m was compensated out of the profit of the deal and the $366k is what is left over for the person who set this deal up.
If so that was a great deal and worked out, but if the deal hadn't worked out for whatever reason, a bug in the code for the bot etc what would the downside be and how would it be enforced?