This function is called when the user wishes to swap his current interest mode to the other:
stable -> variable
or vice versa
Users can only have a debt position in either stable or variable. Cannot have both stable and variable debt for the same asset.
Execution flow
Visual Aid
We will breakdown and examine the unique sections of logics within swapBorrowRateMode. Code delineated in orange are common functions and can be explored in that .