In tokenizeConviction when locked > 0 the amount is first transferred from the user using an internal call to _transfer(msg.sender, address(fairSideConviction), locked);.
It is then transferred a second time from the user in the fairSideConviction.createConvictionNFT call:
function createConvictionNFT(
address user,
uint256 score,
uint256 locked,
bool isGovernance
) external override returns (uint256) {
if (locked > 0) {
cs.locked = locked;
// steals a second time
FSD.safeTransferFrom(user, address(this), locked);
}
}
Impact
The locked balance is transferred twice from the user instead of once, stealing their balance.
Handle
cmichel
Vulnerability details
Vulnerability Details
In
tokenizeConviction
whenlocked > 0
the amount is first transferred from the user using an internal call to_transfer(msg.sender, address(fairSideConviction), locked);
. It is then transferred a second time from the user in thefairSideConviction.createConvictionNFT
call:Impact
The locked balance is transferred twice from the user instead of once, stealing their balance.
Recommended Mitigation Steps
Remove the transfer in
createConvictionNFT
.