gelatodigital / gelato-network

V1 implementation of Gelato Network
https://gelato.network/
MIT License
231 stars 29 forks source link

Make sure we have a check for account existence before low-level calls #6

Open gitpusha opened 4 years ago

gitpusha commented 4 years ago

https://solidity.readthedocs.io/en/latest/control-structures.html#error-handling-assert-require-revert-and-exceptions

The low-level functions call, delegatecall and staticcall return true as their first return value if the account called is non-existent, as part of the design of the EVM. Account existence must be checked prior to calling if needed.

hilmarx commented 4 years ago

For the beta, my understanding is that we will only allow proxies to mint execution claims, not the actual EOAs, because we dont have a global registry that maps all EOAs to all proxies. This would mean that if a proxy has already minted an execution claim, we can be pretty sure that it also exists to be called later using a low level call

gitpusha commented 4 years ago

This issue is meant as a general reminder to check every low-level call in any of our contracts (also actions and conditions), in order to make sure that we do not make a false reliance on account existence anywhere.

For the specific implementation of proxy.call in a proxy-agnostic GelatoCore.execute it should be fine to let the check of proxy existence be covered in the Provider Minting Module

hilmarx commented 4 years ago

Closed as discussed in #37