balances
mapping of SDLPool.sol contract is not updated in SDLPoolSecondary contract which results outdated state stored in the mapping.
In SDLPool.sol contract there is a mapping: mapping(address => uint256) internal balances;
which is used in SDLPoolSecondary contract to store the total number of locked stake a user has. When _mintQueuedNewLocks()
is called this mapping increases the number of lockId for that user by 1. But after unlocking the number is not decreased which results an outdated state in that mapping.
Run this test:
Output:
You can see lockIDs is not updated after unlocking.
It will be a issue if the balances
mapping is used to do any operation.
Manual analysis
Decrease the element of mapping by 1 after unlocking a locked state.
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.