Weeweepad

QuillAuditsFiles named in the report

Audit · firm’s term: audit report

QuillAudits reviewed Weeweepad on 3 Jun 2024: 16 findings, 0 critical; 15 marked fixed, 1 open.

No open critical findings
Open the reportOpen Weeweepad’s security record

Report hosted on quillaudits.com.

Trustblock does not review code.

Findings16

Statuses are the security firm’s own, from its report.

SeverityOpenAcknowledgedFixed
Critical000
High006
Medium003
Low106
HighEntire funds will be lost on the GamepadNFT contract to the null addressFixed

This is because when nfts are purchased, entire funds are immediately sent to the companyAddress.The issue here is that the companyAddress was mistakenly uninitialized in the constructor due to a coding error and therefore set to address(0). Which means all funds will be burnt or lost (sent to address(0)).

HighMalicious users can extend the redeem period of stakers due to unguarded permission issueFixed

stake function is designed to take address and amount parameters. This implementation introduces the possibility of malicious users passing stakers address with 1 wei, and repeatedly calling this for the purpose of extending the redeem period of these stakers.

HighRemoving an address will lead to unexpected behaviorFixed

Removing an address from the whitelisted addresses will set the mapping of whitelist to false, change the element in the whitelistItems[index[i]] to the last element and then delete from the whitelistIndex and whitelistItems mapping. Not updating the whitelistIndex mapping before deleting will introduce an unexpected behavior.

HighRoyaToken holders are unable to reduce approval amount of approved spendersFixed

This is a custom token contract built without the integration of the standard ERC20 contract, like the Openzeppelin library. The approve function is designed to always increase the amount of tokens a spender can spend.This introduces an issue that makes it impossible to ever reduce the amount of a spender unless the spender has exhausted their approved amount.

HighSignature replay attackFixed

The buy function requires a signature operation getting signed by the signingkey om the backend. However, it allows for signature replay attacks as users can use the same signature multiple times.

HighSome addresses will be lost and not whitelisted when multiple addresses are to be addedFixed

In addPublicRandom, it updates _addressess[val] to _addresses[arrLength - 1]. However, _addresses[arrLength - 1] was already deleted before that line. Therefore, some addresses will be lost and not get whitelisted. This will also at some point add the null address as a whitelisted address with a tier. Some addresses will be lost in the process of adding and will sometimes run into an arithmetic error due to the second loop (in a situation when provided address parameters are lesser than 32).

MediumCentralization Risks - It is possible for the pool creator to remove the entire sale token from the contractFixed

In the case where isNativeToken == false after people funds are already in the contract and sale has ended, even without minimum raise not check before removing sale token. This is possible due to removeOtherTokens() function preventing token from being fundToken but doesn't prevent token from being saleToken in the case where isNativeToken == false, making rugpull a possibility:

MediumImpossible to invoke buy function due to logic error in _beforeTokenTransfer hook functionFixed

the buy function will revert anytime a user intends to get the StakingLot or NFTStakingLot token. There is a if-condition in the the _beforeTokenTransfer hook function that is ensuring that the sender lockup period has reached and that the lastBoughtTimestamp of the sender is greater than the receiver.When users invoke the buy function, it runs until it enters the _mint function and then reverts due to the extended logic implementation on the _beforeTokenTransfer since this is called within the _mint function.It is important to stress that the logic in the _beforeTokenTransfer is flawed. Since it expects that token transfer to be enabled after the lockup period is over, the if-condition is expected to be lastBoughtTimestamp[from].add(lockupPeriod) <= block.timestamp (check lockupFree modifier).

MediumIt is possible for pool creator to prevent the protocol factory owner from setting fees on the poolFixed

The changeFeeInfoOnPool() call setFeeInfo() on the pool which requires pool not started yet, however their is not minimum cooldown time before pool starts meaning pool creator can set pool to start 2 seconds immediately pool gets created preventing protocol factory from setting fee.

LowComparison to boolean constantFixed

To detect when addresses have been whitelisted, it is compared that whitelist[addresses[i]] is not equal to the true constant value.

Show 5 more
LowDouble check will cause users to pay for extra gasFixed

These variables are only set at the constructor level within the contract. This will create a storage slot for each of the variables.

LowMissing null address checkFixed

These functions receive an address parameter in order to either modify the pool creator or the fee addresses but both fail to check that these addresses are non-zero addresses.

LowNo way to remove nativeTokens from the contract, if isNativeToken == falseFixed

removeOtherTokens() allows creator to remove other token from the contract but doesn't handle native token in the case where isNativeToken == false

LowRemove unused state variables and modifierFixed

There are some variables and modifiers declared within the contracts but were never used.

LowUnsafe ERC20 Operations should not be usedFixed

ERC20 functions may not behave as expected. For example: return values are not always meaningful. It is recommended to use OpenZeppelin's SafeERC20 library.

Contracts in scope

No deployed address is recorded for this audit.

The report names a repository or files. Open the report to see its scope.

Repository and files the report names (12)

  • RoyaToken.sol
  • RoyaReserve.sol
  • Whitelist.sol
  • StakingLot.sol
  • ots/NFTStakingLot.sol
  • Authorizable.sol
  • Pool.sol
  • PoolFactory.sol
  • lots/StakingLot.sol
  • NFTStakingLot.sol
  • GamepadNFT.sol
  • StakedRoya.sol

Part of Weeweepad’s security record

Weeweepad
Audits1 audit by 1 firmLast audit Jun 2024, by QuillAudits.
Critical findingsNo open critical findingsIn 1 report.
Open Weeweepad’s security record

Security firm

QuillAudits

350 projects reviewed · 459 reports · latest Apr 2025

See QuillAudits’s audits

Something wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.

Tell us