What does an oracle do?
A smart contract is a program that executes rules on a blockchain. It can read information recorded onchain, but it cannot directly look up an exchange price or FX rate on the internet. An oracle supplies external information to smart contracts. Lending protocols use its prices to value collateral and check whether that value is sufficient to back the debt. Each protocol sets its own liquidation thresholds and rules.How does batt use oracles?
Loans in batt are denominated in KRW*, so batt also needs to value collateral in won. For ETH collateral, the protocol needs the amount deposited, ETH’s dollar price, and the won-dollar exchange rate. batt uses those inputs to calculate the collateral’s value in won. It then compares that value with the debt to calculate the collateral ratio and determine whether the position can be liquidated.Combining the dollar price and exchange rate
For ETH, the relationship is ETH/USD × USD/KRW = ETH/KRW, where USD/KRW means the number of won per dollar. Multiply the resulting price in won by the amount deposited to get the position’s collateral value. The formula describes how to calculate that value; it does not specify a data provider or feed configuration. When valuing wrapped tokens or yield-bearing collateral, account for the conversion rate into the underlying asset and any difference between the token’s market price and its underlying value.A constant ETH price does not mean a constant won value
Consider the value of one ETH:
When the won strengthens, each dollar is worth fewer won, so the collateral is worth less in won. A fall in ETH’s dollar price would reduce that value further. The exchange rate does not increase the number of KRW* tokens you owe.
See Managing your position for collateral-ratio calculations and ways to respond.
