Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ runs = 1000
seed = "0x640"

[profile.pr.fuzz]
runs = 5000
runs = 5

[profile.ci.fuzz]
runs = 10000
runs = 5

[profile.gas]
gas_snapshot_check = true
Expand Down
24 changes: 12 additions & 12 deletions snapshots/Hub.Operations.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i kinda don't agree w the premise of the pr, it was discussed before as well and the existing tests found a balance to the average user experience

this makes it for the unlikely worst case, ie only the first user in a block will experience this, every other user won't. for debugging & analysis i 100% agree this is the way to go but not sure overall about the goal. wdyt

Copy link
Contributor

@CheyenneAtapour CheyenneAtapour Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't the average user experience involve an accrue within each action? I think it's less likely that a user would interact at the same block as another, but perhaps not?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

depends on what we deem as the "canonical" user experience. Was discussing with Cheyenne, I feel like the user action with accrual included is that. It's kind of a ceiling vs floor gas cost.

but when we're looking at mintFeeShares, we can't evaluate it properly unless it includes an accrual action. At the moment it's simply not consistent in any way. I don't think it's a balance for avg UX, it's just kind of haphazard imo atm

Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"add": "86703",
"add: with transfer": "108000",
"draw": "104159",
"eliminateDeficit: full": "72578",
"eliminateDeficit: partial": "82183",
"mintFeeShares": "82752",
"add": "76632",
"add: with transfer": "115029",
"draw": "90788",
"eliminateDeficit: full": "82407",
"eliminateDeficit: partial": "92012",
"mintFeeShares": "85552",
"payFee": "70816",
"refreshPremium": "70373",
"remove: full": "75607",
"remove: partial": "80745",
"reportDeficit": "111893",
"restore: full": "76563",
"restore: full - with transfer": "169172",
"refreshPremium": "79436",
"remove: full": "87774",
"remove: partial": "87774",
"reportDeficit": "117639",
"restore: full": "76671",
"restore: full - with transfer": "169280",
"restore: partial": "85273",
"restore: partial - with transfer": "143253",
"transferShares": "69630"
Expand Down
12 changes: 6 additions & 6 deletions snapshots/NativeTokenGateway.Operations.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"borrowNative": "228612",
"repayNative": "166405",
"supplyAsCollateralNative": "160067",
"supplyNative": "135727",
"withdrawNative: full": "125540",
"withdrawNative: partial": "136724"
"borrowNative": "232193",
"repayNative": "170450",
"supplyAsCollateralNative": "164529",
"supplyNative": "139296",
"withdrawNative: full": "129261",
"withdrawNative: partial": "141376"
}
14 changes: 7 additions & 7 deletions snapshots/SignatureGateway.Operations.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"borrowWithSig": "213845",
"repayWithSig": "186677",
"borrowWithSig": "217248",
"repayWithSig": "190710",
"setSelfAsUserPositionManagerWithSig": "75385",
"setUsingAsCollateralWithSig": "85365",
"supplyWithSig": "151959",
"updateUserDynamicConfigWithSig": "63098",
"updateUserRiskPremiumWithSig": "62068",
"withdrawWithSig": "130794"
"setUsingAsCollateralWithSig": "58546",
"supplyWithSig": "157582",
"updateUserDynamicConfigWithSig": "101569",
"updateUserRiskPremiumWithSig": "100406",
"withdrawWithSig": "178777"
}
6 changes: 3 additions & 3 deletions snapshots/Spoke.Getters.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"getUserAccountData: supplies: 0, borrows: 0": "12992",
"getUserAccountData: supplies: 1, borrows: 0": "49404",
"getUserAccountData: supplies: 2, borrows: 0": "81080",
"getUserAccountData: supplies: 1, borrows: 0": "49594",
"getUserAccountData: supplies: 2, borrows: 0": "81460",
"getUserAccountData: supplies: 2, borrows: 1": "101509",
"getUserAccountData: supplies: 2, borrows: 2": "120769"
"getUserAccountData: supplies: 2, borrows: 2": "125803"
}
34 changes: 17 additions & 17 deletions snapshots/Spoke.Operations.ZeroRiskPremium.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"borrow: first": "190362",
"borrow: first": "190552",
"borrow: second action, same reserve": "170228",
"liquidationCall (receiveShares): full": "303239",
"liquidationCall (receiveShares): partial": "302657",
"liquidationCall (reportDeficit): full": "366361",
"liquidationCall (receiveShares): full": "286139",
"liquidationCall (receiveShares): partial": "285557",
"liquidationCall (reportDeficit): full": "371999",
"liquidationCall: full": "320875",
"liquidationCall: partial": "320293",
"permitReserve + repay (multicall)": "164532",
"permitReserve + supply (multicall)": "146712",
"permitReserve + supply + enable collateral (multicall)": "161141",
"repay: full": "123892",
"repay: partial": "128850",
"setUserPositionManagersWithSig: disable": "47039",
"permitReserve + repay (multicall)": "173520",
"permitReserve + supply (multicall)": "153741",
"permitReserve + supply + enable collateral (multicall)": "168182",
"repay: full": "133248",
"repay: partial": "132568",
"setUserPositionManagersWithSig: disable": "47051",
"setUserPositionManagersWithSig: enable": "68951",
"supply + enable collateral (multicall)": "141343",
"supply: 0 borrows, collateral disabled": "122824",
"supply: 0 borrows, collateral enabled": "105795",
"supply: second action, same reserve": "105724",
"supply + enable collateral (multicall)": "131272",
"supply: 0 borrows, collateral disabled": "127286",
"supply: 0 borrows, collateral enabled": "112824",
"supply: second action, same reserve": "110186",
"updateUserDynamicConfig: 1 collateral": "74523",
"updateUserDynamicConfig: 2 collaterals": "89391",
"updateUserRiskPremium: 1 borrow": "95712",
Expand All @@ -27,8 +27,8 @@
"usingAsCollateral: 2 borrows, disable": "127305",
"usingAsCollateral: 2 borrows, enable": "42494",
"withdraw: 0 borrows, full": "127955",
"withdraw: 0 borrows, partial": "132851",
"withdraw: 0 borrows, partial": "137503",
"withdraw: 1 borrow, partial": "159982",
"withdraw: 2 borrows, partial": "174540",
"withdraw: non collateral": "105902"
"withdraw: 2 borrows, partial": "181519",
"withdraw: non collateral": "111212"
}
34 changes: 17 additions & 17 deletions snapshots/Spoke.Operations.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"borrow: first": "259297",
"borrow: first": "259487",
"borrow: second action, same reserve": "202163",
"liquidationCall (receiveShares): full": "335283",
"liquidationCall (receiveShares): partial": "334701",
"liquidationCall (reportDeficit): full": "360978",
"liquidationCall (receiveShares): full": "318183",
"liquidationCall (receiveShares): partial": "317601",
"liquidationCall (reportDeficit): full": "376216",
"liquidationCall: full": "352919",
"liquidationCall: partial": "352337",
"permitReserve + repay (multicall)": "162009",
"permitReserve + supply (multicall)": "146712",
"permitReserve + supply + enable collateral (multicall)": "161141",
"repay: full": "117971",
"repay: partial": "137329",
"setUserPositionManagersWithSig: disable": "47039",
"permitReserve + repay (multicall)": "181999",
"permitReserve + supply (multicall)": "153741",
"permitReserve + supply + enable collateral (multicall)": "168182",
"repay: full": "136927",
"repay: partial": "141047",
"setUserPositionManagersWithSig: disable": "47051",
"setUserPositionManagersWithSig: enable": "68951",
"supply + enable collateral (multicall)": "141343",
"supply: 0 borrows, collateral disabled": "122824",
"supply: 0 borrows, collateral enabled": "105795",
"supply: second action, same reserve": "105724",
"supply + enable collateral (multicall)": "131272",
"supply: 0 borrows, collateral disabled": "127286",
"supply: 0 borrows, collateral enabled": "112824",
"supply: second action, same reserve": "110186",
"updateUserDynamicConfig: 1 collateral": "74523",
"updateUserDynamicConfig: 2 collaterals": "89391",
"updateUserRiskPremium: 1 borrow": "149071",
Expand All @@ -27,8 +27,8 @@
"usingAsCollateral: 2 borrows, disable": "229242",
"usingAsCollateral: 2 borrows, enable": "42494",
"withdraw: 0 borrows, full": "127955",
"withdraw: 0 borrows, partial": "132851",
"withdraw: 0 borrows, partial": "137503",
"withdraw: 1 borrow, partial": "210836",
"withdraw: 2 borrows, partial": "257012",
"withdraw: non collateral": "105902"
"withdraw: 2 borrows, partial": "280954",
"withdraw: non collateral": "111212"
}
Loading
Loading