Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Enforced invariant to make sure auction duration can never exceed epoc… #326

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SantiagoGregory
Copy link
Contributor

AST-869

Copy link
Contributor

@androolloyd androolloyd left a comment

Choose a reason for hiding this comment

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

lets get these in,

lets rebase them to master for sanity

if (vaultFee > s.maxStrategistFee) {
revert IAstariaRouter.InvalidVaultFee();
}
if (epochLength <= s.auctionWindow) {

Choose a reason for hiding this comment

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

this is implied from above where we check:

  • s.minEpochLength <= epochLength
  • and when filing s.auctionWindow < s.minEpochLength (need to check this in the constructor as well)

Comment on lines +296 to 298
uint256 minLength = abi.decode(data, (uint256));
if (minLength <= s.auctionWindow) revert InvalidFileData();
s.minEpochLength = abi.decode(data, (uint256)).safeCastTo32();

Choose a reason for hiding this comment

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

we don't need to decode data twice.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants