Skip to content

Commit dfd5839

Browse files
committed
no mdx for now vscode
1 parent e61636c commit dfd5839

File tree

3 files changed

+29
-12
lines changed

3 files changed

+29
-12
lines changed

.vscode/settings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"typescript.tsdk": ".yarn/sdks/typescript/lib",
33
"eslint.useFlatConfig": true,
4-
"files.associations": {
5-
"*.md": "mdx"
6-
},
4+
// "files.associations": {
5+
// "*.md": "mdx"
6+
// },
77
"eslint.options": {
88
"cache": true
99
},

content/posts/2020-12-20-understanding-compound-protocols-interest-rates.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,15 @@ $$\text{Borrow Interest Rate} = \text{Multiplier} * \text{Utilization Rate} + \t
6363
### Example: WBTC rates
6464

6565
<figure>
66-
<a href="https://compound.finance/markets/WBTC">
67-
<NextImage src="https://static.ian.pw/images/2020-12-20-wbtc-rate-model.png" width="512" height="467" alt="The WBTC rate model." />
68-
</a>
69-
<figcaption>The WBTC rate model.</figcaption>
66+
<a href="https://compound.finance/markets/WBTC">
67+
<NextImage
68+
src="https://static.ian.pw/images/2020-12-20-wbtc-rate-model.png"
69+
width="512"
70+
height="467"
71+
alt="The WBTC rate model."
72+
/>
73+
</a>
74+
<figcaption>The WBTC rate model.</figcaption>
7075
</figure>
7176

7277
Let's say the protocol has 10,000 <TokenIcon token="WBTC" /> supplied to it and users are borrowing 1,000 WBTC. The utilization rate is thus 10%. What should the rates be?
@@ -130,10 +135,15 @@ $$
130135
### Example: USDC rate model
131136

132137
<figure>
133-
<a href="https://compound.finance/markets/USDC">
134-
<NextImage src="https://static.ian.pw/images/2020-12-20-usdc-rate-model.png" width="512" height="467" alt="The WBTC rate model." />
135-
</a>
136-
<figcaption>The USDC rate model is a jump rate model.</figcaption>
138+
<a href="https://compound.finance/markets/USDC">
139+
<NextImage
140+
src="https://static.ian.pw/images/2020-12-20-usdc-rate-model.png"
141+
width="512"
142+
height="467"
143+
alt="The WBTC rate model."
144+
/>
145+
</a>
146+
<figcaption>The USDC rate model is a jump rate model.</figcaption>
137147
</figure>
138148

139149
The USDC rate model is a jump rate model with the following parameters:
@@ -196,6 +206,9 @@ Compound is a very powerful building block of the Ethereum DeFi ecosystem. Under
196206
If you enjoyed this post and/or would like to hear more, please leave a comment below!
197207

198208
[^1]: Source: [Compound whitepaper](https://compound.finance)
209+
199210
[^2]: According to [proposal 31](https://compound.finance/governance/proposals/31), the Reserve Factor is a percentage of the borrowers paid interest which can be used by the governance or act as an insurance against borrower default which protects all the suppliers.
211+
200212
[^3]: Technically, this system is not immune to insider trading. A member of governance can trade before voting. Also since COMP can be borrowed on Compound, one can stake a lot of ETH, borrow COMP, place a large vote, then repay all of the COMP.
213+
201214
[^4]: At the time of writing Ethereum has been producing ~13 second blocks, so all annualized rates in Compound should be multiplied by approximately 15/13. Although [this number is hardcoded into the smart contract](https://etherscan.io/address/0xbae04cbf96391086dc643e842b517734e214d698#code), the rate model may be updated in the future via governance.

tsconfig.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,9 @@
2727
".eslintrc.cjs",
2828
"*.cjs"
2929
],
30-
"exclude": ["node_modules"]
30+
"exclude": ["node_modules"],
31+
"mdx": {
32+
// Enable strict type checking in MDX files.
33+
"checkMdx": true
34+
}
3135
}

0 commit comments

Comments
 (0)