Security and efficiency of collateral in decentralized finance