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

Add new allocator to migrate old LUSD allocator to and rescue funds #339

Open
wants to merge 2 commits into
base: allocators
Choose a base branch
from

Conversation

0xLienid
Copy link
Contributor

@0xLienid 0xLienid commented Apr 10, 2023

Test CI check is failing because of some curve convex allocator test, nothing to do with this allocator

Copy link

@Oighty Oighty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, looks fine. It's probably best to just do the rescue from the allocator vs. trying to migrate from this one to a new one.

function sendETH(address to_) external {
_onlyGuardian();

payable(to_).transfer(address(this).balance);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to use a low-level call since if you send it to a smart contract wallet or a contract, it could get bricked in the future if the gas cost of op codes change. Transfer only forwards 2300 gas.

payable(to_).call{value: address(this).balance}("");

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, updated

@0xLienid
Copy link
Contributor Author

Overall, looks fine. It's probably best to just do the rescue from the allocator vs. trying to migrate from this one to a new one.

yep agreed. i just wanted to have the ability to migrate again in case something unexpected goes wrong with this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants