How does Yield Farming or Crypto Lending work?

Any investor or trader who wishes to indulge in yield farming has to approach DeFi platforms such as Compound, Aave or Tether. These platforms collect the crypto assets from investors and lend them to borrowers and then pay back the interest on the loan to the investors.

As we read above, the interest earned through lending crypto can either be fixed or variable. These interest rates are decided by the respective platforms, hence they vary from platform to platform. For instance, a platform like Compound rewards its participants - both crypto lender and borrower - with “Comp”, its native crypto token, alongwith the interest.

But, like any governing body, these DeFi platforms also have some set of terms and conditions before a crypto lender or borrower engages in the deal. Like we read about the maintenance margin in Perpetual Futures ,that requires a minimum balance to be maintained in the account; in Yield Farming, a borrower in order to borrow some funds from the platform needs to deposit double the borrowal amount (in the form of collateral) to the platform before he proceeds towards the deal.

The system utilizes the smart contracts functionality to keep a check on the value of the collateral and at any given point of time. If it is less than that of the borrowal amount, it automatically liquidates the borrower account and the interest is immediately paid back to the lender. Thus, in case of failure of repayment of funds by the borrower, the lender is not at loss.