Octopus Info
9 brains. 3 hearts. One system. OctopusAI was born from a strange pattern. When AI systems were asked to choose their favourite animal, one answer kept returning: the octopus. A symbol of intelligence, adaptability, memory, and evolution. That idea became OctopusAI — an AI ecosystem built for the crypto trenches. OctopusAI reads charts, scans tokens, tracks wallets, generates memes, remembers conversations, and powers intelligent mining infrastructure designed to fuel the network as it evolves. Built to learn. Built to adapt. Built for the future of crypto AI.
TrustNet Score
The TrustNet Score evaluates crypto projects based on audit results, security, KYC verification, and social media presence. This score offers a quick, transparent view of a project's credibility, helping users make informed decisions in the Web3 space.
Real-Time Threat Detection
Real-time threat detection, powered by Cyvers.io,
is currently not
activated
for this project.
This advanced feature provides continuous monitoring and instant alerts to safeguard your assets from potential security threats. Real-time detection enhances your project's security by proactively identifying and mitigating risks.
For more information, click here.
Summary and Final Words
No crucial issues found
The contract does not contain issues of high or medium criticality. This means that no known vulnerabilities were found in the source code.
Contract owner cannot mint
It is not possible to mint new tokens.
Contract owner cannot blacklist addresses.
It is not possible to lock user funds by blacklisting addresses.
Contract owner cannot set high fees
The fees, if applicable, can be a maximum of 25% or lower. The contract can therefore not be locked. Please take a look in the comment section for more details.
Contract cannot be locked
Owner cannot lock any user funds.
Token cannot be burned
There is no burning within the contract without any allowances
Ownership is renounced
The contract does not include owner functions that allow post-deployment modifications.
Contract is not upgradeable
The contract does not use proxy patterns or other mechanisms to allow future upgrades. Its behavior is locked in its current state.
Scope of Work
This audit encompasses the evaluation of the files listed below, each verified with a SHA-1 Hash. The team referenced above has provided the necessary files for assessment.
The auditing process consists of the following systematic steps:
- Specification Review: Analyze the provided specifications, source code, and instructions to fully understand the smart contract's size, scope, and functionality.
- Manual Code Examination: Conduct a thorough line-by-line review of the source code to identify potential vulnerabilities and areas for improvement.
- Specification Alignment: Ensure that the code accurately implements the provided specifications and intended functionalities.
- Test Coverage Assessment: Evaluate the extent and effectiveness of test cases in covering the codebase, identifying any gaps in testing.
- Symbolic Execution: Analyze the smart contract to determine how various inputs affect execution paths, identifying potential edge cases and vulnerabilities.
- Best Practices Evaluation: Assess the smart contracts against established industry and academic best practices to enhance efficiency, maintainability, and security.
- Actionable Recommendations: Provide detailed, specific, and actionable steps to secure and optimize the smart contracts.
A file with a different Hash has been intentionally or otherwise modified after the security review. A different Hash may indicate a changed condition or potential vulnerability that was not within the scope of this review.
Final Words
The following provides a concise summary of the audit report, accompanied by insightful comments from the auditor. This overview captures the key findings and observations, offering valuable context and clarity.
Smart Contract Audit Statement
Audit Scope
This statement covers the third-cycle security re-audit of the OctopusAI Mining Solana staking program, reviewing audit_package_v5 against the prior re-audit. Users deposit $OCTOPUS and earn a stated 19% APY from a pre-loaded reward pool; entries and exits carry a 0.3% fee split 40% burn / 40% revenue-share / 20% treasury; and a 24-hour lock applies between requesting and claiming an unstake.
Note - This audit consists of a security analysis of the OctopusAI Mining Solana program source. This analysis did not include economic analysis of the project's tokenomics, and only the main program was audited. On-chain bytecode was not independently fetched or verified. We recommend investors do their own research before investing.
Files and details
Findings and Audit result
high Issues | 2 findings
Resolved
#1 high Issue
Re-stake reward inflation: last_claim_at not reset when stake is added to an active position
A larger staked_amount could previously harvest APY over a pre-existing window because last_claim_at was pinned at first-stake time.
Resolved
#2 high Issue
distribute does not advance last_claim_at, enabling a double payment via claim_rewards
claim_rewards previously re-paid a window that distribute had already covered.
medium Issues | 2 findings
Resolved
#1 medium Issue
USDC deposit path is structurally unreachable
The previously advertised USDC path could never succeed against the octopus-only vault.
Resolved
#2 medium Issue
Centralized authority with no pause, timelock, or two-step transfer
A single hardcoded ORACLE controls every privileged instruction with no emergency pause, no timelock, and no two-step transfer. With distribute removed and the program reportedly renounced, the prior reward-pool drain vector is closed; user-deposit principal remains protected by the staking vault's PDA authority.
low Issues | 9 findings
Resolved
#1 low Issue
APY math final as u64 cast is unchecked
claim_rewards computed reward in u128 and then downcast with a plain `as u64`, which could silently truncate. The checked conversion now fails on any value exceeding u64::MAX.
Acknowledged
#2 low Issue
Missing overflow-checks = true in [profile.release]
Release builds default to overflow-checks = false.
Resolved
#3 low Issue
mine_account is not closed after full unstake; rent is permanently locked
After claim_unstake the MineAccount previously remained on-chain with staked_amount = 0, leaving roughly 0.00134 SOL of rent locked per user.
Acknowledged
#4 low Issue
Canonical bumps for vault PDAs are not stored
Anchor recomputes the canonical bump on every call, which is correct but wastes compute.
Resolved
#5 low Issue
Missing token::mint constraints on user / fee-wallet token accounts
Several token accounts previously lacked an explicit token::mint = octopus_mint constraint.
Acknowledged
#6 low Issue
Transitive RUSTSEC advisories via the Solana 1.18.26 SDK
2 vulnerabilities (curve25519-dalek RUSTSEC-2024-0344, ed25519-dalek RUSTSEC-2022-0093) and 8 unmaintained/unsound warnings (atty x2, bincode, derivative, libsecp256k1, paste, borsh 0.9.3, rand 0.7.3).
Resolved
#7 low Issue
Reward solvency keyed to RewardPool.balance bookkeeping field instead of live vault balance
This is not exploitable for theft, since the SPL transfer still caps every payout at the real balance, but tokens sent to the reward vault outside inject_rewards previously became unwithdrawable, and pool.balance was the sole security boundary and could desync from the live vault balance.
Resolved
#8 low Issue
Re-stake silently forfeits unclaimed accrued rewards
start_mining resets last_claim_at = now on re-stake, so re-staking an active position without first claiming discards all accrued rewards. v5 surfaces the discarded amount in an event field instead of preventing the loss.
Resolved
#9 low Issue
Re-stake liveness coupling: cannot add to a position while the reward pool cannot cover pending rewards
An interaction between the v4 re-stake guard and the InsufficientRewardPool gate degraded the availability of the add-to-position flow under reward-pool underfunding. Removing the guard eliminates the coupling.
optimization Issues | 4 findings
Resolved
#1 optimization Issue
ClaimUnstake account fields are not boxed
ClaimUnstake previously kept plain Account fields.
Acknowledged
#2 optimization Issue
Sequential token transfers in fee-split paths
The fee split requires multiple CPIs.
Acknowledged
#3 optimization Issue
Doc-markdown lint on mine_account reference
clippy::doc_markdown fires on an unbackticked identifier.
Resolved
#4 optimization Issue
mine_account uses bare Account instead of Box; stack-overflow framing is inaccurate
Boxing was inconsistent on the most account-heavy context.
informational Issues | 12 findings
Resolved
#1 informational Issue
TREASURY_PCT is declared but never used
TREASURY_PCT = 20 was previously unused.
Acknowledged
#2 informational Issue
SECONDS_PER_YEAR uses 365 days instead of 365.25
The denominator is 365 days.
Resolved
#3 informational Issue
STABLE_FEE_BPS marketed as 0.345% but is 0.35%
STABLE_FEE_BPS = 35 (0.35%) was previously commented as 0.345%.
Acknowledged
#4 informational Issue
Interactions-then-Effects ordering in token-moving instructions
CPIs precede state writes.
Acknowledged
#5 informational Issue
Magic number 100 used as percent denominator
The literal 100 remains in two divisions inside split_fee.
Acknowledged
#6 informational Issue
init_if_needed Anchor feature is enabled
init_if_needed is used on mine_account.
Acknowledged
#7 informational Issue
OCTOPUS_MINT is currently the devnet test mint
The constant previously decoded to the devnet test mint; in v5 it is the mainnet mint while the oracle and fee wallets remain devnet keys.
Acknowledged
#8 informational Issue
Missing doc comments on public instruction handlers and account structs
There are no /// docs on most public items.
Acknowledged
#9 informational Issue
RewardPool.authority is stored but redundant with the hardcoded ORACLE constraint
The oracle gate on inject_rewards is indirect, relying on the value written at pool init.
Acknowledged
#10 informational Issue
Rewards keep accruing while an unstake is pending; no cancel-unstake path
There is no drain beyond normal APY emission, but the lifecycle is undocumented and start_mining is blocked while a request is pending.
Resolved
#11 informational Issue
distribute payout amount is decoupled from the time-weighted accrual it now resets
The two reward mechanisms (discretionary distribute and formulaic claim_rewards) shared a marker without a shared formula; distribute has since been removed.
Acknowledged
#12 informational Issue
Delivered package ships stale audit artifacts and an AUDIT_UPDATE.md that omits all v4 changes
Traceability/process issue: the change log and committed audit artifacts do not reflect the v5 source. Not a program vulnerability, but it can mislead reviewers about what is actually deployed.