dappsdirectory contains all the meta data we need to connect to our multiple DeFi applications. In here, we will find:
interfacescontains all the different functions available for a respective DeFi application. Some applications, like Aave, contain 4 different interfaces.
DappMods.solis a contract that contains modifiers required to transact certain functions in the Facet files
<dapp-name>Facet.solare the multiple Facet contracts that call their respective dapp interface functions and store the updated storage inside the Escrow libraries
ILoansEscrowalong with it's implemented contracts.
LibEscrow.sollibrary contains functions that help us interact with our respective escrow. It does the following:
tokenUpdated()either adds or removes escrow tokens from a loan escrow depending whether the
tokenAddressis contained in the list of
claimTokens()that allows the user, as long as they are the borrower and the loan status is closed, to safely transfer all the escrow tokens from the loan escrow to the user's wallet.