PerlinXRewards.sol

QuantstampFiles named in the report

Quantstamp reviewed PerlinX (PerlinXRewards.sol) on 4 Aug 2020: 13 findings, 0 critical; 7 marked fixed, 6 acknowledged.

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

Report hosted on certificate.quantstamp.com.

Trustblock does not review code.

Findings13

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

SeverityOpenAcknowledgedFixed
Critical000
High002
Medium010
Low055
MediumNo minimum quorum for privilege operationsAcknowledged

The contract has multiple admins. However, one admin can change the contract parameters without the consent of others. In this case, it is preferred to introduce a minimum quorum between admins instead of having a single admin doing a change. ** 2020-08-07 update ** The Perlin team stated that they have added `treasury` address for fund-sensitive actions.

LowClone-and-OwnAcknowledged

The clone-and-own approach involves copying and adjusting open source code at one's own discretion. From the development perspective, it is initially beneficial as it reduces the amount of effort. However, from the security perspective, it involves some risks as the code may not follow the best practices, may contain a security vulnerability, or may include intentionally or unintentionally modified upstream libraries. Rather than the clone-and-own approach, a good industry practice is to use the Truffle framework for managing library dependencies. This eliminates the clone-and-own risks yet allows for following best practices, such as, using libraries. ** 2020-08-25 update **: The Perlin team considers that this is at low risk and all the problems related to it are reversible.

LowContract allows incorrect combinations of pool/synth/emp addressesAcknowledged

Currently, `listSynth` does not check if the input triple `<pool, synth, emp>` is valid; hence, it is possible to invoke `listSynth` with a pool address that has no relation to the given `synth` address, which in turn, has no relation to the given `emp` address. A similar issue occurs for `listPool`. ** 2020-08-05 update ** The Perlin team stated that: “A balance of flexibility required, since these are just lookups and future AMMs might be used where it is unknown how to verify. It is not critical if they are listed wrong. The WEB-UI will show errors and alert admin if they incorrectly added. It is then possible to overwrite by just listing again”.

LowMissing input checksAcknowledged

Functions taking an input address (`constructor`, `listSynth`, `listPool`, `addAdmin`, etc) do not check if the given input is different from `0x0`, or if in the case of an expected contract address, that the input is indeed a contract. Passing in an incorrect input address may cause temporary downtime and/or unexpected behavior. ** 2020-08-25 update **: The Perlin team considers that this is at low risk and all the problems related to it are reversible.

LowPotential division by zeroAcknowledged

On `L188`, `total` could be zero; if so, the transaction will revert and taking the snapshot will fail for all pools.

LowShould zero out a member’s rewards for an era after it is claimedAcknowledged

The function `claim` does not zero out a member’s rewards for an era. The specification stated that this should happen, and while it decreases the rewards, there is nothing that decreases the rewards mapping to a specific member. Specifically, the `mapMemberEraPool_Claim` is not zeroed out. ** 2020-08-05 update ** The Perlin team stated that: “Multiple reward assets can be claimed, eg PERL, or BAL, or in future UNI (Uniswap token). These assets are likely to be airdropped to the rewards contract and need to be claimed. Thus, must not zero out claims, since these claims need to be re-used. Instead, a new mapping mapMemberEraAsset_hasClaimed[msg.sender][era][rewardAsset] = true; Tracks whether a member has claimed for a particular reward asset or not”.

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 (1)

  • contracts/PerlinXRewards.sol

Part of PerlinX’s security record

PerlinX
Audits2 audits by 1 firmLast audit Aug 2020, by Quantstamp.
Critical findingsNo open critical findingsAcross 2 reports.
Open PerlinX’s security record

Security firm

Quantstamp

236 projects reviewed · 332 reports · latest Oct 2026

See Quantstamp’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