Decentralized finance protocol Onyx suffered a security exploit, leading to a loss of more than $2.1 million.