Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor protocol pauser #319

Open
tjcloa opened this issue Jul 14, 2021 · 0 comments
Open

Refactor protocol pauser #319

tjcloa opened this issue Jul 14, 2021 · 0 comments

Comments

@tjcloa
Copy link
Contributor

tjcloa commented Jul 14, 2021

#311
as discussed primarily with @smbsp
e.g. in _setTarget(this.swapExternal.selector, target);
this.swapExternal.selector
is replaced for
this.swapExternal.selector^this.xor.selector (which should be a constant - )
in all modules
that will lead to calling non-existing functions from the protocol meaning that all the calls will be transferred to the fallback function
so, add fallback functions to all modules which will serve as a hook prior to calling any module function

in the fallback function:
- check that the protocol is not on pause and virtually any preliminary processing
- xor func sig again to restore true func sig
- check that the true sig exists
- call the function with the tru func sig

verify

  • possible gas limit with the fallback function
  • check each function call gas overhead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants