Closed code423n4 closed 2 years ago
gzeon
e.g. https://github.com/code-423n4/2021-12-amun/blob/98f6e2ff91f5fcebc0489f5871183566feaec307/contracts/basket/contracts/facets/Basket/BasketFacet.sol#L49
uint256 length = bs.tokens.length; // remove token from array for (uint256 i; i < length; i++) { if (address(bs.tokens[i]) == _token) { bs.tokens[i] = bs.tokens[length - 1]; bs.tokens.pop(); emit TokenRemoved(_token); break; } }
Duplicate of #249
Handle
gzeon
Vulnerability details
e.g. https://github.com/code-423n4/2021-12-amun/blob/98f6e2ff91f5fcebc0489f5871183566feaec307/contracts/basket/contracts/facets/Basket/BasketFacet.sol#L49