code-423n4 / 2021-11-yaxis-findings

0 stars 0 forks source link

Context and msg.sender #105

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

Contract Transmuter inherits a functionality of the Context contract of OpenZeppelin:

  contract Transmuter is Context

https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Context.sol Context is designed to be used with Ethereum Gas Station Network (GSN), thus it encourages to use _msgSender() instead of msg.sender.

Recommended Mitigation Steps

Consider replacing msg.sender with _msgSender() or getting rid of Context inheritance to save some gas if you don't actually need it.