Platform: Code4rena
Start Date: 16/11/2021
Pot Size: $50,000 ETH
Total HM: 11
Participants: 17
Period: 7 days
Judge: LSDan
Total Solo HM: 8
Id: 49
League: ETH
Rank: 9/17
Findings: 2
Award: $2,242.52
🌟 Selected for report: 0
🚀 Solo Findings: 0
hubble
Using/importing openZeppelin version 4.3.2 file ERC1155Supply.sol which has a security advisory. Reference : https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-wmpv-c2jp-j2xg
File : collateral/OverlayV1OVLCollateral.sol line 7: import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
File : brownie-config.yaml line 23: dependencies:
Manual review
Upgrade the openzeppelin ERC1155Supply.sol dependency version to 4.3.3
#0 - mikeyrf
2021-12-06T23:39:46Z
duplicate #127
hubble
The function _transferMint is called by both transferFromMint and transferMint which again is used while issuing shares when a user takes a position in OI.
File : ovl/OverlayToken.sol file line 268 : function _transferMint( address sender, address recipient, uint256 amount, uint256 minted ) internal {
uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount + minted; emit Transfer(sender, recipient, amount); emit Transfer(address(0), recipient, minted); }
Manual review
Increment the totalSupply as is done in _mint() _totalSupply += minted;
#0 - mikeyrf
2021-12-06T23:50:04Z
duplicate #59