You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
Given the 9mil tx gas limit that exists on L2, we would like to investigate the impact of adding new synths on exchanging costs (in terms of gas). For this reason, we want also to check whether the enabling of DebtCach on L2 alleviates the problem or not.
gberg1
changed the title
Enable DebtCache in L2
Measure gas usage with different synths on L2
Apr 7, 2021
i-stam
changed the title
Measure gas usage with different synths on L2
Measure gas usage on L2 when adding synths - DebtCache Vs RealtimeDebtCache
Apr 8, 2021
So, what can we read from these measurements? I'll list a few that come to my mind immediately. Perhaps we can later validate/falsify them on a discussion:
With realtime debt cache, gas is high, but it doesn't grow that fast.
I can't see a much of a gas improvement with debt caching enabled. Even feels a little worse, which is a bit counterintuitive.
What does increase very quickly is the call to take the snapshot. Why?
Summary:
Given the 9mil tx gas limit that exists on L2, we would like to investigate the impact of adding new synths on exchanging costs (in terms of gas). For this reason, we want also to check whether the enabling of DebtCach on L2 alleviates the problem or not.
Relevant Info
RealtimeDebtCache
OVM instance: https://github.com/Synthetixio/synthetix/tree/multisig-simulation-kova-ovm-testDebtCache
OVM instance: https://github.com/Synthetixio/synthetix/tree/debCache-l2Note: the initial measurements show that DebtCache's `takeDebtSnapshot() is the real bottleneck.
`Dev Tasks:
Realtime Debt Cache
3 synths (sUSD, sETH, sBTC) - no fee reclamation
gas-used: sUSD-sBTC gasUsed: 5,947,547
gas-used: sBTC-sETH gasUsed: 5,028,973
gas-used: sUSD-sETH gasUsed: 4,509,600
4 synths (sUSD, sETH, sBTC, sLINK) - no fee reclamation
gas-used: sUSD-sLINK gasUsed: 5,947,601
gas-used: sUSD-sBTC gasUsed: 4,520,061
gas-used: sLINK-sETH gasUsed: 5,028,967
5 synths (sUSD, sETH, sBTC, sLINK, sUNI) - no fee reclamation
gas-used: sUSD-sUNI gasUsed: 5,947,589
gas-used: sUNI-sBTC gasUsed: 5,039,394
gas-used: sUSD-sUNI gasUsed: 4,509,606
gas-used: sUNI-sLINK gasUsed: 5,039,454
6 synths (sUSD, sETH, sBTC, sLINK, sUNI, sAAVE) - no fee reclamation
gas-used: sBTC-sAAVE gasUsed: 6,466,904
gas-used: sLINK-sAAVE gasUsed: 5,039,446
gas-used: sUSD-sBTC gasUsed: 4,509,624
6 synths (sUSD, sETH, sBTC, sLINK, sUNI, sAAVE) - no fee reclamation
gas-used: sUSD-sRUNE gasUsed: 5,947,575
gas-used: sRUNE-sLINK gasUsed: 5,039,442
13 synths (sUSD, sETH, sBTC, sLINK, sUNI, sAAVE...) - no fee reclamation
gas-used: sBTC-sREN gasUsed: 6,466,904
gas-used: sLINK-sXMR gasUsed: 6,466,962
gas-used: sXMR -sREN gasUsed: 5,039,468
Debt Cache
2 synths (sUSD, sETH) - no fee reclamation
gas-used: sUSD-sETH gasUsed: 6,642,322
gas-used: sUSD-sETH gasUsed: 5,024,044
3 synths (sUSD, sETH, sBTC) - no fee reclamation
gas-used: sUSD-sBTC gasUsed: 6,409,677
gas-used: sUSD-sBTC gasUsed: 4,971,740
gas-used: sBTC-sETH gasUsed: 5,691,923
gas-used: sUSD-sETH gasUsed: 5,024,062
6 synths (sUSD, sETH, sBTC, sLINK) - no fee reclamation
snapshot: gas used: 3,457,216
gas-used: sUSD-sLINK gasUsed: 6,409,753
gas-used: sUSD-sUNI gasUsed: 6,409,699
gas-used: sUNI-sAAVE gasUsed: 7,067,120
gas-used: sBTC-sAAVE gasUsed: 5,650,095
gas-used: sUNI-sAAVE gasUsed: 5,650,089
9 synths (sUSD, sETH, sBTC, sLINK) - no fee reclamation
snapshot: gas used: 4,874,795
gas-used: sLINK-sYFI gasUsed: 7,077,557
gas-used: sYFI-sSUSHI gasUsed: 7,077,563
gas-used: sYFI-sSUSHI gasUsed: 7,077,563
gas-used: sSUSHI-sYFI gasUsed: 5,650,101
12 synths (sUSD, sETH, sBTC, sLINK) - no fee reclamation
snapshot: gas used: 6,153,165
gas-used: sBTC-sBAL gasUsed: 7,077,581
gas-used: sBAL-sDOT gasUsed: 7,077,563
gas-used: sBAL-sDOT gasUsed: 4,982,203
gas-used: sUSD-sBTC gasUsed: 4,982,203
The text was updated successfully, but these errors were encountered: