code-423n4 / 2022-04-xtribe-findings

2 stars 0 forks source link

QA Report #97

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Issue #1 (Low) - Floating pragma

Contracts contain a floating pragma. It is recommended to deploy all contracts with a single, specific compiler version to reduce the risk of compiler-specific bugs and contracts deployed with different versions. In the case of the forked contacts, I recommend deploying with the exact version that the current live versions were deployed with.

https://github.com/fei-protocol/xTRIBE/blob/989e47d176facbb0c38bc1e1ca58672f179159e1/src/xTRIBE.sol#L4 https://github.com/fei-protocol/ERC4626/blob/643cd044fac34bcbf64e1c3790a5126fec0dbec1/src/xERC4626.sol#L4 https://github.com/fei-protocol/flywheel-v2/blob/77bfadf388db25cf5917d39cd9c0ad920f404aad/src/token/ERC20Gauges.sol#L3 https://github.com/fei-protocol/flywheel-v2/blob/77bfadf388db25cf5917d39cd9c0ad920f404aad/src/token/ERC20MultiVotes.sol#L4

Issue #2 (Low) - Comment vs code conflict

This comment indicates that rewards are calculated and sent to flywheel core, but the funds are not actually sent.

https://github.com/fei-protocol/flywheel-v2/blob/77bfadf388db25cf5917d39cd9c0ad920f404aad/src/rewards/FlywheelGaugeRewards.sol#L213

Issue #3 (Low) - Claiming rewards does not update rewards balance automatically

User calls claim() but reward balance does not update within function. They will only receive the reward balance at the time of the last accrue(). Would it be feasible to add the accrue() functions at the beginning of the claim() call?

https://github.com/fei-protocol/flywheel-v2/blob/77bfadf388db25cf5917d39cd9c0ad920f404aad/src/FlywheelCore.sol#L119