QA Report #128
Labels
bug
Something isn't working
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
QA reports (low/non-critical)
Contest: Sturdy
Autor: Rotcivegaf
Scope:
Non-critical
[NC-01] Unused function parameter / Unused local variable
ConvexCurveLPVault.sol, L154
GeneralVault.sol, L136
LidoVault.sol, L91
LidoVault.sol, L109
LidoVault.sol, L140
[NC-02] GeneralVault contract to abstract contract
Change the GeneralVault contract to abstract contract to avoid the deploy by mistake and define the functions without implementation:
processYield
replace{}
to;
pricePerShare
replace{}
to;
_depositToYieldPool
replace{}
to;
_withdrawFromYieldPool
replace{}
to;
_getWithdrawalAmount
replace{}
to;
The
withdrawOnLiquidation
(L136) function only returns the_amount
parameter, avoid the implementation to avoid mistakes and that the inherited contract implements it[NC-03] Missing documentation
In some functions/variables missing documentation:
[NC-04]
In GeneralVault, the
depositCollateral
(L75) function:The
safeApprove
of_stAsset
should call inside this function and just beforedeposit
and no in the_depositToYieldPool
Remember
import SafeERC20
library andusing SafeERC20 for IERC20;
[NC-05] Unused import
In CollateralAdapter, the
import {ILendingPool} from '../../interfaces/ILendingPool.sol';
is unusedIn GeneralVault, the
import {ILendingPool} from '../../interfaces/ILendingPool.sol';
is unusedIn YieldManager, the
import {IPriceOracleGetter} from '../../interfaces/IPriceOracleGetter.sol';
,import {ISwapRouter} from '../../interfaces/ISwapRouter.sol';
,import {TransferHelper} from '../libraries/helpers/TransferHelper.sol';
are unusedLow
[L-01]
withdrawOnLiquidation
only returns_amount
The contract LidoVault heredit from GeneralVault the function
withdrawOnLiquidation
but dont reimplement it, an user can use this function by mistake esperando withdraw a collateralImplement it with a revert to avoid mistake calls
[L-02] OPEN TODO
GeneralVault.sol, L77: There is an open
TODO
and don't understand what it mean[L-03] Comment function
GeneralVault.sol, L148: The function
convertOnLiquidation
its commentedThe text was updated successfully, but these errors were encountered: