Closed jalextowle closed 2 weeks ago
Totals | |
---|---|
Change from base Build 9523138246: | 0.0% |
Covered Lines: | 1965 |
Relevant Lines: | 2133 |
Totals | |
---|---|
Change from base Build 9523138246: | 0.0% |
Covered Lines: | 1965 |
Relevant Lines: | 2133 |
Benchmark suite | Current: 1bccaa4770ef8b93f7768ff5f9fc048bf1f264af | Previous: e5525e96fea5bc61e0eec7fe694049aa6722aa1c | Deviation | Status |
---|---|---|---|---|
addLiquidity: min |
33937 gas |
33937 gas |
0% |
š° |
addLiquidity: avg |
155520 gas |
155877 gas |
-0.2290% |
ā |
addLiquidity: max |
429244 gas |
429437 gas |
-0.0449% |
ā |
checkpoint: min |
40316 gas |
40316 gas |
0% |
š° |
checkpoint: avg |
144722 gas |
144636 gas |
0.0595% |
šØ |
checkpoint: max |
255931 gas |
255830 gas |
0.0395% |
šØ |
closeLong: min |
31361 gas |
31361 gas |
0% |
š° |
closeLong: avg |
135883 gas |
136439 gas |
-0.4075% |
ā |
closeLong: max |
2539376 gas |
2621435 gas |
-3.1303% |
ā |
closeShort: min |
31327 gas |
31327 gas |
0% |
š° |
closeShort: avg |
131252 gas |
132305 gas |
-0.7959% |
ā |
closeShort: max |
400884 gas |
272530 gas |
47.0972% |
šØ |
initialize: min |
31349 gas |
31349 gas |
0% |
š° |
initialize: avg |
333397 gas |
333352 gas |
0.0135% |
šØ |
initialize: max |
400023 gas |
399922 gas |
0.0253% |
šØ |
openLong: min |
33370 gas |
33370 gas |
0% |
š° |
openLong: avg |
173247 gas |
174248 gas |
-0.5745% |
ā |
openLong: max |
334107 gas |
335241 gas |
-0.3383% |
ā |
openShort: min |
33936 gas |
33936 gas |
0% |
š° |
openShort: avg |
168353 gas |
168925 gas |
-0.3386% |
ā |
openShort: max |
415244 gas |
415870 gas |
-0.1505% |
ā |
redeemWithdrawalShares: min |
31251 gas |
31251 gas |
0% |
š° |
redeemWithdrawalShares: avg |
75026 gas |
75830 gas |
-1.0603% |
ā |
redeemWithdrawalShares: max |
305734 gas |
305633 gas |
0.0330% |
šØ |
removeLiquidity: min |
31301 gas |
31301 gas |
0% |
š° |
removeLiquidity: avg |
214867 gas |
214933 gas |
-0.0307% |
ā |
removeLiquidity: max |
403825 gas |
404194 gas |
-0.0913% |
ā |
This comment was automatically generated by workflow using github-action-benchmark.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Totals | |
---|---|
Change from base Build 9523138246: | 0.07% |
Covered Lines: | 1971 |
Relevant Lines: | 2138 |
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Totals | |
---|---|
Change from base Build 9523138246: | 0.07% |
Covered Lines: | 1971 |
Relevant Lines: | 2138 |
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Totals | |
---|---|
Change from base Build 9523138246: | 0.07% |
Covered Lines: | 1971 |
Relevant Lines: | 2138 |
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Totals | |
---|---|
Change from base Build 9523138246: | 0.07% |
Covered Lines: | 1971 |
Relevant Lines: | 2138 |
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Totals | |
---|---|
Change from base Build 9523138246: | 0.07% |
Covered Lines: | 1971 |
Relevant Lines: | 2138 |
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Totals | |
---|---|
Change from base Build 9523138246: | 0.07% |
Covered Lines: | 1971 |
Relevant Lines: | 2138 |
Totals | |
---|---|
Change from base Build 9523138246: | 0.07% |
Covered Lines: | 1971 |
Relevant Lines: | 2138 |
Totals | |
---|---|
Change from base Build 9556880128: | 0.07% |
Covered Lines: | 1971 |
Relevant Lines: | 2138 |
Totals | |
---|---|
Change from base Build 9556880128: | 0.02% |
Covered Lines: | 1969 |
Relevant Lines: | 2137 |
Resolved Issues
Fixes: https://github.com/spearbit-audits/delv-week-review/issues/13
Description
This PR adds some tests to make sure that the weighted spot price behaves as expected with instantaneous trades and fixes an oversight where the current weighted spot price is used for the
addLiquidity
check instead of the previous weighted spot price.The previous weighted spot price will never be
0
inaddLiquidity
because the current checkpoint is always minted with_applyCheckpoint
. In_applyCheckpoint
, we always update the previous weighted spot price. This uses the current spot price for the update, so unless the current spot price is0
, the weighted spot price will be non-zero. Some tests were added to clarify this.Review Checklists
Please check each item before approving the pull request. While going through the checklist, it is recommended to leave comments on items that are referenced in the checklist to make sure that they are reviewed. If there are multiple reviewers, copy the checklists into sections titled
## [Reviewer Name]
. If the PR doesn't touch Solidity, the corresponding checklist can be removed.@mcclurejt
approve
calls useforceApprove
?transfer
calls usesafeTransfer
?transferFrom
calls usemsg.sender
as thefrom
address?call
,delegatecall
,staticcall
,transfer
,send
)success
boolean checked to handle failed calls?delegatecall
, are there strict access controls on the addresses that can be called? It shouldn't be possible todelegatecall
arbitrary addresses, so the list of possible targets should either be immutable or tightly controlled by an admin.nonReentrant
?payable
functions restricted to avoid stuck ether?Safe
functions are altered, are potential underflows and overflows caught so that a failure flag can be thrown?