You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The credit is accrued twice in award.
The first accrual happens implicitly when calling _mint through the ControlledToken(controlledToken).controllerMint call which then performs the PrizePool.beforeTokenTransfer hook which accrues credit.
Then the explicit accrual is done again. It should be enough to only add the extraCredit without doing another accrual (calling _updateCreditBalance(..., newBalance= _applyCreditLimit(controlledToken, controlledTokenBalance, uint256(creditBalance.balance).add(credit).add(extra))) instead).
The text was updated successfully, but these errors were encountered:
Handle
cmichel
Vulnerability details
The credit is accrued twice in
award
.The first accrual happens implicitly when calling
_mint
through theControlledToken(controlledToken).controllerMint
call which then performs thePrizePool.beforeTokenTransfer
hook which accrues credit.Then the explicit accrual is done again. It should be enough to only add the
extraCredit
without doing another accrual (calling_updateCreditBalance(..., newBalance= _applyCreditLimit(controlledToken, controlledTokenBalance, uint256(creditBalance.balance).add(credit).add(extra)))
instead).The text was updated successfully, but these errors were encountered: