When a holder register his first pending stakes, the positions
function returns the zero address as holder.
positions
allows to read the position of an holder.
The function adds the pending stakes amount to the existing position of the holder.
If the position holder doesn't have an existing position but has a pending stake,
then the returned position has the zero address set as its holder.
Incorrect data is returned to the user.
Scope:
https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/LiquidationPool.sol#L83-L90
The following test can be added to liquidationPool.js
and shows the issue.
Consider setting the holder address as _position.holder
if none exists.
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.