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

Investigate using Clones With Immutable Args for ReflexEndpoint #32

Open
zerosnacks opened this issue Jan 13, 2023 · 9 comments
Open

Investigate using Clones With Immutable Args for ReflexEndpoint #32

zerosnacks opened this issue Jan 13, 2023 · 9 comments

Comments

@zerosnacks
Copy link
Contributor

zerosnacks commented Jan 13, 2023

This would allow deployment of proxies at predetermined addresses and more efficient proxies.

See: https://github.com/0age/create2crunch
See: https://github.com/0age/Pr000xy/blob/master/contracts/Create2Factory.sol

Investigate how the multi-proxy case would be handled.

@zerosnacks zerosnacks changed the title Investigate using create2 for proxy Investigate using create2 for BaseProxy Jan 13, 2023
@zerosnacks
Copy link
Contributor Author

Additionally investigate whether to split up the BaseProxy into BaseSingleProxy and BaseMultiProxy so both can be more optimized versions

@zerosnacks
Copy link
Contributor Author

zerosnacks commented Jan 13, 2023

Include test where proxyAddress_ needs to be deterministic

function testCreateProxy() external {
    vm.expectEmit(false, false, false, false);
    ProxyCreated(proxyAddress_);
    base.createProxy(100, _MODULE_TYPE_SINGLE_PROXY);
}

@zerosnacks
Copy link
Contributor Author

Alternatively look into using clones with immutable args as all proxies use the same implementation

@zerosnacks
Copy link
Contributor Author

Closing this in favor of #36

@zerosnacks
Copy link
Contributor Author

Reopening as reason for investigation is still valid, CWIA investigation has not yielded desired result.

@zerosnacks zerosnacks added the enhancement New feature or request label Jan 18, 2023
@zerosnacks zerosnacks self-assigned this Jan 19, 2023
@zerosnacks
Copy link
Contributor Author

@zerosnacks
Copy link
Contributor Author

It is not exactly clear how multi-proxies would be handled

@zerosnacks zerosnacks changed the title Investigate using create2 for BaseProxy Investigate using Clones With Immutable Args for ReflexEndpoint Jun 21, 2023
@zerosnacks
Copy link
Contributor Author

We have to make sure we are not vulnerable to the same type of attack Astaria was https://twitter.com/devtooligan/status/1671310173896585216

@JLongarzo
Copy link
Contributor

Yeah definitely want to check that. I'm generally a fan of simplicity. The current version of Reflex is even a little bit battle tested and audited via Euler and all of its audits (obviously there are differences but the high level system worked for over a year and went through multiple audits). It would be a lot to make very significant changes.

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