code-423n4 / 2024-05-olas-validation

0 stars 0 forks source link

no check on return value of approve #282

Open c4-bot-5 opened 4 months ago

c4-bot-5 commented 4 months ago

Lines of code

https://github.com/code-423n4/2024-05-olas/blob/main/tokenomics/contracts/staking/DefaultTargetDispenserL2.sol#L191 https://github.com/code-423n4/2024-05-olas/blob/main/tokenomics/contracts/staking/DefaultTargetDispenserL2.sol#L290

Vulnerability details

Impact

Detailed description of the impact of this finding. Here there is no check for the approve function.THere should be some check on that.

Proof of Concept

Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept. function approve(address spender, uint256 amount) external returns (bool);

@>> IToken(olas).approve(target, amount);

Tools Used

Recommended Mitigation Steps

use safeapprove instead of approve.

Assessed type

Context