Few vulnerabilities were found examining the contracts. The main concerns are with standard token methods such as transfer(), mint() or burn() not being implemented properly
The presence of an assert statement was also found, which is bad practice for functions that can be called by external users.
Most of the contracts are using uint as an alias for uint256. For readability, it is best practice to use uint256
transfer function should return a boolean
IMPACT
transfer() and transferFrom() should return a boolean. It can be confusing when some functions are expected to return something and others are silent.
SEVERITY
Low
PROOF OF CONCEPT
Instances include:
vToken.sol
vToken.sol:76
vToken.sol:81
IvToken.sol
IvToken.sol:24
IvToken.sol:48
TOOLS USED
Manual Analysis
MITIGATION
Add a return boolean to these functions
assert statement should not be used
IMPACT
Properly functioning code should never reach a failing assert statement. If it happened, it would indicate the presence of a bug in the contract. A failing assert uses all the remaining gas, which can be financially painful for a user.
QA Report
Table of Contents
summary
transfer function should return a boolean
IMPACT
transfer()
andtransferFrom()
should return a boolean. It can be confusing when some functions are expected to return something and others are silent.SEVERITY
Low
PROOF OF CONCEPT
Instances include:
vToken.sol
IvToken.sol
TOOLS USED
Manual Analysis
MITIGATION
Add a return boolean to these functions
assert statement should not be used
IMPACT
Properly functioning code should never reach a failing assert statement. If it happened, it would indicate the presence of a bug in the contract. A failing assert uses all the remaining gas, which can be financially painful for a user.
SEVERITY
Low
PROOF OF CONCEPT
Instances include:
IndexLogic.sol
TOOLS USED
Manual Analysis
MITIGATION
Replace the assert statement with a require statement or a custom error
mint and burn missing zero address check
IMPACT
mint()
andburn()
should check that_recipient
is not the zero address.SEVERITY
Low
PROOF OF CONCEPT
Instances include:
BaseIndex.sol
TOOLS USED
Manual Analysis
MITIGATION
Add a zero address check before performing the
delegatecall
Uint256 alias
IMPACT
uint
is an alias foruint256
.It is better to use uint256: it brings readability and consistency in the code, and it future proofs it in case of any changes to the alias of uint
SEVERITY
Non-Critical
PROOF OF CONCEPT
Instances include:
BaseIndex.sol
AssetInfo.sol
IndexLayout.sol
IndexLogic.sol
ManagedIndex.sol
ManagedIndexReweightingLogic.sol
PhutureIndex.sol
PhuturePriceOracle.sol
TopNMarketCapIndex.sol
TopNMarketCapIndexReweightingLogic.sol
TrackedIndex.sol
TrackedIndexReweightingLogic.sol
UniswapV2PathPriceOracle.sol
UniswapV2PriceOracle.sol
vToken.sol
TOOLS USED
Manual Analysis
MITIGATION
replace
uint
withuint256