31042 - [SC - High] Claiming alchemic-token rewards can fail for so...
Description
Description
function claim(
uint256 tokenId,
address token,
address alchemist,
uint256 amount,
address recipient
) external override {
// ----------------------- Code above is omitted for brevity
// Get the deposits for the recipient
(, address[] memory deposits) = IAlchemistV2(alchemist).accounts(recipient);
IERC20(token).approve(alchemist, amount);
// Only burn if there are deposits <-- wrong check, we should only burn if there is "debt"
amountBurned = deposits.length > 0 ? IAlchemistV2(alchemist).burn(amount, recipient) : 0;
// ----------------------- Code below is omitted for brevity
}Impact Details
Proof of Concept
Previous31008 - [SC - High] Alcx rewards are permanently frozen when two to...Next31071 - [SC - Critical] User can steal bribes and prevent other users f...
Last updated
Was this helpful?