Skip to content

Commit d3de75c

Browse files
committed
notes
1 parent 1ab0b43 commit d3de75c

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ forge build
176176
- Execution fee
177177
- UI and transcations
178178
- [Price impact](./notes/price_impact.md)
179-
- UI
180179
- Purpose
181180
- swap
182181
- open position

notes/position/borrowing_fee.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
> How is borrowing fee rate calculated?
77
8-
`MarketUtils.updateCumulativeBorrowingFactor`
8+
[`MarketUtils.updateCumulativeBorrowingFactor`](https://github.com/gmx-io/gmx-synthetics/blob/caf3dd8b51ad9ad27b0a399f668e3016fd2c14df/contracts/market/MarketUtils.sol#L1417-L1440)
99

1010
```
1111
PositionUtils.updateFundingAndBorrowingState
@@ -23,7 +23,7 @@ PositionUtils.updateFundingAndBorrowingState
2323
└ incrementCumulativeBorrowingFactor
2424
```
2525

26-
`MarketUtils.getBorrowingFactorPerSecond`
26+
[`MarketUtils.getBorrowingFactorPerSecond`](https://github.com/gmx-io/gmx-synthetics/blob/caf3dd8b51ad9ad27b0a399f668e3016fd2c14df/contracts/market/MarketUtils.sol#L2368-L2430)
2727

2828
```
2929
if optimal usage factor = 0
@@ -34,7 +34,7 @@ if optimal usage factor = 0
3434
r^e / P * b
3535
```
3636

37-
`MarketUtils.getUsageFactor`
37+
[`MarketUtils.getUsageFactor`](https://github.com/gmx-io/gmx-synthetics/blob/caf3dd8b51ad9ad27b0a399f668e3016fd2c14df/contracts/market/MarketUtils.sol#L498-L518)
3838

3939
```
4040
usage factor = max(reserve usage factor, open interest usage factor)
@@ -43,7 +43,7 @@ max reserve = reserve factor * pool usd
4343
open interest usage factor = open interest / max open interest
4444
```
4545

46-
`MarketUtils.getKinkBorrowingFactor`
46+
[`MarketUtils.getKinkBorrowingFactor`](https://github.com/gmx-io/gmx-synthetics/blob/caf3dd8b51ad9ad27b0a399f668e3016fd2c14df/contracts/market/MarketUtils.sol#L2432-L2471)
4747

4848
```
4949
u = usage factor
@@ -59,11 +59,7 @@ if u > u_o
5959

6060
> How is borrowing fee calculated for trader?
6161
62-
`MarketUtils.getBorrowingFees`
63-
64-
`MarketUtils.getNextBorrowingFees`
65-
66-
`MarketUtils.getTotalPendingBorrowingFees`
62+
[`MarketUtils.getBorrowingFees`](https://github.com/gmx-io/gmx-synthetics/blob/caf3dd8b51ad9ad27b0a399f668e3016fd2c14df/contracts/market/MarketUtils.sol#L1708-L1715)
6763

6864
> How is borrowing fee updated for trader?
6965

notes/position/position_fees.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Fees
22

3-
`PositionPricingUtils.getPositionFees`
3+
[`PositionPricingUtils.getPositionFees`](https://github.com/gmx-io/gmx-synthetics/blob/caf3dd8b51ad9ad27b0a399f668e3016fd2c14df/contracts/pricing/PositionPricingUtils.sol#L316-L397)
44

55
- Execution fee
66
- Borrowing fee

0 commit comments

Comments
 (0)