Closed storming0x closed 2 years ago
This is a good question. The main issue I see is who is responsible for saying "we are in an emergency" without having a reference as owner or admin in the contract. Another option, but IDK if possible, is having a function that, based on some internal calculation, identifies an emergency, but it might not cover all the potential scenarios.
On the other hand, the options that I see with an admin address would be:
it adds more complexity but the emergency function can be done by onchain voting of veYFI holders, assuming veYFI contract is not with issue, i guess some timelock or specific snapshot is needed to declare it (preventing governance attacks) but as mentioned it may be more complex.
Other option is add an admin (ychad) temp function to set Rewards in veYFI (setter) and later change it to compound style gov contract to precisely mitigate this issue keeping veYFI abstracted from complex gov logic.
Closing this issue since it has been discussed
Created an issue for discussion.
Currently
veYFI.vy
andRewards.vy
are immutable and coupled together (veYFI uses rewards as reference and vice versa.Current plan of action in case of an issue (rewards has a bug and no longer viable to stream rewards), requires user of veYFI to withdraw at a penalty and yearn to redeploy veYFI, previous version of veYFI in development had admin method to allow for withdrawals in case of emergency, i understand the reasoning for removing admin methods.
In any case a plan of action should be discussed in case we need to shutdown these two contracts and redeploy them in case of any problem, in case we decide to go live as is with current code.