-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Is your feature request related to a problem
In rare cases, tokens might be sent to the Lock contract with an incorrect message body or from an incompatible Jetton implementation.
These tokens will not be accounted for in the internal balance, and cannot be withdrawn using the normal unlock flow — effectively locking them forever.
Describe the solution you'd like
Update the Lock contract to allow the user to withdraw any specified amount of the locked token after the lock period expires, even if it exceeds the internally tracked balance.
Key conditions:
- Lock must not have participated in any proposals (i.e. no voting happened). Lock time must be expired.
- Upon withdrawal, the internal balance must be reset to zero, regardless of the amount withdrawn. This simplifies accounting.
Optional idea (to be discussed):
Consider allowing withdrawal of other Jettons that were accidentally sent to the contract. However, this might complicate security guarantees and should be treated with caution.
Describe alternatives you've considered
Strictly block all untracked or over-limit withdrawals (current behavior). This risks irrecoverable token loss in edge cases.
Additional context
This change would make the Lock contract more robust to user errors and ecosystem inconsistencies (e.g., Jetton contracts with non-standard message formats).