Skip to content

Commit 9b1a8f7

Browse files
authored
feat: Increase precision on premium debt calculation (#991)
1 parent a8c2183 commit 9b1a8f7

File tree

62 files changed

+2011
-1452
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2011
-1452
lines changed

snapshots/Hub.Operations.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"add": "87780",
3-
"add: with transfer": "109387",
4-
"draw": "120583",
5-
"eliminateDeficit: full": "59756",
6-
"eliminateDeficit: partial": "69332",
7-
"mintFeeShares": "82871",
8-
"payFee": "69032",
9-
"refreshPremium": "70045",
10-
"remove: full": "76661",
11-
"remove: partial": "81308",
12-
"reportDeficit": "112658",
13-
"restore: full": "77677",
14-
"restore: full - with transfer": "145615",
15-
"restore: partial": "86307",
16-
"restore: partial - with transfer": "135940",
17-
"transferShares": "67922"
2+
"add": "90212",
3+
"add: with transfer": "111854",
4+
"draw": "107733",
5+
"eliminateDeficit: full": "62124",
6+
"eliminateDeficit: partial": "71772",
7+
"mintFeeShares": "86229",
8+
"payFee": "74134",
9+
"refreshPremium": "77580",
10+
"remove: full": "79093",
11+
"remove: partial": "83740",
12+
"reportDeficit": "121107",
13+
"restore: full": "86184",
14+
"restore: full - with transfer": "197201",
15+
"restore: partial": "94550",
16+
"restore: partial - with transfer": "144241",
17+
"transferShares": "73024"
1818
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"borrowNative": "227033",
3-
"repayNative": "241539",
4-
"supplyAsCollateralNative": "185530",
5-
"supplyNative": "138374",
6-
"withdrawNative: full": "125806",
7-
"withdrawNative: partial": "137057"
2+
"borrowNative": "239122",
3+
"repayNative": "256387",
4+
"supplyAsCollateralNative": "188099",
5+
"supplyNative": "140267",
6+
"withdrawNative: full": "127900",
7+
"withdrawNative: partial": "139675"
88
}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"borrowWithSig": "215229",
3-
"repayWithSig": "242544",
4-
"setSelfAsUserPositionManagerWithSig": "75532",
5-
"setUsingAsCollateralWithSig": "124426",
6-
"supplyWithSig": "154957",
7-
"updateUserDynamicConfigWithSig": "62593",
8-
"updateUserRiskPremiumWithSig": "61448",
9-
"withdrawWithSig": "131824"
2+
"borrowWithSig": "223225",
3+
"repayWithSig": "253300",
4+
"setSelfAsUserPositionManagerWithSig": "75419",
5+
"setUsingAsCollateralWithSig": "126526",
6+
"supplyWithSig": "156758",
7+
"updateUserDynamicConfigWithSig": "62556",
8+
"updateUserRiskPremiumWithSig": "61300",
9+
"withdrawWithSig": "133827"
1010
}

snapshots/Spoke.Getters.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"getUserAccountData: supplies: 0, borrows: 0": "11703",
3-
"getUserAccountData: supplies: 1, borrows: 0": "48459",
4-
"getUserAccountData: supplies: 2, borrows: 0": "79943",
5-
"getUserAccountData: supplies: 2, borrows: 1": "100216",
6-
"getUserAccountData: supplies: 2, borrows: 2": "118440"
3+
"getUserAccountData: supplies: 1, borrows: 0": "50690",
4+
"getUserAccountData: supplies: 2, borrows: 0": "84405",
5+
"getUserAccountData: supplies: 2, borrows: 1": "106828",
6+
"getUserAccountData: supplies: 2, borrows: 2": "127202"
77
}
Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
{
2-
"borrow: first": "187965",
3-
"borrow: second action, same reserve": "167937",
4-
"liquidationCall (receiveShares): full": "296675",
5-
"liquidationCall (receiveShares): partial": "294997",
6-
"liquidationCall: full": "303982",
7-
"liquidationCall: partial": "302304",
8-
"permitReserve + repay (multicall)": "196062",
9-
"permitReserve + supply (multicall)": "173510",
10-
"permitReserve + supply + enable collateral (multicall)": "216824",
11-
"repay: full": "156215",
12-
"repay: partial": "179823",
13-
"setUserPositionManagerWithSig: disable": "44936",
14-
"setUserPositionManagerWithSig: enable": "68965",
15-
"supply + enable collateral (multicall)": "165414",
16-
"supply: 0 borrows, collateral disabled": "125753",
17-
"supply: 0 borrows, collateral enabled": "133337",
18-
"supply: second action, same reserve": "108653",
19-
"updateUserDynamicConfig: 1 collateral": "73418",
20-
"updateUserDynamicConfig: 2 collaterals": "87911",
21-
"updateUserRiskPremium: 1 borrow": "94771",
22-
"updateUserRiskPremium: 2 borrows": "103299",
23-
"usingAsCollateral: 0 borrows, enable": "78218",
24-
"usingAsCollateral: 1 borrow, disable": "104988",
25-
"usingAsCollateral: 1 borrow, enable": "118383",
26-
"usingAsCollateral: 2 borrows, disable": "125753",
27-
"usingAsCollateral: 2 borrows, enable": "139148",
28-
"withdraw: 0 borrows, full": "128425",
29-
"withdraw: 0 borrows, partial": "133100",
30-
"withdraw: 1 borrow, partial": "160749",
31-
"withdraw: 2 borrows, partial": "173721",
32-
"withdraw: non collateral": "106335"
2+
"borrow: first": "199508",
3+
"borrow: second action, same reserve": "179480",
4+
"liquidationCall (receiveShares): full": "312356",
5+
"liquidationCall (receiveShares): partial": "310678",
6+
"liquidationCall: full": "319821",
7+
"liquidationCall: partial": "318143",
8+
"permitReserve + repay (multicall)": "213858",
9+
"permitReserve + supply (multicall)": "176151",
10+
"permitReserve + supply + enable collateral (multicall)": "221668",
11+
"repay: full": "173989",
12+
"repay: partial": "192947",
13+
"setUserPositionManagerWithSig: disable": "44869",
14+
"setUserPositionManagerWithSig: enable": "68898",
15+
"supply + enable collateral (multicall)": "168027",
16+
"supply: 0 borrows, collateral disabled": "128141",
17+
"supply: 0 borrows, collateral enabled": "135956",
18+
"supply: second action, same reserve": "111041",
19+
"updateUserDynamicConfig: 1 collateral": "73462",
20+
"updateUserDynamicConfig: 2 collaterals": "87955",
21+
"updateUserRiskPremium: 1 borrow": "99097",
22+
"updateUserRiskPremium: 2 borrows": "110710",
23+
"usingAsCollateral: 0 borrows, enable": "78190",
24+
"usingAsCollateral: 1 borrow, disable": "109359",
25+
"usingAsCollateral: 1 borrow, enable": "122748",
26+
"usingAsCollateral: 2 borrows, disable": "132286",
27+
"usingAsCollateral: 2 borrows, enable": "145675",
28+
"withdraw: 0 borrows, full": "131065",
29+
"withdraw: 0 borrows, partial": "135971",
30+
"withdraw: 1 borrow, partial": "165782",
31+
"withdraw: 2 borrows, partial": "180904",
32+
"withdraw: non collateral": "108975"
3333
}

snapshots/Spoke.Operations.json

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
{
2-
"borrow: first": "257928",
3-
"borrow: second action, same reserve": "200900",
4-
"liquidationCall (receiveShares): full": "329858",
5-
"liquidationCall (receiveShares): partial": "316700",
6-
"liquidationCall: full": "337165",
7-
"liquidationCall: partial": "324007",
8-
"permitReserve + repay (multicall)": "195503",
9-
"permitReserve + supply (multicall)": "173510",
10-
"permitReserve + supply + enable collateral (multicall)": "216824",
11-
"repay: full": "155656",
12-
"repay: partial": "212993",
13-
"setUserPositionManagerWithSig: disable": "44936",
14-
"setUserPositionManagerWithSig: enable": "68965",
15-
"supply + enable collateral (multicall)": "165414",
16-
"supply: 0 borrows, collateral disabled": "125753",
17-
"supply: 0 borrows, collateral enabled": "133337",
18-
"supply: second action, same reserve": "108653",
19-
"updateUserDynamicConfig: 1 collateral": "73418",
20-
"updateUserDynamicConfig: 2 collaterals": "87911",
21-
"updateUserRiskPremium: 1 borrow": "161533",
22-
"updateUserRiskPremium: 2 borrows": "226006",
23-
"usingAsCollateral: 0 borrows, enable": "78218",
24-
"usingAsCollateral: 1 borrow, disable": "155925",
25-
"usingAsCollateral: 1 borrow, enable": "185145",
26-
"usingAsCollateral: 2 borrows, disable": "222810",
27-
"usingAsCollateral: 2 borrows, enable": "267855",
28-
"withdraw: 0 borrows, full": "128425",
29-
"withdraw: 0 borrows, partial": "133100",
30-
"withdraw: 1 borrow, partial": "225008",
31-
"withdraw: 2 borrows, partial": "262403",
32-
"withdraw: non collateral": "106335"
2+
"borrow: first": "270962",
3+
"borrow: second action, same reserve": "239434",
4+
"liquidationCall (receiveShares): full": "347138",
5+
"liquidationCall (receiveShares): partial": "329180",
6+
"liquidationCall: full": "354603",
7+
"liquidationCall: partial": "336645",
8+
"permitReserve + repay (multicall)": "208608",
9+
"permitReserve + supply (multicall)": "176151",
10+
"permitReserve + supply + enable collateral (multicall)": "221668",
11+
"repay: full": "168739",
12+
"repay: partial": "227713",
13+
"setUserPositionManagerWithSig: disable": "44869",
14+
"setUserPositionManagerWithSig: enable": "68898",
15+
"supply + enable collateral (multicall)": "168027",
16+
"supply: 0 borrows, collateral disabled": "128141",
17+
"supply: 0 borrows, collateral enabled": "135956",
18+
"supply: second action, same reserve": "111041",
19+
"updateUserDynamicConfig: 1 collateral": "73462",
20+
"updateUserDynamicConfig: 2 collaterals": "87955",
21+
"updateUserRiskPremium: 1 borrow": "228385",
22+
"updateUserRiskPremium: 2 borrows": "303165",
23+
"usingAsCollateral: 0 borrows, enable": "78190",
24+
"usingAsCollateral: 1 borrow, disable": "159375",
25+
"usingAsCollateral: 1 borrow, enable": "252036",
26+
"usingAsCollateral: 2 borrows, disable": "227497",
27+
"usingAsCollateral: 2 borrows, enable": "348131",
28+
"withdraw: 0 borrows, full": "131065",
29+
"withdraw: 0 borrows, partial": "135971",
30+
"withdraw: 1 borrow, partial": "292567",
31+
"withdraw: 2 borrows, partial": "276153",
32+
"withdraw: non collateral": "108975"
3333
}

0 commit comments

Comments
 (0)