Sushi Miso contest - JMukesh's results

Part of the Sushi’s product ecosystem in advancing seamless token and auction launchpad for projects.

General Information

Platform: Code4rena

Start Date: 09/09/2021

Pot Size: $100,000 SUSHI

Total HM: 4

Participants: 11

Period: 7 days

Judge: ghoulsol

Total Solo HM: 3

Id: 28

League: ETH

Sushi

Findings Distribution

Researcher Performance

Rank: 6/11

Findings: 3

Award: $5,314.71

🌟 Selected for report: 2

🚀 Solo Findings: 1

Findings Information

🌟 Selected for report: JMukesh

Labels

bug
2 (Med Risk)
sponsor disputed

Awards

448.7306 SUSHI - $4,500.77

External Links

Handle

JMukesh

Vulnerability details

Impact

Use of transfer() might render ETH impossible to withdraw becuase after istanbul hardfork , there is increases in the gas cost of the SLOAD operation and therefore breaks some existing smart contracts.Those contracts will break because their fallback functions used to consume less than 2300 gas, and they’ll now consume more, since 2300 the amount of gas a contract’s fallback function receives if it’s called via Solidity’s transfer() or send() methods. Any smart contract that uses transfer() or send() is taking a hard dependency on gas costs by forwarding a fixed amount of gas: 2300.

https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/

https://blog.openzeppelin.com/opyn-gamma-protocol-audit/

Proof of Concept

https://github.com/sushiswap/miso/blob/2cdb1486a55ded55c81898b7be8811cb68cfda9e/contracts/MISOTokenFactory.sol#L242

https://github.com/sushiswap/miso/blob/2cdb1486a55ded55c81898b7be8811cb68cfda9e/contracts/MISOMarket.sol#L256

https://github.com/sushiswap/miso/blob/2cdb1486a55ded55c81898b7be8811cb68cfda9e/contracts/MISOLauncher.sol#L251

https://github.com/sushiswap/miso/blob/2cdb1486a55ded55c81898b7be8811cb68cfda9e/contracts/MISOFarmFactory.sol#L244

Tools Used

manual review

use call() to send eth

#0 - maxsam4

2021-09-16T05:26:44Z

This is intentional, not a risk. The contract does not want to give any gas stipend to the destination.

even if the user messes up, misoDev address can be changed to a proper address later.

#1 - ghoul-sol

2021-10-05T18:20:27Z

using .transfer can make ETH transfer to a smart contract impossible. User can always change the address however I agree with warden that this is an issue.

Findings Information

🌟 Selected for report: leastwood

Also found by: JMukesh

Labels

bug
duplicate
1 (Low Risk)
disagree with severity

Awards

67.3096 SUSHI - $675.12

External Links

Handle

JMukesh

Vulnerability details

Impact

due to lack of necessary check in executeBatch() , any account with the EXECUTOR role can set themselves as PROPOSER and ADMIN of the Timelock, and set the minimum delay to zero

more you can see on : https://forum.openzeppelin.com/t/timelockcontroller-vulnerability-post-mortem/14958

Proof of Concept

https://github.com/sushiswap/miso/blob/2cdb1486a55ded55c81898b7be8811cb68cfda9e/contracts/OpenZeppelin/access/TimelockController.sol#L230

Tools Used

manual review

add check-effects-interaction pattern before and after call()

#0 - Clearwood

2021-09-16T04:41:17Z

As the TimeLock Controller is currently used nowhere in the project and its a known issue, I would propose to put down the severity of this issue.

#1 - Clearwood

2021-09-16T05:05:33Z

Duplicate of #24

Findings Information

🌟 Selected for report: JMukesh

Labels

bug
G (Gas Optimization)
sponsor acknowledged

Awards

13.8408 SUSHI - $138.82

External Links

Handle

JMukesh

Vulnerability details

Impact

variable that are not used in function should be removed

uint256 duration = 1000; in MisoRecipe01.sol

Proof of Concept

https://github.com/sushiswap/miso/blob/2cdb1486a55ded55c81898b7be8811cb68cfda9e/contracts/Recipes/MISORecipe01.sol#L139

Tools Used

manual review

remove unused local variable

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