You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
QA & gas optimizations changes are done in the PR: PaladinFinance/Paladin-Tokenomics#6
(some changes/tips were implemented, others are noted but won't be applied)
!=0
more effective than< 0
Proof of Concept:
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/HolyPaladinToken.sol#L229
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/HolyPaladinToken.sol#L385
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/HolyPaladinToken.sol#L1078
Recommended Mitigation Steps:
Change
> 0
or< 0
to!= 0
========================================================================
--
instead of- 1
Proof of Concept:
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/HolyPaladinToken.sol#L515
Recommended Mitigation Steps:
Change to:
========================================================================
Proof of Concept:
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/HolyPaladinToken.sol#L516
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/HolyPaladinToken.sol#L796
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/HolyPaladinToken.sol#L807
Recommended Mitigation Steps:
remove 0
========================================================================
Proof of Concept:
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/HolyPaladinToken.sol#L103
Recommended Mitigation Steps:
remove false
========================================================================
oof of Concept:
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/HolyPaladinToken.sol#L1271
Recommended Mitigation Steps:
========================================================================
Proof of Concept:
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/HolyPaladinToken.sol#L1194-L1195
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/HolyPaladinToken.sol#L1141-L1143
Recommended Mitigation Steps:
Change from
>=
to>
========================================================================
SafeERC20.function
for gas optProof of Concept:
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/PaladinRewardReserve.sol#L12
Recommended Mitigation Steps:
by not declaring:
and use:
========================================================================
calldata
to store struct data type can save gasProof of Concept:
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/HolyPaladinToken.sol#L451
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/HolyPaladinToken.sol#L466
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/HolyPaladinToken.sol#L482
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/HolyPaladinToken.sol#L492
Recommended Mitigation Steps:
Change from
memory
tocalldata
========================================================================
Proof of Concept:
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/open-zeppelin/utils/MerkleProof.sol#L28
Recommended Mitigation Steps:
========================================================================
The text was updated successfully, but these errors were encountered: