Company Simulator

First Flight #51
Beginner FriendlyDeFi
100 EXP
Submission Details
Impact: high
Likelihood: high

`pragma nonreentrancy on`  is only avaiable from Vyper 0.4.2 ownards

Author Revealed upon completion

pragma nonreentrancy on is only avaiable from Vyper 0.4.2 ownards

Description

  • Since the compiler version is not specific, and it starts from 0.4.1 (# @version ~=0.4.1), there is a possibility that the ending contract doesn't have this feature enabled.

  • Consider using a specific version of Vyper in your contracts instead of a wide version. For example, instead of # @version ^0.4.1, use # @version ~=0.4.1.

# pragma nonreentrancy on

Risk

Impact:

  • All functions ARE REENTRANT BY DEFAULT

Recommended Mitigation

Use a ~= compatible release clause or a == version matching clause for the compiler version with a more modern version of Vyper.

- # @version ^0.4.1
+ # @version ~=0.4.3
# pragma nonreentrancy on

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.