Closed sentilesdal closed 3 weeks ago
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
contracts/src/internal/HyperdriveLP.sol | 4 | 96.88% | ||
contracts/src/internal/HyperdriveLong.sol | 6 | 94.02% | ||
contracts/src/internal/HyperdriveShort.sol | 7 | 94.17% | ||
<!-- | Total: | 17 | --> |
Totals | |
---|---|
Change from base Build 9408759390: | 0.4% |
Covered Lines: | 1833 |
Relevant Lines: | 1963 |
Benchmark suite | Current: 42802408cef99cf75d479e418f63ab0d30e21974 | Previous: aed776f039568e486a7066b9cfbf39f373bdbb42 | Deviation | Status |
---|---|---|---|---|
addLiquidity: min |
33827 gas |
33827 gas |
0% |
π° |
addLiquidity: avg |
155630 gas |
155854 gas |
-0.1437% |
β |
addLiquidity: max |
429092 gas |
429092 gas |
0% |
π° |
checkpoint: min |
40292 gas |
40292 gas |
0% |
π° |
checkpoint: avg |
142331 gas |
142352 gas |
-0.0148% |
β |
checkpoint: max |
253424 gas |
253424 gas |
0% |
π° |
closeLong: min |
31361 gas |
31361 gas |
0% |
π° |
closeLong: avg |
136036 gas |
136073 gas |
-0.0272% |
β |
closeLong: max |
2621386 gas |
2625796 gas |
-0.1679% |
β |
closeShort: min |
31349 gas |
31349 gas |
0% |
π° |
closeShort: avg |
131928 gas |
132134 gas |
-0.1559% |
β |
closeShort: max |
309547 gas |
263302 gas |
17.5635% |
π¨ |
initialize: min |
31371 gas |
31371 gas |
0% |
π° |
initialize: avg |
330949 gas |
330923 gas |
0.0079% |
π¨ |
initialize: max |
397010 gas |
397010 gas |
0% |
π° |
openLong: min |
33370 gas |
33370 gas |
0% |
π° |
openLong: avg |
173595 gas |
174111 gas |
-0.2964% |
β |
openLong: max |
306958 gas |
306958 gas |
0% |
π° |
openShort: min |
33936 gas |
33936 gas |
0% |
π° |
openShort: avg |
168594 gas |
168488 gas |
0.0629% |
π¨ |
openShort: max |
415838 gas |
415910 gas |
-0.0173% |
β |
redeemWithdrawalShares: min |
31251 gas |
31251 gas |
0% |
π° |
redeemWithdrawalShares: avg |
75324 gas |
74759 gas |
0.7558% |
π¨ |
redeemWithdrawalShares: max |
210204 gas |
210204 gas |
0% |
π° |
removeLiquidity: min |
31301 gas |
31301 gas |
0% |
π° |
removeLiquidity: avg |
214602 gas |
214403 gas |
0.0928% |
π¨ |
removeLiquidity: max |
403971 gas |
403959 gas |
0.0030% |
π¨ |
This comment was automatically generated by workflow using github-action-benchmark.
@jalextowle updated with your suggestion to just have one _getAccruedInterest(uint256 timestamp)
Resolved Issues
Description
This helps with testing. When solidity is called using anvil in rust tests, the block is ticked by 1 second. Because there is a call to
_getAccruedInterest()
intotalAssets()
, the only way to get the exact value is to pass the current time plus one second tototalAssets()
.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.[[Reviewer Name]]
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?