code-423n4 / 2021-12-amun-findings

0 stars 0 forks source link

PolygonERC20Wrapper does not need to be ERC20 #211

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

kenzo

Vulnerability details

Since the minting and burning is all virtual, PolygonERC20Wrapper does not need to implement the full ERC20, but can just implement the needed functions for the bridge functionality and emit a burn event (transfer to 0 address) when needed.

Impact

Save gas and complexity.

The only issue might be if Polygon for some reason declines to map it, but I see no reason for them to do so.