code-423n4 / 2021-09-defiprotocol-findings

1 stars 0 forks source link

BLOCK_DECREMENT not used #57

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

gpersoon

Vulnerability details

Impact

The constant BLOCK_DECREMENT of Auction.sol isn't used. It is probably replaced with auctionDecrement of Factory.sol.

It is cleaner to remove the constant.

Proof of Concept

https://github.com/code-423n4/2021-09-defiProtocol/blob/main/contracts/contracts/Auction.sol#L14 uint256 private constant BLOCK_DECREMENT = 10000;

https://github.com/code-423n4/2021-09-defiProtocol/blob/main/contracts/contracts/Factory.sol#L30 uint256 public override auctionDecrement = 10000;

Tools Used

Recommended Mitigation Steps

Remove the following from Auction.sol uint256 private constant BLOCK_DECREMENT = 10000;