Missing whenNotPaused modifier #175
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
resolved
Finding has been patched by sponsor (sponsor pls link to PR containing fix)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Lines of code
https://github.com/code-423n4/2022-06-connext/blob/b4532655071566b33c41eac46e75be29b4a381ed/contracts/contracts/core/connext/facets/StableSwapFacet.sol#L279-L286
Vulnerability details
Impact
In
StableSwapFacet.sol
, two swapping functions contain thewhenNotPaused
modifier whileswapExactOut()
andaddSwapLiquidity()
do not. All functions to swap and add liquidity should contain the same modifiers to stop transactions while paused.Proof of Concept
Example with modifier
Examples without modifier
and
Tools Used
Manual review.
Recommended Mitigation Steps
Add the
whenNotPaused
modifier to all functions that perform swaps or liquidity additions.The text was updated successfully, but these errors were encountered: