The time it takes to repay a loan will depend entirely on the conditions set such as how high the return rates are and which type of DeFi protocol Yearn is using for the deposit. In addition, users can set their own repayment schedules. Essentially, it is the borrower who provides their own capital for the loan, which makes them both a liquidity provider (lender) and a borrower at the same time.