Loan Collateral

When a new loan is submitted, an array of collateral can be specified such that when the loan is accepted, those collateral assets are transferred from the borrower's wallet into the collateral escrow contract. Upon finalization of the loan, the collateral can be withdrawn. Once the loan is fully repaid, the borrower is able to withdraw the assets. If the loan is terminated in default, the lender is able to withdraw the assets. If the loan is liquidated, the liquidator is able to withdraw the assets.

struct Collateral {
    CollateralType _collateralType;
    uint256 _amount;
    uint256 _tokenId;
    address _collateralAddress;
}

There are three different types of interfaces used for collateral assets: ERC20, ERC721, and ERC1155. Other types of collateral are not supported at this time.

enum CollateralType {
    ERC20,
    ERC721,
    ERC1155
}

Last updated