Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QA Report #90

Open
code423n4 opened this issue Apr 2, 2022 · 1 comment
Open

QA Report #90

code423n4 opened this issue Apr 2, 2022 · 1 comment
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax

Comments

@code423n4
Copy link
Contributor

Non-critical

Multiple unnecessary indents

Consider changing lines 798-800 of HolyPaladinToken.sol to the following code:

if(userLastIndex == currentRewardsIndex || balanceOf(user) == 0) {
	return;
}

By doing so multiple unnecessary indents can be avoided making the code easier to read.

Avoid duplicating code

Consider creating a function that sets voting power to avoid duplicating code in _moveDelegates function.

Spelling mistake in the name of the variable ellapsedTime

There is a spelling mistake in the name of the variable ellapsedTime in _getNewIndex function (lines 748 and 755). It should be called elapsedTime instead.

Function _getPastDelegate is unused

Function _getPastDelegate (present in lines 993-1023 of HolyPaladinToken.sol) in exactly the same as function getPastDelegate (present in lines 663-702 of the same file) and it is currently unused. Thus, this function should be removed.

Low

Incorrect value of kickRatioPerWeek

According to the documentation, the penalty of the locked balance after a lock is expired is 1%, but in HolyPaladinToken.sol:97 it is defined to be 10%.

@code423n4 code423n4 added bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax labels Apr 2, 2022
code423n4 added a commit that referenced this issue Apr 2, 2022
@Kogaroshi
Copy link
Collaborator

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Projects
None yet
Development

No branches or pull requests

2 participants