Open
Conversation
MicahZoltu
approved these changes
Jan 31, 2026
Member
MicahZoltu
left a comment
There was a problem hiding this comment.
Approved pending response or change related to the feeEndDate comment.
| uint256 clampedLastUpdatedFeeAccumulator = lastUpdatedFeeAccumulator > endTime ? endTime : lastUpdatedFeeAccumulator; | ||
| uint256 timeDelta = clampedCurrentTimestamp - clampedLastUpdatedFeeAccumulator; | ||
| uint256 feeEndDate = forkTime == 0 ? endTime : forkTime; | ||
| uint256 clampedCurrentTimestamp = block.timestamp > feeEndDate ? endTime : block.timestamp; |
Member
There was a problem hiding this comment.
I think you want feeEndDate here?
Suggested change
| uint256 clampedCurrentTimestamp = block.timestamp > feeEndDate ? endTime : block.timestamp; | |
| uint256 clampedCurrentTimestamp = block.timestamp > feeEndDate ? feeEndDate : block.timestamp; |
Separately, I find it more clear when the first item in the comparison is the if and the second is the else:
Suggested change
| uint256 clampedCurrentTimestamp = block.timestamp > feeEndDate ? endTime : block.timestamp; | |
| uint256 clampedCurrentTimestamp = feeEndDate < block.timestamp ? feeEndDate : block.timestamp; |
Member
There was a problem hiding this comment.
If solidity supports function inlining in its optimizer, then there may be value in creating a min function and using that instead for better code clarity.
| feeIndex += delta * SecurityPoolUtils.PRICE_PRECISION / securityBondAllowance; | ||
| completeSetCollateralAmount = newCompleteSetCollateralAmount; | ||
| lastUpdatedFeeAccumulator = block.timestamp; | ||
| lastUpdatedFeeAccumulator = block.timestamp > feeEndDate ? feeEndDate : block.timestamp; |
Member
There was a problem hiding this comment.
Style preference (same reasoning as above):
Suggested change
| lastUpdatedFeeAccumulator = block.timestamp > feeEndDate ? feeEndDate : block.timestamp; | |
| lastUpdatedFeeAccumulator = feeEndDate < block.timestamp ? feeEndDate : block.timestamp; |
Base automatically changed from
can-fork-the-pool-even-if-there's-0-rep
to
main
February 2, 2026 11:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.