-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
Currently, if ERC20 tokens are sent directly to the contract, they become locked permanently. Implement a rescue function that allows the owner to recover only those tokens that aren’t committed to an active channel.
Enhancements
Rescue function
- Add a rescueTokens function restricted to the contract owner.
- Ensure it only withdraws tokens in excess of those committed to open channels.
Tracking commited tokens
- Maintain a mapping to track the total ERC20 tokens tied up in channels.
- Update this tracking during channel creation, redemption, and reclamation.
Security
- Prevent misuse by allowing only partial withdrawals for uncommitted tokens.
- Keep reentrancy protections and proper validations in place.
Benefits
- Prevents accidental loss of ERC20 tokens.
- Ensures funds tied to active channels remain secure.
- Increases contract robustness and user trust.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels