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```
1111PositionUtils.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```
2929if 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```
4040usage factor = max(reserve usage factor, open interest usage factor)
@@ -43,7 +43,7 @@ max reserve = reserve factor * pool usd
4343open 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```
4949u = 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
0 commit comments