Before borrowing you need to get a Uniswap V3 position in Uniswap. After this, simply head to the "Borrow" section and click on “Borrow” for the asset you want to borrow and confirm your transaction.
The maximum amount you can borrow depends on the value of your UNI-V3 position. In most cases, you can borrow up to 50% of the value of your UNI-V3 position.
Users must borrow the asset to complete collateralization. The Oracle quote price will be obtained before being collateralized by using the Uniswap V3 position as collateral to borrow USDC.
You repay your loan on the same asset you borrowed. For example, if you borrow 1 ETH you will pay back 1 ETH + interest accrued.
The interest rate you pay for borrowing assets depends on the borrowing rate. This is derived from the supply and demand ratio of the asset. Moreover, the interest rate changes constantly. You can find your current borrowing rate at any time in the ‘Borrowings’ section of your dashboard.
The outstanding principal and interest value/collateral value = liquidation factor.
You can pay back your loan any time prior to liquidation.
Simply go to the “Borrow” section and click on “Repayment” for the loan you want to pay back and confirm your transaction.
There’s actually quite a big range in possible interest rates when using Themis.
That’s because the rates are determined by the utilization rate of the lending supply, which can change over time.
Initially, interest rates can be anywhere from 0% to 21.5% on launch.
Yes, we do get the value through TWAP oracle. In the latest version, we use uniswap V3's TWAP quotation. Time weighting can target price attacks to a certain extent, but more importantly, we have adopted a whitelist mechanism for addresses that directly call LendingPool. That is to say, Themis allows lightning loans to be made by protocols in the whitelist, thereby realizing Lending Pools Protocol-to-Protocol, and because of this setting, ordinary addresses cannot directly bypass the front-end to activate lightning loans. If there is a price break, we will also have a correction time of about 30 minutes. During this time, users will be allowed to adjust the risk through prepayment or Increase position. This prevents attackers from maliciously liquidating the borrower's assets.
When adding liquidity to a Uniswap v3 pool, you must provide two assets in a particular ratio. In many cases, your contract or the user's wallet hold a different ratio of those two assets. In order to deposit 100% of your assets, you must first swap your assets to the optimal ratio and then add liquidity. However, the swap may shift the balance of the pool and thus change the optimal ratio!
reference: https://docs.uniswap.org/sdk/guides/liquidity/swap-and-add