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 #893

Open
code423n4 opened this issue Aug 1, 2022 · 0 comments
Open

QA Report #893

code423n4 opened this issue Aug 1, 2022 · 0 comments
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

[L-01] Remove floating pragma

Locking the pragma will make sure that the contract does not get deployed using outdated compiler versions.

File:
2: pragma solidity ^0.8.11;

https://github.com/code-423n4/2022-07-golom/blob/main/contracts/governance/GolomToken.sol

[NC-01] Remove comments from previous debug tests

Comments with console.logs should be removed from the codebase.

File: contracts/rewards/RewardDistributor.sol
99: //console.log(block.timestamp,epoch,fee);

https://github.com/code-423n4/2022-07-golom/blob/main/contracts/rewards/RewardDistributor.sol

[NC-02] Avoid returning a tuple if a function returns only one item

File: contracts/rewards/RewardDistributor.sol
function traderRewards(address addr) public view returns (
        uint256
        ){
    uint256 reward = 0;
    for (uint256 index = 0; index < epoch; index++) {
        reward =
            reward +
            (rewardTrader[index] * feesTrader[addr][index]) /
            epochTotalFee[index];
    }
    return (reward);
}

https://github.com/code-423n4/2022-07-golom/blob/main/contracts/rewards/RewardDistributor.sol#L254-L264

[N-03] Inconsistent spacing for else keyword

Add a spacing before and after the else keyword

File: contracts/rewards/RewardDistributor.sol#L194
194: }else{

https://github.com/code-423n4/2022-07-golom/blob/main/contracts/rewards/RewardDistributor.sol#L194

[N-04] Remove unused state variables

State variables that are not used inside the contract should be removed.

File: contracts/core/GolomTrader.sol
72: address public governance;

https://github.com/code-423n4/2022-07-golom/blob/main/contracts/core/GolomTrader.sol#L72

[N-05] Convert public functions not consumed by the contract to external

File: contracts/core/GolomTrader.sol
279: function fillBid(

312: function cancelOrder(Order calldata o) public nonReentrant {

334: function fillCriteriaBid(

https://github.com/code-423n4/2022-07-golom/blob/main/contracts/core/GolomTrader.sol

File: contracts/rewards/RewardDistributor.sol
98: function addFee(address[2] memory addr, uint256 fee) public onlyTrader {

141: function traderClaim(address addr, uint256[] memory epochs) public {

155: function exchangeClaim(address addr, uint256[] memory epochs) public {

172: function multiStakerClaim(uint256[] memory tokenids, uint256[] memory epochs) public {

215: function stakerRewards(uint256 tokenid) public view returns (

254: function traderRewards(address addr) public view returns (

296: function exchangeRewards(address addr) public view returns (

https://github.com/code-423n4/2022-07-golom/blob/main/contracts/rewards/RewardDistributor.sol

@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 Aug 1, 2022
code423n4 added a commit that referenced this issue Aug 1, 2022
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

1 participant