QA Report #554
Labels
bug
Warden finding
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
QA report
Non-critical
[N-01] Unused imports
Remove this imports:
import {IModule} from "./IModule.sol";
import {Permission} from "./IVaultRegistry.sol";
import {State} from "./IBuyout.sol";
Auction
import {IERC20} from "../interfaces/IERC20.sol";
import {IERC721} from "../interfaces/IERC721.sol";
import {IERC1155} from "../interfaces/IERC1155.sol";
import {IVault} from "../interfaces/IVault.sol";
import {IVaultRegistry} from "../interfaces/IVaultRegistry.sol";
import {IERC20} from "../interfaces/IERC20.sol";
import {IERC721} from "../interfaces/IERC721.sol";
import {IERC1155} from "../interfaces/IERC1155.sol";
Remove IProtoform.sol:L05
import {Permission} from "./IVaultRegistry.sol";
and in BaseVault.sol:L8 import theIModule
from IModule.sol,import {IModule} from "../../interfaces/IModule.sol";
[N-02] Remove
payable
castRemove unnecessary cast from
address
topayable address
:IVault(payable(_vault)).execute(supply, data, _mintProof);
IVault(payable(_vault))
toIVault(_vault)
In Migration.sol:
L37
address payable public buyout;
toaddress public buyout;
L58
buyout = payable(_buyout);
tobuyout = _buyout;
and IMigration.sol L94
function buyout() external view returns (address payable);
tofunction buyout() external view returns (address);
In VaultFactory.sol, L87:
address(vault)
tovault
[N-03] Use "" instead of
abi.encodePacked()
In VaultFactory.sol:
L40:
.cloneCreationCode(abi.encodePacked());
to.cloneCreationCode("");
L68-L69:
To
[N-04] Low accuracy when calculates
royaltyAmount
In the
FERC1155
contract theroyaltyInfo
equation have a low accuracy, only100
, add more digits in the BASE and avoid magic numbers[N-04] The
leafNodes
are limited by 6In BaseVault.sol the
_modules
are limited to total 6 leafNodes:hashes = new bytes32[](6);
[N-05] The multicall function of Multicall.sol its not payable as Uniswap Multicall
Take in mind that since multicall it's top payable you couldn't do a multicall of payable functions.
Multicall.sol
.call
en vez de.delegatecall
Low Risk
[L-01] Critical function
setContractURI
should emit eventL198
setContractURI
[L-02] Missing input validation on array lengths
On calling with arrays of different lengths various malfunctions are possible as the arrays are used as given. Recommendation is to
require
to all array match in lengthBaseVault.sol#L61-L62
BaseVault.sol#L80-L81
BaseVault.sol#L101-L104
[L-03] WETH transfer return values not checked
On SafeSend.sol#L33 the WETH.transfer() and WETH.transferFrom() functions return a boolean value indicating success. This parameter needs to be checked for success.
We recommend checking the success boolean of all .transfer and .transferFrom calls;
[L-04] Critical function
setMerkleRoot
onVault.sol
doesnt emit eventFunction
setMerkleRoot
on Vault.sol#L86-L89 should emit event[L-05] Wrong comment
more than 51%
In the
Buyout.sol#L21
contract the documentation says:/// - If a pool has more than 51% of the total supply after 4 days, the buyout is successful and the proposer
but the L211 have500
this represent more than 50%Use
510
instead of500
or change the documentation to more than 50%[L-06] Don't return
success
inexecute
functionIn Vault contract,
execute
function: Thesuccess
returned from_execute
function always will be true in other case the_execute
function reverts, even remove the returnsuccess
parameter of_execute
function[L-07] Assign the
WETH
in theconstructor
The
WETH
may change between the chains, send theWETH
address as a parameter of theconstructor
and assign it there[L-08] A malicius
plugin
onVault
could mess up with stateThe
_execute
function on Vault.sol#L115 runs adelegatecall
, after thedelegatecall
it checks if module has change theowner
on Vault.sol#L132, but a maliciusplugin
could also change the state variablemerkleRoot
,nonce
or add aplugin
adding var to the mappingmethods
and more[L-09] Royalties with high percentage
In the
FERC1155
contract the acontroller
can set a high royalty percentage with thesetRoyalties
functionAdd a require to check the max royalty percentage
[L-10] Owner has full control and can rug
By definition the owner of the contract has total control of assets and can hard rug all users, consider limit owner priviliges and or a timelock mechanism on critical assets management functions
The text was updated successfully, but these errors were encountered: