Skip to content
DoS Audit finding Intermediate

TokenHandler.sol, L174 - .transfer is bad practice

JMukesh Follow

Originally disclosed on Code4rena

Submitted by JMukesh, also found by tensors

The use of .transfer in TokenHandler.sol L174 to send ether is now considered bad practice as gas costs can change which would break the code.

See stop using soliditys transfer now, and istanbul hardfork eips increasing gas costs and more.

Recommend using call instead, and make sure to check for reentrancy.

jeffywu (Notional) commented:

This should be 0 (Non critical). ETH transfers still work as of today. This is a best practice recommendation. In the case that there is a hard fork that breaks ETH transfers the protocol can be upgraded to support the use of call()

ghoul-sol (judge) commented:

I aline with warden on this one. .transfer will not work if the account is a smart contract. Keeping as is.

EDITORS NOTE: Additional conversation regarding this vulnerability can be found here

The original report as published on Code4rena, by JMukesh. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is known

A medium-severity doS bug in Notional contest. Code4rena made it public on 1 October 2021. Found in the 2021-08-notional audit contest (finding M-01).

About DoS

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by JMukesh

View all

2 more disclosed reports, best first.

More from Notional contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.