Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gen 1261 update claimer to dynamically compute decay constant from #30

Conversation

asselstine
Copy link
Contributor

No description provided.

Copy link

linear bot commented Apr 1, 2024

@asselstine asselstine changed the base branch from main to gen-1260-fix-bug-in-claimer-prize-count April 1, 2024 22:53
src/Claimer.sol Outdated

/// @notice Computes the decay constant for the VRGDA.
/// @dev This is a decay constant that ensures the fee will grow to the target max fee
/// @param _targetFee The starting fee
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/// @param _targetFee The starting fee
/// @param _targetFee The target fee

src/Claimer.sol Outdated
} else {
return _computeMaxFee(_tier);
}
}

/// @notice Compute the starting fee for prize claims
/// @return The starting fee for prize claims
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/// @return The starting fee for prize claims
/// @return The target fee for prize claims

src/Claimer.sol Outdated
@@ -295,23 +296,23 @@ contract Claimer {
}

/// @notice Computes the fee for the next claim.
/// @param _minimumFee The minimum fee that should be charged
/// @param _targetFee The minimum fee that should be charged
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/// @param _targetFee The minimum fee that should be charged
/// @param _targetFee The target fee that should be charged

/// @param _targetFee The starting fee
/// @return The decay constant
function _computeDecayConstant(uint256 _targetFee) internal view returns (SD59x18) {
uint maximumFee = _computeMaxFee(0);
Copy link
Member

Choose a reason for hiding this comment

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

Would it help the auction price discovery if we multiplied this by the maxFeePortionOfPrize fraction?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes! It definitely should; that would make it more efficient

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah wait, it already is in the _computeMaxFee function

src/Claimer.sol Outdated
}

/// @notice Computes the decay constant for the VRGDA.
/// @dev This is a decay constant that ensures the fee will grow to the target max fee
Copy link
Member

Choose a reason for hiding this comment

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

This is a bit confusing. Is it growing to the target fee or the max fee?

src/Claimer.sol Outdated
} else {
return _computeMaxFee(_tier);
}
}

/// @notice Compute the starting fee for prize claims
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/// @notice Compute the starting fee for prize claims
/// @notice Compute the target fee for prize claims

@asselstine asselstine force-pushed the gen-1260-fix-bug-in-claimer-prize-count branch from f333899 to 37d69cc Compare April 2, 2024 15:23
Base automatically changed from gen-1260-fix-bug-in-claimer-prize-count to main April 2, 2024 15:24
@asselstine asselstine force-pushed the gen-1261-update-claimer-to-dynamically-compute-decay-constant-from branch from 633349d to 13c18cc Compare April 2, 2024 15:33
Copy link

github-actions bot commented Apr 2, 2024

LCOV of commit 13c18cc during Tests with 100% Coverage #142

Summary coverage rate:
  lines......: 100.0% (82 of 82 lines)
  functions..: 100.0% (17 of 17 functions)
  branches...: no data found

Files changed coverage rate:
                                  |Lines       |Functions  |Branches    
  Filename                        |Rate     Num|Rate    Num|Rate     Num
  ======================================================================
  src/Claimer.sol                 | 100%     51| 100%    11|    -      0
  src/ClaimerFactory.sol          | 100%      6| 100%     2|    -      0

@asselstine asselstine merged commit 236b4ea into main Apr 2, 2024
2 checks passed
@asselstine asselstine deleted the gen-1261-update-claimer-to-dynamically-compute-decay-constant-from branch April 2, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants