Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Fix REX maturity date bug #528

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

DouglasHorn
Copy link

Fixing bug in REX maturity calculation that writes 2106-02-07T06:28:15 as the maturity date of some deposits instead of the proper maturity date, therefore locking SYS tokens in REX for 84 years.

Change Description

Deployment Changes

  • Deployment Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

Fixing bug in REX maturity calculation that writes `2106-02-07T06:28:15` as the maturity date of some deposits instead of the proper maturity date, therefore locking SYS tokens in REX.
@DouglasHorn
Copy link
Author

I believe I might have found a solution to the REX maturity bug in EOSIO that locks up SYS tokens so they can't be withdrawn by writing 2106-02-07T06:28:15 as the maturity date instead of calculating the proper maturity date. It was calculating it as end_of_days which is time_point_sec::maximum() I'm not certain why they use this at all, frankly, but it looks like it was being calculated in a wrong place instead of using get_rex_maturity()

Would someone take a look at this and check my edit. I think doing this will not only prevent it from happening in the future, but allow users with locked REX tokens to fix them with the consolidate() action - making them available to unstake in 4 days.

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

Successfully merging this pull request may close these issues.

1 participant