On Collateral Valuation and Design in Decentralized Financial Applications