1. Trader sells a futures
1. Trader closes a long position
2. Protocol gets the principal and the interest from lending the quote currency
2. Protocol gets the principal and interest from lending the base currency
3. Protocol swaps the quote currency for the base currency on the spot market
3. Protocol swaps the base currency for the quote currency on the spot market
4. Protocol gives back the borrowed funds including the accrued interest
4. Protocol gives back the borrowed funds including the accrued interest