12

Implementing an Asset Pool Smart Contract for a Crypto Loan

The asset pool smart contract is the most important component of the decentralized crypto loan system we are building in this book. Based on the architecture we discussed in Chapter 11, An Introduction to Crypto Loans, the asset pool smart contract builds on top of asset pool shares, pool configuration, and the price oracle. It maintains the information of all the asset pools for various ERC20 tokens in the crypto loan system, manages the user ledger for recording the loan-related information (e.g., collateral and borrowed assets) for each user, and provides the interfaces for frontend or other off-chain components to interact with the on-chain crypto loan system.

By reading this ...

Get Building Full Stack DeFi Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.