issues
search
code-423n4
/
2022-01-xdefi-findings
0
stars
0
forks
source link
issues
Newest
Newest
Most commented
Recently updated
Oldest
Least commented
Least recently updated
Redundant type casting
#150
code423n4
closed
2 years ago
2
_pointsPerUnit not always updated
#149
code423n4
closed
2 years ago
1
Change `pointsCorrection` to `uint256` can save gas
#148
code423n4
closed
2 years ago
2
`XDEFIDistribution.sol#_toInt256Safe()` Validation of input value can be done earlier to save gas
#147
code423n4
closed
2 years ago
1
Unused storage variables
#146
code423n4
closed
2 years ago
2
Using shift operators can save gas
#145
code423n4
closed
2 years ago
2
Unused named returns
#144
code423n4
closed
2 years ago
2
Use of assert() instead of require()
#143
code423n4
closed
2 years ago
2
Unsafe type casting
#142
code423n4
opened
2 years ago
2
`XDEFIDistribution.sol#lock()` Validation of `amount_` can be done earlier to save gas
#141
code423n4
closed
2 years ago
1
Insufficient input validation on `multipliers`
#140
code423n4
closed
2 years ago
2
`_zeroDurationPointBase` can potentially be exploited to get more scores
#139
code423n4
opened
2 years ago
2
`merge()` can cause `lock` to fail due to tokenId collision
#138
code423n4
closed
2 years ago
1
setLockPeriods accepts multipliers less than 100 (1x mult)
#137
code423n4
closed
2 years ago
3
Avoid inline code for better readibility
#136
code423n4
opened
2 years ago
2
Newly added rewards will get frozen when a `unlock()` transaction get in between before `updateDistribution()`
#135
code423n4
closed
2 years ago
1
Rewards can be stolen by re-entering into `updateDistribution`
#134
code423n4
closed
2 years ago
1
Locks can be denied
#133
code423n4
closed
2 years ago
2
`merge` can fail due to tokenId collisions
#132
code423n4
closed
2 years ago
1
`updateDistribution` can be frontrun
#131
code423n4
closed
2 years ago
1
Gas: `XDEFIDistribution:withdrawableOf()` optimization
#130
code423n4
closed
2 years ago
2
Implicit casts should be explicit as per the global code style
#129
code423n4
opened
2 years ago
2
&& operator can use more gas
#128
code423n4
opened
2 years ago
3
better placement of require check
#127
code423n4
closed
2 years ago
1
Lack of input validation of arrays
#126
code423n4
closed
2 years ago
2
Adding unchecked directive can save gas
#125
code423n4
closed
2 years ago
2
`MAX_TOTAL_XDEFI_SUPPLY` Use constant variable can save gas
#124
code423n4
closed
2 years ago
2
`XDEFIDistribution.sol#relock()` Implementation can be simpler and save some gas
#123
code423n4
opened
2 years ago
3
Gas optimization in XDEFIDistribution.sol - shifting instead of multiplying or dividing by power of 2
#122
code423n4
opened
2 years ago
3
Gas optimization in XDEFIDistribution.sol - inlining some functions
#121
code423n4
opened
2 years ago
1
Gas optimization in XDEFIDistribution.sol - variable that is not used
#120
code423n4
opened
2 years ago
3
Gas optimization in XDEFIDistribution.sol - calculate a constant expression before the loop
#119
code423n4
closed
2 years ago
2
NFT token id repeated
#118
code423n4
closed
2 years ago
1
Can not change the ownership of the contract XDEFIDistribution
#117
code423n4
closed
2 years ago
2
Sub-optimal calls should be allowed instead of reverted as resending the transaction will cost more gas
#116
code423n4
opened
2 years ago
3
Constants are not explicitly declared
#115
code423n4
opened
2 years ago
2
Attacker can frontrun `updateDistribution()` and use flashloan to steal newly added XDEFI rewards
#114
code423n4
closed
2 years ago
2
gas optimization in
#113
code423n4
closed
2 years ago
1
gas optimization in function _generateNewTokenId(uint256 points_) internal view returns (uint256 tokenId_) {
#112
code423n4
closed
2 years ago
1
gas optimization in function _generateNewTokenId(uint256 points_) internal view returns (uint256 tokenId_) {
#111
code423n4
closed
2 years ago
1
arrays sizes may not be matching in function "setLockPeriods(uint256[] memory durations_, uint8[] memory multipliers)"
#110
code423n4
closed
2 years ago
2
gas optimization at _updateXDEFIBalance() function.
#109
code423n4
closed
2 years ago
1
gas optimization in
#108
code423n4
closed
2 years ago
1
Unnecessary checked arithmetic in for loops
#107
code423n4
closed
2 years ago
2
Critical operations should emit events
#106
code423n4
closed
2 years ago
2
`XDEFIDistribution.sol#noReenter()` Switching between 1, 2 instead of 0, 1 is more gas efficient
#105
code423n4
closed
2 years ago
2
`XDEFIDistribution.sol#constructor()` Validation of `XDEFI_` can be done earlier to save gas
#104
code423n4
closed
2 years ago
2
gas optimization
#103
code423n4
opened
2 years ago
3
Gas: `> 0` is less efficient than `!= 0` for unsigned integers
#102
code423n4
closed
2 years ago
2
Field bonusMultiplier of struct Position can be removed
#101
code423n4
opened
2 years ago
3
Previous
Next