Interest rates for both borrowing and lending are calculated based on a single dynamic variable reflecting the current supply and demand for each liquidity pool on the market. When liquidity is low, interest rates increase algorithmically to incentivize lenders to inject more liquidity into the pool. When liquidity is high, interest rates are reduced algorithmically to provide attractive and competitive rates to borrowers.