Submitted by BenRai
https://github.com/code-423n4/2024-12-secondswap/blob/b9497bcf5100046a169276cb6b351ebc0eddc2cc/contracts/SecondSwap_VestingManager.sol#L149-L152
Because unlisted vestings are equally distributed to the unclaimed steps of the seller, if a seller unlists a vesting after he claimed additional steps, tokens which should have been claimable already are locked again and the unlocking schedule is disrupted.
The core functionality of the SecondSwap protocol is the option to sell tokens which are currently still locked in the vesting schedule. A user which has a vesting allocation of a token can sell tokens which are currently still locked/unvested to other users by listing them for sale.  The tokens are transferred to the VestingManager and the users releaseRate is adjusted accordingly. 
E.g. if the user has a vesting of 1,000 tokens where the vesting has 10 steps, the user will have a releaseRate of
1000 tokens /10 steps = 100 tokens / step
The issue arises if a seller unlists a vesting and since the time he listed the vesting a new step was unlocked which he claimed. Because the tokens he gets back by unlisting his vesting are distributed equally by increasing his releaseRate for his unclaimed steps, tokens which should be unlocked will be locked again.
Scenario Illustration
To prevent locking tokens which should be claimable when a vesting is unlisted, consider adding the lastStepsClaimedSeller variable listing info indicating the last step the seller has claimed when creating the listing: 
Also, an additional info about claimable tokens should be added to the vesting information:
When the seller unlists a vesting, his last stepsClaimed is compared to lastStepsClaimedSeller of the listing. If they differ, they are handled like this:
An amount of refunded tokens proportional to the steps claimed since the vesting was listed are allocated to claimableAmount of the seller and can be claimed immediately since they have been unlocked already:
claimableAmount = refundedTokens * (stepsClaimed-lastStepsClaimedSeller) / numOfSteps 
releaseRate of the seller is adjusted using the remaining refunded tokens.
calvinx (SecondSwap) commented:
Koolex (judge) commented:
