code-423n4 / 2023-04-caviar-findings

9 stars 4 forks source link

Upgraded Q -> 3 from #306 [1683219251927] #1007

Closed c4-judge closed 1 year ago

c4-judge commented 1 year ago

Judge has assessed an item in Issue #306 as 3 risk. The relevant finding follows:

[L-01] Consider using OpenZeppelin’s SafeCast library to prevent unexpected overflows when casting from uint256 In the function buy() and sell() of the contract PrivatePool.sol the function first set the variables netInputAmount,feeAmount,protocolFeeAmount and weightSum to be of type uint256. However, later on in the function the value of the variables are downcasted to uint128 and is used to update the virtual reserves.

c4-judge commented 1 year ago

GalloDaSballo marked the issue as duplicate of #167

c4-judge commented 1 year ago

GalloDaSballo marked the issue as satisfactory