When a user stake and lock its position in one batch a lockID is assigned for that lock, the owner of the lockID is overridden in next batch.
In SDLPoolSecondary contract staked position [locked/normal] are sent to primary chain in a batch, handleOutgoingUpdate()
and handleIncomingUpdate()
is used to set a batch. When in a batch a user first stake a position and lock it it's lockID is set to 1. In another batch when a user first stake a position and lock it it's lockID also sets to 1. After executing each of batches if the first user of 1st batch wants to initiate unlock for his lockID i.e 1 it will revert because the owner of lockID 1 is overridden by the first user of 2nd batch. Now this address will be replaced by the first staker of 3rd batch and this process will go on.
Run this test:
Output:
Here you can see how the owner of a lock is overridden & how the first owner failed to initiate unlock his lock.
A user can lost ownership of his lock.
Manual analysis.
lockID
should be incremented by 1 for every lock.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.