The junior pool and senior pool in the Assets Pool's structured loan products (Mode 2)

Splitting the USDT Pool into Senior and Junior Pool
To track the different amounts offered by different participants, both senior and junior pool participants receive NFTs when providing capital. The NFT tracks the amount of supply and redemption for that capital. The reason for using NFTs instead of fungible tokens is to allow the protocol to ensure that no one can redeem more than their proportional share in the total repayment amount.
For example, suppose two borrowers each provide $500 for a total loan of $1000, and so far, they have collectively repaid $300. In this case, NFTs would ensure that each borrower could only redeem $150 rather than each person redeeming the entire $300 for themselves.
The senior pool has lower interest rates and interest income but has priority access to funds.
The junior pool has higher interest rates and interest income but faces greater risk of loss.
Senior pool interest rate formula:
Junior pool interest rate formula:
i is the nominal interest rate.
α is the amount of money in the junior pool.
β is the amount of money in the senior pool.
p is the percentage of protocol reserve interest revenue.
j is the percentage of interest that the senior pool distributes to the junior pool.
r is the leverage coefficient that determines the allocation of funds between the senior and junior pools.
t is the duration of the loan.
For example, consider a project pool with an interest rate of 15%, a leverage coefficient of 4, and c equal to 0. If the junior pool provides $200,000, the senior pool needs to redistribute $800,000. Suppose the borrower borrows all $1 million for a year and pays $150,000 in interest. The interest rate for the senior pool is 0.15 (1 - 0.1 - 0.2) = 10.5%, so the total interest is $80,000 * 0.105 = $8,400. The interest rate for the junior pool is 0.15 * (1 - 0.1 + 4 * 0.2) = 25.5%, so the total interest is $200,000 * 0.255 = $51,000. The remaining $15,000 is the 10% protocol reserve.