Closed stalker474 closed 1 year ago
You know I spent a few hours looking at how to do that and couldn't figure out a way in Solidity to do this abstraction. I totally agree with you though that there should be a way and I'd be happy to learn this. When we were developing we looked at diamond proxies and delegate calls but ultimately abandoned the idea because they did not support private methods and they required some awkward stuff like changing all function calls to first do a slot lookup of an address and calling that address for the implementation (which affects msg.sender logic).
This refactor should be a priority so that there is a low effort way to deliver a Leveraged Vault for each Alchemix Vault. Right now it would entail a lot of copy and paste and would be a nightmare to maintain/refactor once there are many pools.
Alright I looked into this myself and I'm pretty sure I can implement this no worries
Both leveragers share a lot of the same code and could inherit it instead