## 5 Proposed Lending Protocol Step-by-Step Process  
In the beginning, the system receives the user's request for a loan, where the user specifies the amount of cryptocurrency he/she wants to lend for a short period. The first step of the proposed system is to keep all of the user's information in the smart wallet, which acts as a repository and a reference for that information. Then, to preserve that information, the XSalsa20 algorithm is applied to encrypt all that information stored in the wallet. To protect it from any tampering, preprepared codes are applied to the requested loan, which means, for example, that it is a condition that the loan be returned with the same block and also that it be returned according to a specific date to guarantee the payer's right. Then comes the role of the crow search algorithm to verify the extent to which the conditions are met to determine whether it is possible to move forward within a single blockchain transaction where the payer funds are transferred to his/ her smart wallet. Specifically, all along the process, XSalsa20 is used to securely encrypt and process the necessary transactions or operations. For a better understanding of the workflow of our proposed protocol, Figure 3 will illustrate the whole process starting from the moment of sending a request from the payee to the moment of obtaining the loan. As shown in the diagram above, the first stage of our proposed system is as follows:  
* Storage or insurance: This is the stage in which all the payee's information is stored in the wallet, from the name to the address and electronic email on the smart wallet, which are encrypted using the XSalsa20 algorithm. * Stage of controlling lending process: This is implemented through preprepared codes that guarantee the rights of both the payee and the payer together. That is, when  
Figure 3: Proposed protocol workflow. the conditions are met, the process is completed, and if the conditions are not met, the process ends. * Finally, our proposed system, when the conditions are met, reaches the final stage, which is the stage of storing on the blockchain. The proposed loan system's full steps are as follows (Figure 4 describes the organizational structure of the proposed system):  
1. Payee Application: * The payee submits a loan request through the proposed system specifying the loan amount, repayment period, and interest. * The loan request is encrypted using XSalsa20 with a secret key shared only between the payee and the payer. * The encrypted loan request is stored securely on the smart wallet for transparency and immutability. * The payee's smart wallet address is verified to ensure they have a valid digital identity and can receive funds. 2. Creditworthiness Assessment: * Xsalsa20 is used to decrypt the loan request using the secret key. * The crow search algorithm analyzes the payee's financial data transaction history, smart wallet balance, and potentially anonymized credit bureau reports. * This decentralized approach facilitates fair credit scoring without relying solely on centralized authorities. * The algorithm outputs a credit score that reflects the payee's ability to repay the loan. 3. Loan Repayment Options: * The loan request (excluding sensitive payee data) is broadcast to a pool of potential payers within the blockchain network. Figure 4: Organizational structure of the proposed system. * Investors can browse available loan requests, assess risk based on the credit score and loan details, and commit funds to the loan through their smart wallets. * The payee selects their preferred repayment method like fixed installments, bullet payment, or early repayment with potential discounts. * Code-Based Condition Execution:
* Once sufficient funds are pledged by payers to meet the loan amount, code-based terms are automatically deployed on the blockchain. * The code-based terms govern the entire loan lifecycle: disbursement, repayment installments, potential penalties for late payments, and interest calculations.