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

Stable Brick Swan - auctionPeriod variable not initialized #1029

Open
sherlock-admin2 opened this issue Jan 23, 2025 · 0 comments
Open

Stable Brick Swan - auctionPeriod variable not initialized #1029

sherlock-admin2 opened this issue Jan 23, 2025 · 0 comments

Comments

@sherlock-admin2
Copy link
Contributor

Stable Brick Swan

Medium

auctionPeriod variable not initialized

Summary

The auctionPeriod is not correctly initialized when at the creation of the Pool allowing user to create auction with a auctionPeriod==0

Relevant GitHub Links

https://github.com/sherlock-audit/2024-12-plaza-finance/blob/main/plaza-evm/src/Pool.sol#L135-L170
https://github.com/sherlock-audit/2024-12-plaza-finance/blob/main/plaza-evm/src/Pool.sol#L535

Root Cause

The auctionPeriod is not initialized on the creation of a Pool. This will allow user to create new auctions with auctionPeriod==0 because 0 is the default value.

Internal Pre-conditions

auctionPeriod not initialized using the dedicated function (auctionPeriod==0)

External Pre-conditions

None.

Attack Path

User create an auction with a 0s duration

Impact

Users can create auctions with no duration because is auctionPeriod==0.

Mitigation

Initialize the auctionPeriod variable in the Poool::initialize function

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

No branches or pull requests

1 participant