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
2. Slight change in protocol design can save lots of gas paid for by users: function _updateDropPerSecond() is called with almost every interaction with the contract. This function adds minimum 2k gas to 6 different functions called by users and also on every transfer of tokens. Consider using a function that updates drop per second separately and allow anyone to call it, reward those who call it with a successful update with a small (slightly more than the price of gas) incentive, maybe in the native token. This will utilize MEV to the protocols advantage. https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/HolyPaladinToken.sol#L713-L742
The text was updated successfully, but these errors were encountered:
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)
1. Can use stricter visibility: public constant variables can be set as private as code is open source and they are also in the docs
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/HolyPaladinToken.sol#L17-L39
2. Slight change in protocol design can save lots of gas paid for by users: function _updateDropPerSecond() is called with almost every interaction with the contract. This function adds minimum 2k gas to 6 different functions called by users and also on every transfer of tokens. Consider using a function that updates drop per second separately and allow anyone to call it, reward those who call it with a successful update with a small (slightly more than the price of gas) incentive, maybe in the native token. This will utilize MEV to the protocols advantage.
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/HolyPaladinToken.sol#L713-L742
The text was updated successfully, but these errors were encountered: