PS.io #2

CertiKCode version: not recorded (see the report)

CertiK reviewed Project SEED (PS.io #2) on 29 Mar 2023: 27 findings, 1 critical; 16 marked fixed, 1 acknowledged, 10 open.

1 critical finding, fixed
Open the reportOpen Project SEED’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings27

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

SeverityOpenAcknowledgedFixed
Critical001
High010
Medium103
Low9012
MediumUnsafe Mathematical OperationsOpen

The pointed mathematic operations have the potential risk to overflow or to divide by zero at runtime, because of the usage of the raw arithmetic "+", "*" and "/". This could lead to unexpected behaviors and incorrect outputs, above all with inputs and variable that are near to their maximum/minimum representable value. Moreover, when compiling for a production release through the `--release` flag, the default configuration of the compiler is to remove all the math validations that are, instead, made when compiling in debug/test mode. As a result, the final artifact deployed on-chain may have a different behavior with mathematical operations.

LowGeneric Error HandlingOpen

The pointed error code are generic and are used for handling different kind of errors.

LowInconsistent commentsOpen

Comments at the pointed lines report numbers about accounts ordering in contexts, but some are missing or not consistent with the current codebase.

LowInefficient Account Space AllocationOpen

The `Sell` account has a total required size of `72` plus the variable bytes to be assigned to the dynamic `String`s fields as shown below: ```rust pub struct Sell { pub authority: Pubkey, //32 pub mint_address: String,//4+length of string in bytes pub price: u64, //8 pub uri: String,//4+length of string in bytes pub serial_number: u64, //8 pub collection: String,//4+length of string in bytes pub owner: String, //4+length of string in bytes pub timestamp: i64,//8 } ``` The required space is far less than the space value specified at the init time, currently set at `10000`. Since extra memory is reserved, it may lead to an unnecessary higher rent to be paid. [Reference](https://book.anchor-lang.com/anchor_references/space.html)

LowMissing Event EmissionOpen

In the `staking` program, the `init_staking`, `stake`, `unstake`, and `claim_rewards` instruction modify the program state and cause token transfers. Such instruction should emit events as notifications to users, since transaction logs parsing is the main way to detect on-chain events.

LowReduce Using `unwrap()` in Production CodebaseOpen

In rust, `unwrap` is used to directly the result of a function execution or to terminate program execution if such execution was not successful. In particular, when the unwrapped brings a failure, a `panic` is thrown out and no further error handling mechanism is adopted. Throwing out a panic may not always be desired in the production codebase since the lack of an error handling mechanism reduces the robustness of the program and, in the specific case of Solana programs, users or external application can not automatically obtain a quick feedback on why the requested instruction failed. The code at the pointed location uses `unwrap` instead of managing the possible error condition that may arise.

LowSimplifiable Error HandlingOpen

The error handling code can be simplified using the `require` macro. Ref. [Anchor Book](https://book.anchor-lang.com/anchor_in_depth/errors.html)

LowUnnecessary `let` BindingOpen

Code at the pointed location unnecessarily declares and assign a value to a variable or a variable to another variable when the right value can be directly used for subsequent purposes.

LowUnused Dependency and LogicOpen

The marketplace program (named dapp) has "input" instruction but no "action" instructions; in other words, users can add data to the program by setting `Sell` PDAs with information about an NFT and its selling price but this PDA has no direct usage in the program and there is no reference to external usage by other program or system. Moreover, the declaration of unused packages like the Metaplex crate, suggest some missing implementation about the core functionalities of the program.

LowUnused ParametersOpen

The linked parameters are required as instruction inputs but are never used in the functions.

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.

Part of Project SEED’s security record

Project SEED
Audits2 audits by 1 firmLast audit Apr 2023, by CertiK.
Critical findings3 open critical findingsReported in “PS.” by CertiK, Apr 2023. Not marked fixed in that report.
Open Project SEED’s security record

Security firm

CertiK

1,045 projects reviewed · 1,376 reports · latest May 2025

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