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

Implement ERC-20 token recovery mechanism #974

Open
smol-ninja opened this issue Jul 16, 2024 · 2 comments
Open

Implement ERC-20 token recovery mechanism #974

smol-ninja opened this issue Jul 16, 2024 · 2 comments
Labels
effort: high Large or difficult task. priority: 2 We will do our best to deal with this. type: feature New feature or request. work: complicated Sense-analyze-respond. The relationship between cause and effect requires analysis or expertise.

Comments

@smol-ninja
Copy link
Member

smol-ninja commented Jul 16, 2024

Originally discussed in https://github.com/sablier-labs/company-discussions/discussions/11

Implement a mechanism to recover any surplus amount of assets from the core contract. The following approach has been discussed at length in the original discussion:

  1. Define a single variable to track down the amount of assets that the protocol owes to the users: mapping (erc20 => amount). This variable should be updated whenever there is a transfer of asset into/out of the protocol.

  2. Declare a function to be used to manage the surplus amount, i.e. the difference between the token balance of the protocol minus the value stored. If called by admin, it can send surplus to the specified address. If called by a random address, it can only send the surplus amount to the admin address.

@smol-ninja smol-ninja added type: feature New feature or request. effort: high Large or difficult task. priority: 2 We will do our best to deal with this. work: complicated Sense-analyze-respond. The relationship between cause and effect requires analysis or expertise. labels Jul 16, 2024
@smol-ninja smol-ninja self-assigned this Sep 2, 2024
@smol-ninja
Copy link
Member Author

Should we release this feature in the next lockup release as well the first Flow release?

@PaulRBerg
Copy link
Member

Yes we should

@smol-ninja smol-ninja removed their assignment Oct 31, 2024
@smol-ninja smol-ninja assigned smol-ninja and unassigned smol-ninja Nov 16, 2024
@PaulRBerg PaulRBerg changed the title Implement asset recovery mechanism Implement ERC-20 token recovery mechanism Nov 21, 2024
@smol-ninja smol-ninja assigned smol-ninja and unassigned smol-ninja Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: high Large or difficult task. priority: 2 We will do our best to deal with this. type: feature New feature or request. work: complicated Sense-analyze-respond. The relationship between cause and effect requires analysis or expertise.
Projects
None yet
Development

No branches or pull requests

2 participants