The MineBean contract is an ERC20 token with a capped supply, a minter role, and an integrated Time-Weighted Average Price (TWAP) oracle based on Uniswap V4. The audit identified a critical misconfiguration risk in the TWAP oracle's price calculation, high centralization risks due to owner privileges, and potential vulnerabilities related to the TWAP window and transfer restrictions. While the contract leverages well-audited OpenZeppelin and Uniswap V4 libraries, the custom logic for oracle configuration and transfer controls introduces significant security concerns that require immediate attention.
On-chain security analysis — is it a scam or legit?
Is MineBean Safe?
Not verified
This record has not gone through deep verification and is not being monitored. The score is a dated snapshot — the token’s risk can change at any time.Own this token? Put it under verification →The MineBean contract is an ERC20 token with a capped supply, a minter role, and an integrated Time-Weighted Average Price (TWAP) oracle based on Uniswap V4. The audit identified a critical misconfiguration risk in the TWAP oracle's price calculation, high centralization risks due to owner privileges, and potential vulnerabilities related to the TWAP window and transfer restrictions.
Read the full analysis- Mintable supply — no cap found, dilution unbounded
- Top-10 concentration > 30%
- Liquidity < $50k
Exact factors
- Mintable supply — no cap found, dilution unbounded
- Top-10 concentration > 30% (88.2% total → 36.3% effective; 1.6% in EOAs, 86.6% in contracts — moderate)
- Liquidity < $50k ($30,472 across 4 pairs — thin market)
Security Checklist
as of audit · Sep 4Holders
as of audit · Sep 4, 2026- Contractstreasury, vesting, bridge, staking86.6%
- Walletsanonymous holders, free to sell1.6%
- Everyone elsethe rest of the supply11.8%
How holder types affect the score
Share held by contracts — treasury, vesting, bridge or staking — is discounted against share held by wallets when the score is computed: a contract cannot decide to sell the way an anonymous holder can, though it can still be drained or voted to sell. Effective concentration is the figure the risk score is actually calculated from.
Holder balances as recorded by the audit of Sep 4, 2026
Liquidity
as of audit · Sep 4The LP tokens of the analysed pool are locked or burned.
0xeb5c…8be50x7a66…d2720x2bb3…bff60xd1c7…4a280x0eab…73f20xb525…ae5e0xf5d2…23970x8876…74e90xb270…9f6fNo privileged address appears among these holders: the unlocked liquidity sits with independent providers, not with the deployer.
Security Findings
MediumIrreversible removeLimits Function
Not confirmed by static analysis (the model's own reading of the source).M-01
removeLimits FunctionIssue
Not confirmed by static analysis (the model's own reading of the source). The removeLimits function, callable by the owner, permanently sets the limited flag to false. This action is irreversible and disables the require(_isBean[to] || _isBean[from], "Not Allowed"); check within the _update function. This restriction is intended to control transfers involving AMM pools. Removing this limit permanently could have unintended consequences if the project's long-term strategy requires re-enabling such controls or if the initial restriction was critical for specific economic models.
Fix
If the limited flag is intended to be a configurable setting that might need to be toggled, consider making it reversible. If it is a one-time transition, ensure that the implications of permanently removing this restriction are fully understood, documented, and align with the project's long-term vision. Clearly communicate this irreversible action to users and stakeholders.
Status
Unresolved
MediumAmbiguous _isBean Whitelist in _update
Not confirmed by static analysis (the model's own reading of the source).M-02
_isBean Whitelist in _updateIssue
Not confirmed by static analysis (the model's own reading of the source). The _update override includes a conditional require(_isBean[to] || _isBean[from], "Not Allowed"); when limited is true and neither from nor to is excluded. The _isBean mapping is populated only once during the constructor with a fixed list of addresses. This design implies that only explicitly whitelisted 'Bean' addresses or excluded addresses can interact with AMM pools when limited is true. This could lead to unexpected transfer failures for legitimate users who are not on these lists, hindering liquidity provision, trading, or general token utility.
Fix
Clarify the exact purpose and scope of the _isBean whitelist. If it's intended to restrict AMM interactions, ensure that all legitimate participants (e.g., liquidity providers, traders) can be added to this list or that the restriction is clearly communicated. Consider if this restriction is truly necessary or if it introduces unnecessary friction and complexity for users.
Status
Unresolved
MediumTWAP Not Ready for Extended Periods
Not confirmed by static analysis (the model's own reading of the source).M-03
Issue
Not confirmed by static analysis (the model's own reading of the source). The getOracleTWAP function reverts with TWAPNotReady if fewer than 5 snapshots have been recorded. If AMM interactions (transfers to/from the pool) are infrequent or the MIN_SNAPSHOT_INTERVAL is too long, the TWAP oracle might not be ready for extended periods. This could prevent dependent protocols from functioning correctly, accessing a reliable price feed, or executing critical operations that rely on the TWAP.
Fix
Assess the expected frequency of AMM interactions and adjust MIN_SNAPSHOT_INTERVAL and the number of required snapshots accordingly to ensure the TWAP is consistently available. Consider implementing a fallback mechanism or a grace period for protocols consuming the TWAP, or allow for a TWAP calculation with fewer than 5 snapshots (e.g., using the available average) if the staleness risk is acceptable for the use case.
Status
Unresolved
MediumIncorrect beanIsToken0 Assignment in setPoolId
Not confirmed by static analysis (the model's own reading of the source).M-04
beanIsToken0 Assignment in setPoolIdIssue
Not confirmed by static analysis (the model's own reading of the source). The setPoolId function, which configures the Uniswap V4 pool for TWAP calculations, unconditionally sets beanIsToken0 = false. This assumes that the Bean token will always be token1 in any configured pool. If the actual pool created via PoolManager.initialize() has Bean as token0, the getTWAPAmountOut function will perform an inverted price calculation, leading to severe economic exploits, incorrect pricing, and potential loss of funds for users or protocols relying on this oracle.
Fix
The beanIsToken0 flag must be correctly determined based on the actual PoolKey provided. Modify setPoolId to compare address(this) with _poolId.token0 or _poolId.token1 to accurately set beanIsToken0. For example: beanIsToken0 = address(this) == _poolId.token0;.
Status
Unresolved
MediumHigh Centralization Risk via Owner Privileges
Not confirmed by static analysis (the model's own reading of the source).M-05
Issue
Not confirmed by static analysis (the model's own reading of the source). The contract uses the Ownable pattern, granting the deployer (owner) exclusive control over critical functions such as setMinter, freezeMinter, removeLimits, and setPoolId. A compromised owner key or a malicious owner could lead to unauthorized minting (by setting a malicious minter), disabling essential transfer restrictions, or misconfiguring the core oracle, posing a single point of failure and significant trust risk.
Fix
Consider implementing a multi-signature wallet (e.g., Gnosis Safe) for the owner address to require multiple approvals for critical operations. For highly sensitive functions like freezeMinter or removeLimits, explore integrating a time-lock mechanism or a decentralized governance process to introduce a delay and community oversight.
Status
Unresolved
MediumShort TWAP Window Susceptible to Manipulation
Not confirmed by static analysis (the model's own reading of the source).M-06
Issue
Not confirmed by static analysis (the model's own reading of the source). The getOracleTWAP function calculates the Time-Weighted Average Price using a simple arithmetic mean of only 5 tick snapshots. While MIN_SNAPSHOT_INTERVAL (6 blocks) provides some delay between updates, a short window of 5 snapshots makes the TWAP more susceptible to manipulation. An attacker could potentially influence a significant portion of the snapshots within a relatively short period, leading to a manipulated TWAP price that could be exploited by dependent protocols.
Fix
Increase the number of snapshots used for the TWAP calculation (e.g., 10-20 or more) to provide a longer averaging window, making manipulation more costly and difficult. Additionally, evaluate if a longer MIN_SNAPSHOT_INTERVAL or a more robust averaging method (e.g., weighted average, median) would enhance resilience against price attacks.
Status
Unresolved
LowGas Inefficiency in _updateTickSnapshot Trigger
Not confirmed by static analysis (the model's own reading of the source).L-01
_updateTickSnapshot TriggerIssue
Not confirmed by static analysis (the model's own reading of the source). The _updateTickSnapshot function is triggered on every transfer to or from an AMM pool via the _update override. While MIN_SNAPSHOT_INTERVAL prevents actual state updates frequently, the block.number check and the extsload call to poolManager.getSlot0(poolId) still execute on every such transfer. The extsload operation can be gas-intensive, potentially adding unnecessary gas costs to AMM-related transfers even when no snapshot update occurs.
Fix
Evaluate the gas cost impact of the extsload call on every AMM interaction. If significant, consider optimizing the trigger condition for _updateTickSnapshot to only call getSlot0 when a snapshot update is actually due, or explore alternative mechanisms for updating snapshots, such as a dedicated keeper bot, to offload this cost from user transactions.
Status
Unresolved
Analysis
AI Copilotas of audit · Sep 4The contract utilizes robust OpenZeppelin ERC20 and Uniswap V4 libraries for core functionalities (7.2 Code Security). The TWAP oracle mechanism incorporates a MIN_SNAPSHOT_INTERVAL to prevent rapid updates (7.4 Economic). However, a critical flaw exists in the setPoolId function where beanIsToken0 is unconditionally set to false, potentially leading to inverted price calculations if BEAN is token0 in the actual pool (7.6 External). The TWAP relies on a short 5-snapshot window, making it susceptible to manipulation (7.4 Economic). Additionally, the _update override's _isBean whitelist could cause unexpected transfer failures for users interacting with AMM pools (7.3 Access Control).
The contract implements a MAX_SUPPLY and a minter role, providing a controlled token issuance mechanism (7.4 Economic). The owner can freezeMinter and removeLimits, which are one-way actions, enhancing predictability once executed (7.8 Operations). However, the Ownable pattern grants the deployer extensive control over critical parameters, including the minter, transfer limits, and pool configuration, posing a high centralization risk (7.3 Access Control). The removeLimits function permanently disables a transfer restriction, which could have unintended long-term consequences (7.5 Governance).
The contract is not designed as an upgradeable proxy. Therefore, it does not introduce any upgrade-specific risks (7.7 Upgrades). Any changes to the contract's logic would require a new deployment and migration of assets.
Address the critical beanIsToken0 misconfiguration in setPoolId by dynamically determining or validating the token order.
Implement robust access control mechanisms, such as a multi-signature wallet or time-locks, for sensitive owner-controlled functions to mitigate centralization risks. Re-evaluate the TWAP oracle's window size and snapshot interval to enhance its resilience against manipulation. Clarify and refine the _isBean whitelist logic to ensure it aligns with intended token utility and user experience.
Contract & Record
Free for any token on the record. It links to this page and always shows the current score and the date it was checked.
- Sep 4, 202636Medium
- Jul 23, 202682High
- Jul 23, 202686Critical
Score changes are recorded as dated snapshots — history is append-only and cannot be edited.
Would You Like a More Detailed Audit of MineBean?
Our AI-powered scanner gives you a deeper, real-time smart contract analysis — free, with every scoring factor shown.
Get Detailed Audit Is this your token? Add your links and get it Verified