Open code423n4 opened 2 years ago
Valid Low
Disagree in this case, why would you index the amount?
Valid Low
Valid NC
Valid NC
Valid NC, and better as gas
Valid NC
It will underflow no need for check
Disagree
Valid NC
Valid NC
Valid NC
Overall pretty good report that would benefit from better formatting
2L, 7 NC
Low Risk
address(0x0)
when assigning values toaddress
state variables1.) File : contracts/contracts/Voter.sol (Line.55)
2.) File : contracts/contracts/Voter.sol (Line.56)
3.) File : contracts/contracts/Voter.sol (Line.58)
4.) File : contracts/contracts/Voter.sol (Line.59)
5.) File : contracts/contracts/PairFees.sol (Line.15)
6.) File : contracts/contracts/PairFees.sol (Line.16)
7.) File : contracts/contracts/Velo.sol (Lines.68-72)
check
account
8.) File : contracts/contracts/Gauge.sol (Lines.678-683)
check
spender
indexed
fieldsEach event should use three indexed fields if there are three or more fields
1.) File : contract/contracts/VotingEscrow.sol (Line.60)
1.) File : main/contracts/contracts/VotingEscrow.sol (Line.262)
2.) File : main/contracts/contracts/VotingEscrow.sol (Line.272)
3.) File : main/contracts/contracts/VotingEscrow.sol (Line.447)
4.) File : main/contracts/contracts/VotingEscrow.sol (Line.464)
5.) File : main/contracts/contracts/VotingEscrow.sol (Line.508)
6.) File : main/contracts/contracts/VotingEscrow.sol (Line.748)
7.) File : main/contracts/contracts/VotingEscrow.sol (Line.815)
8.) File : main/contracts/contracts/VotingEscrow.sol (Line.819)
9.) File : main/contracts/contracts/VotingEscrow.sol (Line.829)
10.) File : main/contracts/contracts/VotingEscrow.sol (Line.845)
11.) File : main/contracts/contracts/VotingEscrow.sol (Line.861)
12.) File : main/contracts/contracts/VotingEscrow.sol (Line.937)
13.) File : main/contracts/contracts/VotingEscrow.sol (Line.991)
Event is an inheritable member of a contract. An event is emitted, it stores the arguments passed in transaction logs
1.) File : contracts/contracts/Velo.sol : (Lines.17-18)
Recommended Mitigation
adding
event Mint
Code architecture, incentives, and error handling/reporting questions/issues should be resolved before deployment
1.) File : contracts/contracts/VelodromeLibrary.sol (Line.9)
2.) File : contracts/contracts/VotingEscrow.sol (Line.39)
3.) File : contracts/contracts/VotingEscrow.sol#L633 (Line.633)
4.) File : contracts/contracts/VotingEscrow.sol#L633 (Line.689)
address
mappings can be combined into a `single mapping of an address to a struct1.) File : contracts/contracts/Voter.sol (Lines.30-32)
> 0
1.) File : contracts/contracts/Velo.sol (Lines.68-72)
File : contracts/contracts/Velo.sol (Lines.60-66)
Recommended Mitigation
adding
NON CRITICAL
There are many external risks so the suggestion was it should be consider making the contracts pausable, so if in the case of an unexpected event, the admin can pause transfers.
Tool Used
Manual Review
POC
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/Pausable.sol
Recommended Mitigation Steps
Consider making contracts Pausable
1.) File : contracts/contracts/VotingEscrow.sol (Line.222-224)
Missing
@return
2.) File : contracts/contracts/VotingEscrow.sol (Lines.778-781)
Missing
@return
3.) File : contracts/contracts/VotingEscrow.sol (Lines.778-781)
Missing
@return
4.) File : contracts/contracts/VotingEscrow.sol (Lines.778-781)
Missing
@return
1.) File : contracts/contracts/Gauge.sol (Line.512)
2.) File : contracts/contracts/Gauge.sol (Line.591)
3.) File : contracts/contracts/Gauge.sol (Line.592)
4.) File : contracts/contracts/Gauge.sol (Line.613)
// SPDX-License-Identifier: MIT
for interface for removing warningSince this was
out of scope
but some of contracts was gonna do warning bout // SPDX , it better to used // SPDX for interface to remove this warn for good.Tool Used
Remix
1.) File : contracts/contracts/interfaces/IGaugeFactory.sol (1)
2.) File : contracts/contracts/interfaces/IPairCallee.sol (2)
3.) File : contracts/contracts/interfaces/IERC20.sol (3)
4.) File : contracts/contracts/interfaces/IGauge.sol (4)
5.) FIle : contracts/contracts/interfaces/IMinter.sol (5)
6.) File : contracts/contracts/interfaces/IPair.sol (6)
7.) File : contracts/contracts/interfaces/IPairFactory.sol (7)
8.) File : contracts/contracts/interfaces/IVoter.sol (8)
9.) File : contracts/contracts/interfaces/IVotingEscrow.sol (9)
10.) File : contracts/contracts/interfaces/IVelo.sol (10)
11.) File : contracts/contracts/interfaces/IRewardsDistributor.sol (11)