Open code423n4 opened 2 years ago
Disagree with the finding
Valid NC
Valid NC
Valid NC
Valid Low
Valid NC
Valid NC
Valid NC
Valid NC
Valid NC (dead code)
Valid Low
Disagree as those are meant to be used one-off by msg.sender (deployer EOA)
Neat short and sweet report
2 L, 8 NC
QA reports (low/non-critical)
Contest: Velodrome
Autor: Rotcivegaf
Scope:
Native Token:
Pair:
Emissions:
Voting:
Governance:
Redemption(WeVE -> VELO):
:star: = Areas of concern :heavy_check_mark: = Audited Contract :white_check_mark: = Semi-Audited Contract(< 100%)
Non-critical
[N-01] Use standard libraries
Use
@openzeppelin
or@rari-capital/solmate
to clarify code avoid mistake and don't repeat logic, PLEASE[N-02] Use the same indentation for all files
Some files different spaces identation like Bribe.sol
[N-03] Missing error messages in require statements
[N-03] Reuse code
There are many function what used in many contracts like
_safeTransfer
or_safeTransferFrom
, or even theReentrancyGuard
logic, move the repeated logic to a contract/library and heredit/use of it[N-04] Assert to require
Use
require
statement instead ofassert
, and add a error message[N-05] Event is missing
indexed
fieldsEach
event
should use threeindexed
fields if there are three or more fieldsGauge.sol:
Deposit
indexed intokenId
Withdraw
indexed intokenId
RewardsDistributor.sol:
Claimed
indexed intokenId
Voter.sol:
Voted
indexed intokenId
Abstained
indexed intokenId
Deposit
indexed intokenId
Withdraw
indexed intokenId
Attach
indexed intokenId
Detach
indexed intokenId
VotingEscrow.sol:
Deposit
indexed intokenId
Withdraw
indexed intokenId
PairFactory.sol:
PairCreated
indexed inpair
[N-06] Function
view
topure
In Bribe.sol, L35-L49,
getEpochStart
: function state mutability can be restricted topure
[N-07] Function
_clearApproval
not emit theApproval
event in VotingEscrow.sol, L246Low
[L-01] OPEN TODOs
There are open
TODOs
, fix theyVotingEscrow.sol, lines 314, 465, 524: what means "add delegates" Minter.sol, L11: "decide on whether to abstract from VELO or not. currently it's only somewhat abstracted (e.g. L38)" VelodromeLibrary.sol, L09: "make modifiable?"
[L-02] Remove
decimals
VotingEscrow.sol, L125: The ERC721 standard not use a
decimals
variable, this is used in ERC20 standard[L-03] Miss
_from
and_to
notaddress(0)
requireVotingEscrow.sol, L301: The function
_transferFrom
should have a_from
/_to
notaddress(0)
check[L-04] The
Minter
not implementsVelo
functionsThe Minter contract not implements the
setMinter
andsetRedemptionReceiver
function from the Velo contract Remove this function or implements in the Minter contract