Petobots

Petobots Smart Contract Audit Report

Share
Share
BlastBlast
DeFi Staking
BlastBlast
DeFi Staking

QuillAudits audited the Petobots smart contracts on Blast between Jun 27, 2024 and Jul 6, 2024. The audit found 16 issues: 4 medium, 7 low, 5 informational, of which 12 resolved and 4 acknowledged.

Project Description

Petobots is an NFT-based GameFi project where players collect robotic pets and use them to clash in PvP and PvE battles. Games are available both with wagers and free-to-play mode. Players need a Petobot NFT to receive an in-game character that can be leveled up and improved. However, it is possible to test the gameplay with a default character by simply connecting with MetaMask or WalletConnect.

Timeline

S1
Jun 27, 2024
S2
Jul 6, 2024

Scope of Audit

The scope of this audit was to analyze Staking codebase for quality, security, and correctness.

Methodology: the QuillAudits smart contract audit process.

speedometer
0
50%
60%
70%
90%
100%
97.3%
AUDIT SCORE
icon

High

Medium

Low

Informational

open0000
acknowledged0103
partially resolved0000
resolved0372

Medium Severity Issues

Risk of centralization in blast functions

Acknowledged
arrow-right
Description

Contracts have owners with privileged rights to perform admin tasks and need to be trusted to not perform malicious updates or drain funds. The functions configureBlastPoints, configureBlastYieldModes, claimYieldAll, and claimGas have significant control and could be exploited if not properly secured.

Contract

StakingContractBlast contract

Recommendation

• Implement multi-signature requirements for critical functions to reduce the risk of a single point of failure.
• Consider using a decentralized governance model to manage administrative privileges.

Inefficient storage and retrieval of accounts and deposit IDs with scope of DoS attack

Resolved
arrow-right
Description

The code currently uses arrays to store _accounts and _depositIds, which leads to inefficient operations such as checking if an account exists (_accountExists function) and retrieving all deposits for an account. This inefficiency can lead to a Denial of Service (DoS) attack when the length of _accounts becomes large, causing functions that loop through the array to consume excessive gas and potentially fail.

Contract

StakingContractBlast contract

Recommendation


• Replace the _accounts and _depositIds arrays with Enumerable from OpenZeppelin.
• Update functions to utilize these sets for efficient storage and retrieval, reducing the risk of DoS attacks due to gas limitations.

Scope of Reentrancy in withdraw function

Resolved
arrow-right
Description

The _token.transfer call should be moved to the end of the withdraw function to follow best practices and avoid reentrancy issues. The nonreentrant guard is used but still there might be a global reentrancy and it is best practice to follow check effect interaction pattern.

Contract

StakingContractBlast contract

Recommendation

 Move _token.transfer call to the end of the withdraw function after all state changes are made.

Probable Hash collisions in deposit ID generation using abi.encodePacked

Resolved
arrow-right
Description

The code uses abi.encodePacked for generating the depositId, which might lead to hash collisions. Using abi.encode is more appropriate in this context.

Contract

StakingContractBlast contract

Recommendation

• Replace abi.encodePacked with abi.encode when generating depositId.
• Ensure no hash collisions and test thoroughly.
OR
• Use a _deposits_counter instead of block.number to generate unique deposit IDs.

Low Severity Issues

Informational Issues

Appendix

Disclaimer

Petobots

Petobots

Medium Severity Issues
Low Severity Issues
Informational Issues
Appendix
Disclaimer
View Report PDF

Get an Audit done today for your Smart Contract

Join 1500+ leaders who secured themselves from losing Billion Dollars

cta-banner
cta-banner-bgcta-banner-bg-mobile

Related audits

WE SECURE EVERYTHING YOU BUILD.

From day-zero risk mapping to exchange-ready audits, QuillAudits helps projects grow with confidence. Smart contracts, dApps, infrastructure, compliance: secured end to end.

QuillAudits Logo


ISO 27001Circle Alliance Program
Uniswap FoundationAethiropt-collectivePolygon SPNBNB Chain Kickstart

All Rights Reserved. © 2026. QuillAudits - LLC