JPEG'd contest - samruna's results

Bridging the gap between DeFi and NFTs.

General Information

Platform: Code4rena

Start Date: 07/04/2022

Pot Size: $100,000 USDC

Total HM: 20

Participants: 62

Period: 7 days

Judge: LSDan

Total Solo HM: 11

Id: 107

League: ETH

JPEG'd

Findings Distribution

Researcher Performance

Rank: 49/62

Findings: 1

Award: $151.35

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

151.3491 USDC - $151.35

Labels

bug
QA (Quality Assurance)
resolved
sponsor confirmed

External Links

https://github.com/code-423n4/2022-04-jpegd/blob/main/contracts/tokens/JPEG.sol#L20 Consider added valid check for the to address. The to address can be of a contract or another token or user. See below test code to replicate the behavior it("should return the correct JPEG balance", async () => { await controller.approveStrategy(token.address, strategy.address); await controller.setStrategy(token.address, strategy.address); await jpeg.mint(token.address, units(500)); --- the to address can be any address. expect(await controller.balanceOfJPEG(token.address)).to.equal(units(500)); });

https://github.com/code-423n4/2022-04-jpegd/blob/main/contracts/tokens/yVault.sol#L115 setFarmingPool is declared public but not called from within the contract. Consider makin it external. Public visiility will persist the parameters which can incurr as fees.

https://github.com/code-423n4/2022-04-jpegd/blob/main/contracts/tokens/yVault.sol#L35 The whitelistedContractMap is not necessary. It can be an address array. If contract is whitelisted, then add to array, if not, remove it. Removing the extra flag will save some space in the contract.

https://github.com/code-423n4/2022-04-jpegd/blob/main/contracts/tokens/yVault.sol#L187 Function withdrawJPEG() seems duplicate of Controller.withdrawJPEG() and is not necessay. Remove the function or make it a utility.

https://github.com/code-423n4/2022-04-jpegd/blob/main/contracts/tokens/yVault.sol#L61 Modifier noContract() is duplicated, can be abstracted out

https://github.com/code-423n4/2022-04-jpegd/blob/main/contracts/tokens/yVault.sol#L89 setContractWhitelisted is duplicated, can be abstracted out

#0 - spaghettieth

2022-04-20T12:53:19Z

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter