Skip to content

Commit 483069c

Browse files
authored
fix typo 2
1 parent ef432e8 commit 483069c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyth-sdk/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ println!("The valuation price for the collateral given {} tokens deposited is ({
106106
deposits, price_collateral.price, price_collateral.conf, price_collateral.expo);
107107
```
108108

109-
Here, `deposits` indicates the total amount of collateral deposited. `get_collateral_valuation_price` takes in the total deposits in the protocol and interpolates between (`0`, `rate_discount_inital`) and (`deposits_endpoint`, `rate_discount_final`) to linearly caclulate the discount at `deposits`. As a note, this function scales down the price depending on the provided discount and deposit inputs, but it does not alter the confidence.
109+
Here, `deposits` indicates the total amount of collateral deposited. `get_collateral_valuation_price` takes in the total deposits in the protocol and interpolates between (`0`, `rate_discount_inital`) and (`deposits_endpoint`, `rate_discount_final`) to linearly caclulate the discount at `deposits`. As a note, this function scales the price depending on the provided discount and deposit inputs, but it does not alter the confidence.
110110

111111
To adjust the price at which a borrow position is valued, a protocol can similarly combine the current Pyth price and their estimate of liquidity:
112112

@@ -123,7 +123,7 @@ let price_borrow: Price = btc_usd.get_borrow_valuation_price(
123123
borrows_endpoint,
124124
rate_premium_initial,
125125
rate_premium_final,
126-
discount_exponent).ok_or(StdError::not_found("Issue with querying borrow price"))?;
126+
premium_exponent).ok_or(StdError::not_found("Issue with querying borrow price"))?;
127127
println!("The valuation price for the borrow given {} tokens borrowed is ({} +- {}) x 10^{} USD",
128128
borrows, price_borrow.price, price_borrow.conf, price_borrow.expo);
129129
```

0 commit comments

Comments
 (0)