TTSwap fixes shareMint vesting bug that stranded part of every allocation
A fix on the TTSwap project, tracked as PR #340 and bounty #325, addresses a vesting schedule whose math meant it could never fully release its allocation. The shareMint function divided by a chips value that never decreased, so each unlock released a shrinking share and left a geometric remainder unreachable. Independent QA reproduced the failure, showing only 683,593 of 1,000,000 tokens minted after four unlocks. The corrected approach tracks unlock progress and divides by the chips still remaining, with the final unlock sweeping leftover dust. The author also disclosed a separate overflow issue past roughly 127 unlocks, which was already fixed upstream and explicitly excluded from this change.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in