BNB Smart Chain Launchpad — Full Protocol, Economic and Application Security Assessment
Both halves of that sentence matter, and they point in opposite directions. The two verdicts on the cover carry different scopes for that reason. Read this section before the score.
A third deployment (Factory 0x4380…5c8d, Portal 0x7e22…410b) was opened to launches and the second was closed to new ones (launchesOpen = false, 51 launches created on it). The addendum in section 08 reviews it. The change is small and it is on the sell path:
STX-H01 STX-H02 STX-H03 STX-H04 STX-H05 STX-M04 STX-M01 STX-M02 STX-M05 STX-M07 STX-M08 STX-M03 STX-L01 STX-L03 STX-L04 STX-L05 STX-L06 STX-L07
Five go further than recommended: STX-H01, STX-H05, STX-M03, STX-M04 and STX-L06. Three are partial: STX-H02 and STX-H04, both resting on the 2-of-2 Safe, and STX-M05, disclosure only.
STX-M06 STX-L10 STX-I05
STX-M06, the absence of a purchase cap, was declined and is recorded as the project’s decision. STX-L10 and STX-I05 are new in v1.2, from the third deployment’s Portal.
STX-M09 STX-L02 STX-L08 STX-L09 STX-I04
Frontend, backend and documentation items this review did not revisit. None is a contract finding.
All fourteen successor contracts publish verified sources, which made a full source diff against the audited baseline possible. Four of the five High findings are fully closed — STX-H01, STX-H03, STX-H05 and STX-M04 (rated High) — and STX-H04 is substantially addressed by moving the privileged layer to a Gnosis Safe. No High-severity finding is left open. STX-M06, a declined purchase cap, remains open of the original findings; STX-L10 and STX-I05 are new in v1.2.
One severity was revised down during the engagement. STX-H02 moved from High to Medium once the successor Factory owner was verified on-chain as a Gnosis Safe 1.5.0, threshold 2 of 2, with no modules and no guard. A single compromised key can no longer transfer ownership, which lowers likelihood; the impact and the dynamic reserveAdmin() resolution are unchanged, which is why it is reduced rather than closed. The identifier is kept stable, as with STX-M04 and STX-M03.
The Native BNB Burn vault type was removed from the build entirely. This is a fast and substantive response to the engagement: in five places the team chose the harder, more correct fix over the one proposed.
Sections 03 to 06 assess the first deployment, pinned at block 132 974 260, which the operator has since retired and whose Floor Reserve vaults now hold 0.002587 WBNB in total. The second deployment (12 November 2026) was verified by differential review and carries 51 launches; it is now closed to new launches. The third deployment (28 November 2026) is open to launches, none has been created yet, and it differs from the second by one contract: its review is the addendum in section 08. Two loose ends remain on the first deployment and are named in section 00.
It is a differential review against a fully audited baseline, not a fresh adversarial audit, and that distinction is load-bearing. Every byte of the successor is either identical to code audited in full in this engagement, or sits in a diff that was read line by line. On top of that:
eth_getCode. 14 of 14 match. The only masked regions are compiler-declared immutables and link references, every CBOR metadata block — including the one inside each vault factory's embedded vault creation code — and the library's own PUSH20 delegatecall guard. None of those can carry logic.simpleTokenImplementation() and taxTokenImplementation().The application layer was re-tested on 12 November 2026 and now clears. STX-H05 is closed in the deployed bundle and STX-M08’s headers are live on both the shell and /assets/, with the CSP running report-only. Section 07 records what each fix does.
What the GO does not cover. Emergent interaction between unchanged code and its new context, which a diff cannot surface; fresh economic modelling of the new V3Locker liquidity cap; the backend, which remains closed source; and the five frontend, backend and documentation items not re-examined. STX-C01 and STX-H02 remain open and are accepted, not closed — the operator can still withdraw every floor reserve, and that capability still transfers in one step.
The two token implementations were also read beyond the finding they close. Four construction details are recorded in the appendix as observations, not findings of this engagement.
All fifteen audited addresses have changed. The operator states the legacy build is retired and no longer serves launches, and the chain is consistent with that: its Factory still lists 16 launches against the successor’s 2, and its eight Floor Reserve vaults now hold 0.002587 WBNB in total and nothing else.
Correction to an earlier figure in this report. At block 132 974 260 those vaults were recorded as holding ≈ 2.598 BNCB, 0.00156 WBNB and 0.000413 NVDAB. Re-read at block 133 184 184 the BNCB and NVDAB reserves are gone, confirmed by both balanceOf and each vault’s own reserve(). How they left could not be established. Log enumeration is unavailable on the endpoints reachable here — a control scan over the same range, for a vault with a demonstrably non-zero balance, returned zero events — so no inference is drawn, in either direction, about whether withdrawReserve was used or the reserves were migrated.
Two loose ends remain on the legacy deployment, and both are cheap to close. launchesOpen() still returns true, so the retired Factory would still accept a new launch; and its owner() is still the original single EIP-7702 key 0x9Cf1e0bf…354c20B rather than the Safe. The application also still carries this deployment in its pinned allowlist, so its launches remain tradeable through the interface. Closing launchesOpen and moving that owner would finish the retirement.
9.0 / 10 scores the protocol as it runs today, the second and third deployments, against the severities as rated in this report. The audited baseline measured 6.0; the figure was revised once 18 of the 27 original findings were verified remediated and the two conditions this report attached were closed and checked in production. The findings in sections 04 and 05 are not withdrawn — they are the audit record, and each carries its status on the current build.
The rating that carries the figure. STX-C01 is rated Informational at the project's request, because the capability is publicly disclosed. Nothing about the capability changed, and the successor vault and its factory are byte-identical to the audited ones: the operator can withdraw 100% of every floor reserve, with no cap, no delay and no token burn. A reader who weighs impact rather than disclosure should read 8.0, and should read the STX-C01 finding in section 05 before relying on either number.
The score describes the protocol as it runs today, the second and third deployments. It was revised up from the 6.0 measured on the audited baseline once 18 of the 27 original findings were verified remediated, including every one that put user funds directly at risk. Section 05 remains the audit record, each finding with its status on the current build.
Provisional — a differential review against a fully audited baseline plus production verification, not a fresh adversarial pass. It scores the severities as rated: no Critical, every High closed or substantially addressed, one declined Medium open. STX-C01 is Informational on disclosure grounds, not impact — weighed on impact, read 8.0. Section 00 sets out why.
Severity as found in the audit. Within each band the faded share is closed on the successor build, the solid share is what remains — open, partially addressed, accepted, or not re-examined.
All fifteen in-scope contracts are deployed, source-verified and byte-for-byte consistent with their published sources; none is a proxy; and the launch tokens are unusually clean. The protocol's risk is not in its token code — it is concentrated in one externally-owned key and in one vault type.
The Admin Floor Reserve vault presents accumulated tax to holders as backing, and floorPrice() publishes it. A single function moves the entire reserve anywhere, with no cap, no delay and no token burn. The capability is openly disclosed by the contract, the API and the documentation — but disclosure is not a control, and the eight instances are immutable, so this cannot be fixed in code for the funds already at risk.
One account owns the Factory, Portal, Tax Processor, V3 Locker and all six vault factories, with no multisig, no timelock and no role separation. It is an EIP-7702 delegation to an 11 185-byte contract that was outside this audit's scope. The realistic threat is single-key compromise, after which recovering the key does not recover the capability. This is the one finding remediable today with no new code.
An uninitialised pool's initialize() is callable by anyone — verified live on all three exposed launches. Set the price off-target, add a small single-sided position, and when an innocent buyer completes the curve, graduation defers into a state with a 2% recovery budget and no abort path. Up to 16 BNB frozen permanently, and every holder's position becomes untransferable.
The protocol publishes a Lens contract as its read interface and the frontend never calls it: for vault flows the app takes the vault address from its own API and uses it as the approve spender. The trading path does this correctly against the chain — the pattern is known, simply not applied where an approval is at stake. A frontend fix, no contract change.
The launch tokens have no mint function, no blacklist, no pause and no fee setter, and ownership is irreversibly renounced. The bonding curve survived property testing with no rounding-extraction or free-token path, and curve parameters are snapshotted per launch so no owner can retroactively re-price a live market. The V3 liquidity locker's permanence is actually enforced by the absence of any principal-moving code path. On the wallet side: exact-amount approvals rather than unlimited, real slippage limits and deadlines, pre-submission simulation, a last-moment chain check, and no typed-data or permit surface at all — which structurally removes the two most common causes of wallet-user loss.
Verification was pinned to block 132 974 260, with live re-checks through block 136 241 661.
cancun, viaIR false), and the result compared after masking immutables, library placeholders and the trailing metadata hash. All 15 matched. No target is a proxy.Clones, TickMath, V3SpotQuote, BnbLiquidityAmounts. FixedPointMathLib verified as unmodified Solady with its nine called functions reviewed individually.Portal.stateDetails), never from a factory address. All 12 deployed instances byte-compared against source. All 16 launches enumerated and state-checked; all are EIP-1167 clones of the two audited implementations.eth_call simulation for reachability; 8 property and boundary tests over the live curve parameters at 256 fuzz runs each; exact integer modelling of the deployed curve arithmetic and of live concentrated-liquidity state. No attack was executed against the live protocol./api/*.The admin key's delegate is unaudited (11 185 bytes at 0x63c0c19a…7dae32b), so the true capability set of the key owning the protocol is unknown. Backend source is not public. Event history could not be enumerated reliably — free log endpoints cap ranges and, more seriously, return partial results without error; three scans of the same range returned 12, 15 and 13 events against a known 16. Every log-derived statement is therefore a lower bound corroborated by state reads, and absence cannot be proven. Four of six vault types have no deployed instance.
None remains unconfirmed. Three identifiers carry a severity that differs from their letter — STX-M04 (now High) and STX-M03 (now Low), moved by validation, and STX-H02 (now Medium), moved once the successor owner was verified as a multisig. Identifiers are kept stable so cross-references stay valid. Severity follows the engagement’s defined scale, not CVSS. Two findings, STX-L10 and STX-I05, were added in v1.2.
Costed against the audited baseline, before any of it was built. The 16 that needed a full redeployment are the reason the project shipped a new deployment rather than patching; most of them are now closed on it.
| ID | Title | Severity | Live exposure | Primary contract | Successor build |
|---|---|---|---|---|---|
| STX-C01 | Centralisation risk, publicly disclosed — the admin can withdraw 100% of every floor reserve without burning a token | Info | ● Live | StoxesBnbAdminFloorReserveVault | By design |
| STX-H01 | Anyone can permanently lock a Simple launch's graduation, freezing funds and all holder positions | High | ● Live | StoxesBnbGraduator | Fixed + |
| STX-H02 | Drain rights over every vault follow Factory ownership, which transfers in one unguarded step | Medium | ● Live | StoxesBnbAdminFloorReserveVault / OwnableLite | Partial |
| STX-H03 | Curve-to-V3 price conversion collapses to the floor for any quote with fewer than 18 decimals | High | ● Latent | StoxesBnbPortalMath | Fixed |
| STX-H04 | One EIP-7702 delegated EOA holds every privileged capability in the protocol | High | ● Live | 15 contracts + 8 funded vaults | Partial |
| STX-H05 | The address users approve for vault operations comes from the API, not from the chain | High | ● Live | Frontend / backend API | Fixed + |
| STX-M04 | The permissionless buyback can be sandwiched atomically, diverting most of the intended burn | High | ● None | StoxesBnbBuybackBurnVault | Fixed + |
| STX-M01 | Permissionless TWAP checkpoint reset halts all tax distribution and buy-and-burn | Medium | ● Live | StoxesBnbTaxProcessor | Fixed |
| STX-M02 | Tax allocations apply to the post-protocol remainder, so the advertised split is not what holders receive | Medium | ● Live | StoxesBnbPortalMath | Fixed |
| STX-M05 | Admin test launches carry an arbitrary graduation target and are invisible to the canonical read path | Medium | ● Live | StoxesBnbFactory | Partial |
| STX-M06 | No purchase cap permits atomic single-transaction capture of 80% of supply | Medium | ● Live | StoxesBnbPortal | Open |
| STX-M07 | Rotating the proof signer lets the owner redirect any Gift vault's entire balance | Medium | ● None | StoxesBnbGiftVault / Factory | Fixed |
| STX-M08 | The application shell and its JavaScript ship with no CSP and no framing or MIME protections | Medium | ● Live | Frontend hosting | Fixed |
| STX-M09 | Injected-provider selection has no EIP-6963 support and falls back to a bare window.ethereum | Medium | ● Live | Frontend | Not checked |
| STX-M03 | The fee-conversion floor permits a small atomic sandwich when fees are left to accrue | Low | ● Live | StoxesBnbV3Locker | Fixed + |
| STX-L01 | tx.origin used as the accounting key | Low | ● Live | StoxesBnbPortal | Fixed |
| STX-L02 | Quote donated to a pending V2 pair is swept to the treasury | Low | ● Live | StoxesBnbGraduator | Not checked |
| STX-L03 | Sub-wei rounding asymmetry in the capped-buy branch | Low | ● Live | StoxesBnbPortal | Fixed |
| STX-L04 | The two graduation triggers coincide exactly, leaving no tolerance — and already diverge on one quote | Low | ● Live | StoxesBnbPortal / LibCurve | Fixed |
| STX-L05 | finalize can revert PriceOutOfBand on an in-band price, with no retry path | Low | ● Live | StoxesBnbGraduator | Fixed |
| STX-L06 | A Tax token's transferability depends on its vault hook never reverting | Low | ● Latent | StoxesBnbRenounceableTaxToken | Fixed + |
| STX-L07 | The Lens omits the two fields an integrator needs to warn users | Low | ● Live | StoxesBnbLens | Fixed |
| STX-L08 | All chain reads are proxied through the operator's own origin | Low | ● Live | Frontend | Not checked |
| STX-L09 | launch-gate discloses privilege status for arbitrary addresses | Low | ● Live | Backend API | Not checked |
| STX-L10 | The integrator Portal credits any token balance above the curve inventory to the first caller of sell | Low | ● Latent | StoxesBnbAuditedIntegratorPortal | New · open |
| STX-I02 | Commission rate is derived inversely from the tax rate | Info | ● None | StoxesBnbRenounceableTaxToken | By design |
| STX-I03 | The deployment has no upgrade path, so almost every fix requires a full redeployment | Info | ● None | Whole deployment | By design |
| STX-I04 | Availability coupling and minor documentation defects | Info | ● Live | Frontend / docs | Not checked |
| STX-I05 | The Portal hard-codes a supply of 1e9 tokens, so sell correctness now depends on every token's supply | Info | ● None | StoxesBnbAuditedIntegratorPortal | New · open |
Each finding appears once, under the contract that holds its root cause, with every other affected component named. Deployment notes state what each fix actually requires — the binding constraint in an immutable system.
Rated Informational because the project publicly discloses this capability — in the vault's own description(), in the factory's tokenCreationPolicies(), in the API as capability: admin_managed, and on the documentation site as “Platform-admin operated”. This is not an allegation of concealment, and no misuse was observed on-chain. The rating reflects disclosure, not impact: the capability is unchanged and unbounded, and a reader who weighs impact independently should treat it as a Critical centralisation risk. Each Floor Reserve vault accumulates a share of its launch's trading tax and presents it to holders as backing: floorPrice() returns reserve divided by circulating supply. A single function moves the entire reserve to any destination with no cap, no delay and no token burn, collapsing that floor to zero while every holder keeps tokens whose claim is now worthless. The capability is openly disclosed by the contract, the API and the documentation — a deliberate design, not a hidden backdoor — and no misuse was found.
The capability is unbounded for every launch that uses this vault type. Correction to an earlier figure in this report: at block 132 974 260 the eight legacy Floor Reserve vaults were recorded as holding ≈ 2.598 BNCB, 0.00156 WBNB and 0.000413 NVDAB. Re-read at block 133 184 184 they hold 0.002587 WBNB in total and nothing else — the BNCB and NVDAB reserves are gone, confirmed by both balanceOf and each vault’s own reserve(). The mechanism could not be established. Log enumeration is unavailable on the endpoints reachable here: a control scan over the same range, for a vault with a demonstrably non-zero balance, returned zero events, so absence of events is not evidence of absence of transfers. withdrawReserve is the only path that moves reserve out without a burn, but whether it was used, and whether the funds were migrated to the successor deployment or sent elsewhere, is not established by state reads alone and is not asserted here. On the successor deployment the vault and its factory are byte-identical, so the capability is carried forward unchanged.
StoxesBnbFactory.owner() — at the audited block 0x9Cf1e0bf…354c20B.withdrawReserve(attackerControlled, vault.reserve()).Remove the capability, or bound it with a 7-day queue, a 10% per-request cap and a holder veto so holders can redeem at the pre-withdrawal floor. Independently, rename floorPrice() — a vault whose backing is revocable should not publish a function by that name.
uint256 public constant WITHDRAW_DELAY = 7 days;
uint16 public constant MAX_WITHDRAW_BPS = 1_000; // 10% of reserve per request
function queueWithdrawReserve(address recipient, uint256 amount) external {
if (msg.sender != reserveAdmin()) revert NotReserveAdmin();
super.ping();
if (amount > accountedQuote * MAX_WITHDRAW_BPS / 10_000) revert InvalidWithdrawal();
queued = PendingWithdrawal(recipient, amount, uint64(block.timestamp + WITHDRAW_DELAY));
emit WithdrawalQueued(recipient, amount, queued.readyAt);
}
/// @notice Any holder may cancel a queued withdrawal.
function cancelWithdrawal() external {
if (IAdminFloorToken(token).balanceOf(msg.sender) == 0) revert NotReserveAdmin();
delete queued;
}Not fixable in code for the eight live instances — each is immutable. A new vault factory protects future launches only. The only controls available today are moving the owner key behind a multisig (STX-H04) and winding the affected launches down by funding redeem.
By design Carried forward unchanged — vault and factory are byte-identical
The canonical V3 pool is created early and deliberately left uninitialised, and an uninitialised pool's initialize() is callable by anyone — verified live against all three exposed launches. Set the price off-target, add a modest single-sided position, and when an innocent buyer later completes the curve, graduation defers into a state whose only recovery is a swap capped at 2% of one side with its direction frozen at the moment of failure. No cancel, sweep or admin override exists anywhere in the system.
Up to 16 BNB of curve reserve plus the unsold token allocation, frozen permanently. Because the token stays in its migrating phase, every holder's position becomes untransferable and unsellable — total loss for holders. Attacker cost ≈ 0.32 BNB; they gain nothing, so this is griefing, not theft.
simplePool(token, quote).pool.initialize(sqrtPriceX96) far outside the ±1% band — one transaction, any time during the curve.beginSimple defers and the assets move into the Graduator.finalizeGraduation burns part of the 2% budget and fails. Once exhausted, recovery returns false forever.Claim the price slot at reservation so no third party can ever set it; fail loudly instead of deferring into a dead end when a tampered pool carries third-party liquidity; and give the deferred state an abort path that returns assets and reopens the curve.
// prepareSimplePool: claim the price slot now, while liquidity is still zero.
(uint160 sqrtP,,,,,,) = IUniswapV3PoolMinimal(pool).slot0();
if (sqrtP == 0) {
IUniswapV3PoolMinimal(pool).initialize(
StoxesBnbPortalMath.sqrtPriceFromCurve(
IStoxesBnbPortal(portal).curvePrice(token),
IERC20Decimals(quote).decimals(), token < quote));
}
// beginSimple: a tampered, funded pool must abort the buy, not park the launch.
if (IUniswapV3PoolMinimal(pool).liquidity() != 0) {
revert PoolTampered(pool, _poolSqrt(pool), expected,
IUniswapV3PoolMinimal(pool).liquidity());
}Requires a v3 deployment (the Graduator is an immutable in the Portal). Operational mitigation available today: pre-initialise the canonical pool of every existing and future Simple launch at the correct curve price from a protocol-controlled address — one transaction per launch, permanently effective.
Fixed + Atomic at-price initialisation, abort paths, finalize now reverts
reserveAdmin() is not a stored address — it resolves at call time from tokenFactory.owner(). Whoever is Factory owner at the moment of the call can drain every Floor Reserve vault ever deployed. transferOwnership is a single transaction with no two-step acceptance, no timelock and no delay. Severity reduced from High to Medium after the successor deployment moved Factory ownership to a multisig; the identifier is kept stable for cross-reference, as with STX-M04 and STX-M03.
Unchanged in magnitude: the same funds as STX-C01, transferable to an arbitrary address in one transaction, and the recipient keeps the capability even if the original keys are recovered. Holders still cannot verify who controls their backing by inspecting their own vault. What changed is likelihood, not impact, which is why this is now Medium rather than High.
transferOwnership approved by both.reserveAdmin() on every vault now resolves to the new owner.The compensating control is real and is recorded as such. Verified on-chain at block 133 184 184: the successor Factory owner is a Gnosis Safe 1.5.0, threshold 2 of 2 owners, with no modules enabled and no transaction guard. A single compromised key can no longer move ownership, and that is the reason this finding is no longer High.
It does not close the finding, for three reasons. Two signers reviewing the same proposed payload is one check performed twice, not two independent checks — a wrong destination address presented identically to both is the documented failure mode behind several large multisig losses. 2-of-2 has no fault tolerance: lose or lose control of either key and governance ends permanently, and because reserveAdmin() resolves dynamically there is then no path to reassign drain rights. And the dynamic resolution itself is untouched, so a single governance mistake remains total rather than recoverable.
Priority order, revised. Raising the threshold off 2-of-2 to an m-of-n with fault tolerance, and adding a transaction guard or timelock in front of configuration, is pure Safe configuration, needs no contract change, and is worth more than anything below it. Pinning the vault admin at construction is next, because it turns an invisible transferable capability into one fixed per launch that a holder can audit once. Two-step ownership is the lowest-value item of the three under a multisig and should not displace either: a Safe already forces deliberation on the transfer, which is most of what two-step buys.
// Highest value, and no Solidity at all: Safe configuration
// threshold 2-of-2 -> 3-of-5 (survives one lost or compromised key)
// add a transaction guard, or route configuration through a timelock
// Next: pin the admin so the capability cannot follow ownership silently
address public immutable reserveAdminFixed;
function reserveAdmin() public view returns (address) { return reserveAdminFixed; }
// Lowest priority under a multisig, but correct if the layer is rebuilt anyway
function transferOwnership(address newOwner) external virtual onlyOwner {
if (newOwner == address(0)) revert ZeroAddress();
_pendingOwner = newOwner;
emit OwnershipTransferStarted(_owner, newOwner);
}
function acceptOwnership() external {
if (msg.sender != _pendingOwner) revert NotOwner();
emit OwnershipTransferred(_owner, msg.sender);
_owner = msg.sender; delete _pendingOwner;
}The Safe threshold change is a configuration transaction and can be done today. The contract-side halves are not: OwnableLite is inherited by the Factory, Portal, TaxProcessor, Locker and every vault factory, so pinning the admin or adding two-step acceptance means redeploying the privileged layer, and every vault already deployed keeps dynamic resolution permanently. On the legacy deployment this is not mitigated at all — its Factory owner is still the original single key 0x9Cf1e0bf…354c20B, not the Safe, though those vaults now hold only dust.
Partial Owner is now a 2-of-2 Safe; dynamic resolution and single-step transfer unchanged
Both functions that translate a bonding-curve price into a Uniswap-V3 price divide by 10 ** (18 - quoteDecimals) and then floor the result at 1 wei. For a lower-decimal quote any curve price below 1e12 truncates to zero and is silently replaced by 1, so wildly different curve prices map to the same near-minimal V3 price. The == 0 → 1 guard is the defect: a price that cannot be represented should abort the graduation, not be replaced by the smallest representable one.
The entire graduation allocation of an affected Simple launch, unrecoverable — the pool is initialised at approximately zero price and the position is handed to the permanent Locker. Currently unreachable: all 14 registered quote assets were verified individually at 18 decimals, so no live or presently configurable launch is affected.
setQuoteParams — permitted, since only decimals > 18 is rejected._simplePool initialises the canonical pool at the collapsed price and mints the full allocation across collapsed ticks.Fail closed rather than flooring, and add a configuration-time guard — the cheaper and more immediate of the two.
// StoxesBnbPortalMath: a price that cannot be represented must abort.
error QuotePrecisionLoss(uint256 price, uint8 quoteDecimals);
uint256 scale = 10 ** (18 - quoteDecimals);
if (price < scale) revert QuotePrecisionLoss(price, quoteDecimals);
// StoxesBnbPortal.setQuoteParams: only 18-decimal quotes are priceable.
uint8 decimals = IERC20BnbPortal(normalized).decimals();
if (decimals != 18) revert InvalidParams();The library is linked by address into the Portal and Graduator bytecode, so both must be redeployed. Until then this is an operational control: no quote asset with fewer than 18 decimals may be registered. That constraint belongs in the deployment runbook, not in tribal knowledge.
Fixed validateCurve rejects decimals != 18
The same address owns the Factory, Portal, TaxProcessor and V3 Locker, owns all six vault factories, is the Graduator's admin, and — through STX-H02 — is dynamically the reserveAdmin() of every Floor Reserve vault. There is no multisig, no timelock and no role separation anywhere in the privileged layer. The account is not a plain EOA: its code is an EIP-7702 delegation to an 11 185-byte contract that was outside this audit's scope, so the conditions under which that key can sign are themselves unaudited. The treasury is likewise a delegated account.
Gates STX-C01 and configuration authority over the whole protocol. The realistic threat is single-key compromise, after which recovering the key does not recover the capability. What it cannot do materially limits the blast radius: it cannot mint, blacklist, pause or re-tax any launch token, cannot change a live curve, and cannot withdraw from the Portal, Graduator, TaxProcessor or Locker.
This is the only remediation in the report that needs no new code. Move ownership of all nine privileged contracts to an m-of-n multisig; place a 48-hour timelock in front of every configuration capability; separate roles so the key that appoints test admins is not the key that could touch reserves; and verify and publish the EIP-7702 delegate, or remove the delegation. Do not put withdrawReserve behind a timelock — a timelock makes a drain visible but not refusable, because holders' only remedy is funded by the reserve being drained.
// Operational, not a code change. Nine calls complete the migration:
factory.transferOwnership(MULTISIG); portal.transferOwnership(MULTISIG);
taxProcessor.transferOwnership(MULTISIG); locker.transferOwnership(MULTISIG);
floorReserveVF.transferOwnership(MULTISIG); holderRewardsVF.transferOwnership(MULTISIG);
buybackBurnVF.transferOwnership(MULTISIG); splitVF.transferOwnership(MULTISIG);
giftVF.transferOwnership(MULTISIG); nativeBurnVF.transferOwnership(MULTISIG);
// The Graduator needs nothing: its admin is immutable and its one capability is spent.No new contracts, no migration, no user action. Executable in a single session today. Existing launches, vaults and tokens are entirely unaffected.
Partial Gnosis Safe 2-of-2; no timelock, no fault tolerance
The application resolves the vault address from its own API record and uses it directly as the write target: the Floor Reserve flow calls approve(o, Q) then redeem(Q, W) on that address. StoxesBnbLens.getTokenState — the contract the protocol designates as its read interface — is never called by the application code. The trading path, by contrast, reads the Portal and cross-checks the market against the Pancake factories, so the team demonstrably knows the correct pattern; it simply is not applied where an ERC-20 approval is at stake.
The full approved balance of every user who redeems during a server, DNS or pipeline compromise. The protocol's own funds are unaffected. Compounded by all RPC reads being proxied through the same origin, so a compromise would also shape the state the UI displays — the page would look entirely normal.
vault field is an attacker-controlled contract.approve(attackerContract, amount) — indistinguishable from a legitimate prompt, since the address is unfamiliar either way.Derive every write target from the chain and let the API supply display data only. Pin the eleven protocol addresses as build constants and assert the status map against them rather than reading from it.
const details = await publicClient.readContract({
address: BNB_V2_CONTRACTS.portal, abi: portalAbi,
functionName: 'stateDetails', args: [token],
});
const vault = details[3] as Address; // authoritative
if (api.vault && !isAddressEqual(vault, api.vault)) {
reportIntegrityWarning({ token, apiVault: api.vault, chainVault: vault });
throw new Error('Vault address disagrees with on-chain state');
}
const boundToken = await publicClient.readContract({
address: vault, abi: vaultAbi, functionName: 'token' });
if (!isAddressEqual(boundToken, token)) throw new Error('Vault not bound to this launch');Frontend only — no contract change, no migration, no user action. Ships with the next web deployment and immediately protects every existing launch and vault. The highest value per unit of effort in this report.
Fixed + Write target resolved from stateDetails via a pinned deployment allowlist
While a launch is on the curve, execute() spends the vault's entire balance through the Portal with no slippage bound at all. The initial assessment treated this as bounded leakage because a curve is deterministic and charges fees both ways. Validation refuted that: determinism does not protect the vault, it makes the extraction exactly computable in advance; and because execute() is permissionless there is no front-running race — one contract performs buy → execute() → sell atomically in a single transaction. Severity raised from Medium to High after validation; the identifier is retained for cross-reference stability.
Up to 79% of the intended burn destroyed, with the attacker netting 1–9% return on deployed capital, repeatable every time the vault refills. Measured peak: +0.5988 BNB on 6.60 BNB deployed at a 0.5% tax. A normal Tax launch accumulates 0.80–1.75 BNB before graduating — inside the profitable band. No instance of this vault type is deployed, so present exposure is zero.
A, sized so as not to trigger graduation.execute() — the vault now buys at the elevated price and burns far fewer tokens.Derive a floor from the Portal's own deterministic curve. No oracle is needed. A commit-reveal or keeper-only execute() is neither required nor desirable — permissionlessness is a good property here, and a correct minOut restores it safely.
uint16 public constant CURVE_SLIPPAGE_BPS = 100; // the curve is deterministic
uint256 price = IStoxesBnbPortal(portal).curvePrice(token);
uint256 expected = FixedPointMathLib.fullMulDiv(amount, 1e18, price);
uint256 minOut = expected * (10_000 - CURVE_FEE_BPS - taxBps - CURVE_SLIPPAGE_BPS) / 10_000;
IStoxesBnbPortal(portal).buyFor{value: amount}(token, BURN_ADDRESS, address(this), amount, minOut);No instance exists, so the fix ships in a new vault factory with no migration and no user action. This must be closed before the first Buyback & Burn vault is created — after that the instance is immutable and its launches carry the defect permanently, exactly as the eight Floor Reserve vaults now carry STX-C01. The cheapest High-severity fix in this report, and the only one closable with no residue.
Fixed + Pre-graduation path removed entirely
warmObservation is meant to be Portal-only. Its access check is self-authorising — it allows any caller as soon as the observation it would write already exists, which the Portal creates at graduation. Verified live: the call succeeds from an arbitrary EOA on both graduated Tax launches. The function then advances the stored TWAP checkpoint, so front-running each process attempt resets the window to zero.
No funds are lost, but for as long as the griefing continues the entire post-graduation economy of every Tax launch is inert: the vault share, the creator bucket, the burn and the liquidity add all stop. Cost to the attacker is roughly one transaction per 30 minutes per launch.
process(token) or buyAndBurn(token) in the mempool.warmObservation(token), resetting the window.Separate the two responsibilities: seeding may be permissionless, advancing must not be. Restrict warmObservation to initialisation only and remove the self-authorising branch entirely.
/// @dev Seeds an unset observation and NOTHING else. Never advances an
/// existing checkpoint, so it cannot reset a maturing TWAP window.
function _seedObservation(address token, address pair, uint256 rt, uint256 rq, bool t2q) private {
address key = _observationKey(token, t2q);
if (observationOf[key].set) return;
uint256 cumulative = _currentCumulative(pair, token, rt, rq, t2q);
observationOf[key] = Observation(cumulative, uint32(block.timestamp), true);
emit OracleWarmed(token, cumulative, uint32(block.timestamp));
}Every Tax clone is permanently bound to this processor through _validateToken, so a replacement cannot serve existing launches. Interim control: drive process and buyAndBurn from a keeper with competitive gas, and alert on tax accruing without being liquidated.
Fixed warmObservation is seed-only
The four allocation buckets are documented as “bps of collected tax” and must sum to 10 000, which reads as a partition of the tax. They are in fact applied to what remains after the protocol's 30 bps-of-volume cut and the commission share. The arithmetic is internally exact — the six parts always sum to the tax — so this is not an accounting error; the defect is that the quantity the allocation is applied to is not the quantity the interface documents.
At the minimum 50 bps tax the protocol's cut is 60% of the entire tax, so a launch advertising “100% of tax to the vault” delivers 40%. The ratio is not constant: it varies from 40% of nominal at a 50 bps tax to 94% at the 1000 bps maximum. No funds are lost; the economics presented to users are materially wrong at low tax rates.
buyTaxBps = 50, vaultBps = 10_000, reasonably believing the vault receives the whole tax.taxAllocation.vaultBps = 10000 and a UI renders “Vault: 100%”.Keep the arithmetic and fix the disclosure — safer and cheaper than changing the fee. Expose the effective split so no consumer has to infer it, and render it in the UI with the nominal figures as secondary detail.
function effectiveAllocationBps(uint256 taxBps, uint16 commissionBps,
uint16 vaultBps, uint16 creatorBps, uint16 burnBps)
public pure returns (uint16 vaultEff, uint16 creatorEff, uint16 burnEff, uint16 liquidityEff)
{
if (taxBps == 0) return (0, 0, 0, 0);
uint256 protocolShare = 30 * 10_000 / taxBps; // bps of the tax
if (protocolShare > 10_000) protocolShare = 10_000;
uint256 left = (10_000 - protocolShare) * (10_000 - commissionBps) / 10_000;
vaultEff = uint16(left * vaultBps / 10_000);
creatorEff = uint16(left * creatorBps / 10_000);
burnEff = uint16(left * burnBps / 10_000);
liquidityEff = uint16(left - vaultEff - creatorEff - burnEff);
}The Lens half is redeployable today — it can compute the effective split from values it already reads, with no Portal change. Ship that first; the library change waits for v3.
Fixed LensV2 publishes the effective split
The owner, and any address it appoints, can create a launch whose graduation threshold is any value from 1 wei upward instead of the standard 16 BNB. The curve rescaling itself is mathematically sound. The defect is disclosure: StoxesBnbLens, the contract the protocol designates as its read interface, exposes neither graduationQuote nor testCurveQuote, so an integrator cannot distinguish a test launch or compute how far a launch is from graduating.
No direct theft, but a buyer's expectation of remaining curve depth — and therefore of the price trajectory and of when their sell window closes — can be wrong by the full ratio between the real and the standard target. Live instance TSTBURN ran on a 0.2 BNB target against the standard 16 BNB: an 80× reduction.
setTestLaunchAdmin(delegate, true).createTestToken with graduationQuote = 0.2 ether.Add the two fields an integrator needs to the Lens, make the capability set auditable with an enumerator, and constrain the target with a floor so a test curve can never be made economically trivial.
// StoxesBnbLens.TokenState — the two fields a consumer actually needs
uint256 graduationQuote; // from Portal.tokenCurve(token)
uint256 testCurveQuote; // 0 for a standard launch
bool isTestLaunch;
// StoxesBnbFactory — make the capability set auditable
address[] private _testLaunchAdminList;
function testLaunchAdmins() external view returns (address[] memory) {
return _testLaunchAdminList;
}The capability has been delegated. isTestLaunchAdmin(0x1185cec1…3b286f) returns true — a plain EOA, zero bytes of code, nonce 2, no multisig — recovered from event history and confirmed by state read. The Lens half of the fix is redeployable independently today; the floor and enumerator need a new Factory.
Partial LensV2 discloses the target; enumerator absent
There is no per-wallet, per-transaction or per-block purchase limit. MAX_BUY_BPS_OF_CURVE and MAX_ORIGIN_TOKENS exist but are set to type(uint256).max and documented as compatibility stubs. Because the Factory executes the creator's first buy inside the launch transaction, a creator can fund the curve to its graduation target in the same transaction that creates the token — before any third party has had a block in which to compete.
Property test I4 quantifies it exactly: the reserve required to buy the entire 800 000 000-token inventory is precisely the 16 BNB graduation target. One buy takes 100% of the curve, leaving the buyer holding 80% of total supply facing a market seeded with the other 20% and burned liquidity. Distributional, approaching the full contribution of every post-graduation buyer.
createToken with creatorBuyQuoteAmount = 16.2 ether and creatorBuyMinTokensOut set to the full inventory._creatorBuy forwards to Portal.buyFor, which fills to the graduation room and triggers graduation in the same call frame.Reinstate the caps the constants already anticipate, enforced inside _buyCaps so every entry point inherits them. A capped buy degrades into a partial fill plus a refund rather than a revert, so no caller-side change is needed.
uint256 public constant MAX_BUY_BPS_OF_CURVE = 500; // 5% of inventory per buy
uint256 public constant MAX_ORIGIN_BPS_OF_CURVE = 2_000; // 20% per buyer, cumulative
uint256 perBuy = CURVE_SALE_SUPPLY * MAX_BUY_BPS_OF_CURVE / 10_000;
if (tokenRoom > perBuy) tokenRoom = perBuy;
uint256 quota = CURVE_SALE_SUPPLY * MAX_ORIGIN_BPS_OF_CURVE / 10_000;
uint256 already = originBought[token][msg.sender]; // NOT tx.origin — see STX-L01
uint256 left = already >= quota ? 0 : quota - already;
if (tokenRoom > left) tokenRoom = left;Requires a v3 deployment. A cumulative quota keyed on msg.sender is evadable by splitting across addresses; it removes the atomic single-transaction capture but does not make determined accumulation impossible. That limit should be stated to users rather than engineered around.
Open Declined — “no wallet/trade-size limits”
The signature scheme itself is correctly implemented: the payload binds chain id, vault address, handle hash, recipient, deadline and nonce under abi.encode, with replay, malleability and v-value protections all present. The defect is authority — the vault resolves the authorised signer dynamically from its factory on every check, and the owner can replace it at will. Two details worsen it: a later valid proof overwrites an existing recipient, and once any recipient is set the creator's seven-day fallback is permanently unavailable.
The entire balance of every Gift vault, claimable by the owner at any time. No instance is deployed, so present exposure is zero.
setProofSigner(ownKey).manageByProof, then claim — the full balance follows.Pin the signer per vault at construction and make recipient assignment one-way, so a vault's signer cannot change after launch and an assigned recipient cannot be displaced.
address public immutable proofSigner; // snapshotted in the constructor
function manageByProof(address recipient_, uint256 deadline, uint256 nonce, bytes calldata sig)
external
{
if (recipient != address(0)) revert RecipientAlreadySet(); // no silent redirection
// … unchanged validation, compared against the immutable proofSigner …
}No instance exists; ship in a new vault factory with no migration. The off-chain signer remains a trusted party for handle attestation — inherent to the feature — but pinning bounds it to the launch's configuration rather than leaving it live-mutable.
Fixed proofSigner immutable; recipient non-overwritable
The API tier is well hardened — CSP, frame-ancestors 'none', nosniff, no-referrer, CORP and a strict CORS policy. The pages and bundles that actually hold the signing logic carry only HSTS. No Content-Security-Policy, no X-Frame-Options, no Referrer-Policy, no X-Content-Type-Options, no Permissions-Policy.
Without framing restrictions the app can be embedded in an attacker's page and wrapped in overlay UI around the wallet-connect and confirm buttons. Without a CSP, any injected script — from a compromised dependency among the 103 chunks, or a supply-chain incident — executes with full access to the page's wallet provider and can request arbitrary signatures.
stoxes.fun in an attacker-controlled page — nothing prevents it.Serve the standard header set on HTML and asset responses. Remove 'unsafe-inline' from script-src — the inline self-heal snippet in the shell should move to a hashed external file or carry a nonce. Publish /.well-known/security.txt.
Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'
https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https:;
connect-src 'self' https://bsc-dataseed.bnbchain.org https://*.walletconnect.com
wss://*.walletconnect.com; frame-ancestors 'none'; base-uri 'none'; object-src 'none';
form-action 'none'; upgrade-insecure-requests
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=(), payment=()
Cross-Origin-Opener-Policy: same-originEdge or hosting configuration only — no code change, no user action, hours of work.
Fixed Six headers live on shell and assets; CSP running report-only
Detection is window.binancew3w?.ethereum ?? (ethereum?.isBinance ? ethereum : null) — the correct namespaced path for Binance Wallet — with a later fallback to bare window.ethereum. The problem is that fallback: when several wallet extensions are installed they compete to own that global, and whichever won the race is used with no disambiguation and no user choice. eip6963 appears in the bundle only inside vendored code for other chains; the BNB path implements no discovery at all.
No direct fund loss, but a user intending to transact with one wallet can be silently connected to another. Because the chain guard and trade logic both operate on whichever provider was selected, the mis-selection is invisible until the wallet prompt appears.
window.ethereum.Implement EIP-6963 discovery and prompt the user when more than one provider is announced. Keep the legacy path as a last resort, and never use it silently when several providers exist. Also subscribe to accountsChanged and invalidate stale quotes.
const announced = await discoverProviders(); // eip6963:requestProvider
const binance = announced.find(p => p.info.rdns === 'com.binance.wallet');
const provider = binance?.provider
?? (window as any).binancew3w?.ethereum
?? (announced.length === 1 ? announced[0].provider : await promptUserToChoose(announced));Frontend only. Wallets implementing neither EIP-6963 nor a namespaced global still need the legacy fallback; prompting on ambiguity is what makes that safe.
Not checked Not re-examined
The original hypothesis was that the 120-second MIN_TWAP_WINDOW made fee conversion cheap to manipulate. Validation refuted that mechanism and found a smaller one. The live pool's oldest observation is 60 032 s old, so the full 1800-second window is used and the short-window path is unreachable. What remains is the 4% output tolerance, which permits an atomic sandwich with no oracle manipulation at all. Severity reduced from Medium to Low and the root cause relocated; the identifier is retained for cross-reference stability.
At most 4% of the portion that converts in a single call, and only once accrued fees exceed ≈ 1% of pool depth — about 5 760 BNCB of volume between two collect() calls, against a lifetime total of 560.56 BNCB for the live position. Unprofitable at any regular collection cadence.
collect — the Locker converts at the skewed price, within its floor.The originally proposed fix — raising MIN_TWAP_WINDOW to 900 s — was withdrawn, because the window is not the binding constraint. Tighten the tolerance instead and cap per-call conversion.
// Was 300. The +/-409 tick limit already bounds per-swap impact independently.
uint16 public constant BUYBACK_FLOOR_TOLERANCE_BPS = 75;
// Cap how much of a stale fee balance one call may convert, so an
// infrequently-collected position cannot present a single large target.
uint16 public constant MAX_CONVERT_BPS_OF_LIQUIDITY = 25; // 0.25% of depth per callConstants need v3. The operational control is the real remediation for the live position: add collect(token) to the keeper on a fixed schedule so fees never build toward the threshold. Deployable today, one transaction per interval, and it reduces the finding to immateriality.
Fixed + 100 bps, 101 ticks, plus a 0.5% live-liquidity cap
Purchases are attributed to the outermost EOA rather than to the buyer. The mapping is currently inert because _buyCaps ignores it, but purchases through a smart-contract wallet, an ERC-4337 account or a batching router are all misattributed to whichever EOA signed the bundle.
No loss today. The public ledger and the indexed event topic misreport provenance for exactly the account types a wallet integration introduces, and a quota reinstated on this key would be both evadable and hostile to account abstraction.
Key the mapping and the event on recipient — the party actually credited with tokens — and keep tx.origin out of the contract entirely.
Requires a new Portal.
Fixed tx.origin removed from the Portal
Pre-existing quote on the pre-created V2 pair is swapped out to the treasury rather than added to liquidity or returned. The reasoning is sound — with no LP and no launched tokens in the pair, all existing quote is unsolicited, and letting it set the migration price would be worse. The retained amount is 1 wei for any realistic allocation, so price integrity is fully met.
A user who mistakenly sends quote to a launch's pair address before graduation loses it to the treasury, with no event naming them.
Acceptable as designed. The proportionate response is disclosure: document that pre-graduation transfers to a launch's pair address are forfeit. Recovery would require an explicit claim window, since the donor's identity is not recoverable at migration time.
Documentation only.
Not checked Not re-examined
In the capped branch quoteSpent is recomputed with mulDivUp and reassembled from truncating fee and tax terms, so the trader can pay up to 2 wei less than the exact proportional amount.
Bounded at 2 wei per trade, non-accumulating because principal is clamped to principalLimit from committed state each time. Far below the cost of a transaction.
Compute fee and tax with mulDivUp in the capped branch so rounding is consistently against the trader, and assert fee + tax + principal == quoteSpent before returning.
Requires a new Portal.
Fixed Consistent rounding with a conservation assert
The live WBNB parameters are calibrated so the reserve needed to sell the full inventory is exactly graduationQuote — 16 BNB to the wei. The two triggers are not independent safety nets; they are the same point. This is no longer hypothetical: checking all 14 registered quotes, thirteen coincide to the wei but BNCB's k is not the exact r × 1e9 the others follow, leaving its reserve target unreachable by 37 933 wei.
None today — the supply trigger was verified reachable for every quote, so no launch can stall. But the system already runs one quote on a single trigger rather than two, and nothing in the code detects or prevents it.
Assert the invariant at registration and in setQuoteParams: estimateReserveV2(CURVE_SALE_SUPPLY, decimals) <= graduationQuote, so inventory exhaustion can never precede the reserve target.
The assertion needs a new Portal. Until then, check every new quote's parameters off-chain before registration, and re-derive the 11 configured-but-unused quotes so they match the r × 1e9 pattern exactly.
Fixed Reachability invariant asserted at configuration time
After the band check passes, finalize applies a stricter tick test. A price within 1% of target but sitting exactly on tickLower or tickUpper passes the first and fails the second, reverting the whole call rather than deferring it.
Prolongs a pending graduation: unlike the deferral path, which returns cleanly and is retryable, this reverts identically on every retry until the pool's tick happens to move.
Treat the tick check like the band check — return and defer cleanly instead of reverting — and widen the range by one tick spacing on each side so a boundary tick sits inside the position.
Requires a new Graduator, hence a new Portal.
Fixed Range widened one tick spacing each side
Every transfer, mint and burn calls the vault's balance hook with no try/catch and no gas cap. If the hook ever reverts, every transfer of that launch token reverts with it — permanently, because balanceHook is set at initialisation and there is no owner left to clear it.
None today: the only hook-enabled vault was reviewed and cannot revert on that path. Any future hook-enabled vault whose onBalanceChange can revert would brick its launch token irrecoverably.
Isolate the hook with try/catch and a gas cap, emitting a failure event. A swallowed failure degrades reward accounting rather than freezing the token — the correct trade, since dividends are a feature and transferability is the asset.
Requires a new token implementation; future launches only.
Fixed + Ordered balance journal; transfers no longer depend on the hook
TokenState carries nineteen fields but not the launch's graduation target and not a structured vault-capability flag. The vaultDescription string does disclose the Floor Reserve capability honestly, but free text cannot be acted on by a wallet, an aggregator or a risk filter — only a typed field can.
Prevents any integrator from programmatically warning about STX-C01 or STX-M05.
Extend the struct with graduationQuote, testCurveQuote, isTestLaunch, a typed vaultCapability enum, vaultAdmin and the effective allocation bps — all resolvable from contracts the Lens can already reach.
The Lens is referenced by no other contract and can be redeployed independently today, with no migration and no coordination. Combined with the Lens halves of STX-M02 and STX-M05, this is the highest-leverage, lowest-risk contract change in the report.
Fixed LensV2 ships with the fields recommended
The chain definition names a public RPC, but the transport actually used is a same-origin proxy. Every balance, price, quote and state read passes through the operator's server.
Modest alone — a proxy has legitimate benefits. It becomes material in combination with STX-H05: an attacker holding the server controls both what the user sees and where the user's approval is sent.
Keep the proxy as the default but read security-relevant values through a second, independent public RPC and refuse to proceed on disagreement. Expose the fallback in configuration so it can change without a deploy.
Frontend and configuration only.
Not checked Not re-examined
The endpoint returns admin and creator-whitelist status for any address supplied, unauthenticated. The underlying facts are on-chain and public, so this is not a disclosure of secret data.
Lets an attacker enumerate privileged addresses cheaply while profiling targets. Given STX-H04, the value of not advertising which addresses hold protocol authority is higher than normal.
Require the connected address to prove control — the existing personal_sign admin-auth pattern is already available — before returning privilege status, and rate-limit the endpoint.
Backend only.
Not checked Not re-examined
The third deployment's Portal changes one line of _sell. The token pull from the caller is now skipped when token.balanceOf(portal) ≥ TOKEN_SUPPLY − newSold, that is, when the Portal already holds the curve inventory plus the amount being sold. The test cannot tell who made the deposit, so the credit belongs to whoever calls sell or sellFor first. This is the router pattern of a Uniswap V2 pair, where tokens are sent to the contract and then a call is made, and it is sound only when the deposit and the call happen in the same transaction. Confirmed on the real compiled Portal with the real Tax token implementation and the live production curve: a caller holding zero tokens is paid for tokens another account sent to the Portal; sellFor routes the proceeds to any recipient; the credit is single use; an excess smaller than the amount is not honoured and the full pull is attempted. A second route to the same state is buyFor with the Portal itself as recipient: the tokens never leave, sold moves, and the excess equals what was bought. Round trips through that route lose at least the curve fees on every one of 1 000 fuzzed sizes, so it is not a profit path.
Loss is bounded to tokens that reach the Portal outside an atomic call: a mistaken direct transfer, a non-atomic integrator flow, or a buyFor whose recipient was set to the Portal. The reserve is not drained: the claimant receives exactly the curve value of the tokens, and reserve accounting stays consistent. Claiming is a mempool race that a bot wins. Nothing is claimable today. The third deployment has two launches, both named as tests and created by one wallet, with about 1.2 BNCB in each curve; at block 136 241 661 the Portal held no token above the curve inventory on either. On the second deployment, which pulls unconditionally, the property does not exist.
sell in another, or sends them there by mistake.sell(token, N, 0) or sellFor(token, recipient, N, 0) first, in the same block if it is watching the mempool.Restrict the pre-deposit path to routers the owner has allowlisted, so that every other caller keeps the unconditional pull of the second deployment; reject the Portal as a buyFor recipient; and read the supply from the token (this also removes STX-I05). Document for integrators that deposit and sell must share one transaction, and that anything sent separately is claimable.
mapping(address => bool) public integratorRouter;
event IntegratorRouterSet(address indexed router, bool allowed);
function setIntegratorRouter(address router, bool allowed) external onlyOwner {
integratorRouter[router] = allowed;
emit IntegratorRouterSet(router, allowed);
}
// in _sell(): only an allowlisted router may rely on a prior deposit
bool prepaid = integratorRouter[msg.sender]
&& IERC20BnbPortal(token).balanceOf(address(this))
>= IERC20BnbPortal(token).totalSupply() - m.newSold;
if (!prepaid) token.safeTransferFrom(msg.sender, address(this), amount);
// in _buy(): the Portal is never a delivery or refund target
if (recipient == address(this) || refundTo == address(this)) revert InvalidParams();The Portal is immutable and its factory is set once, so the fix is a new Portal and Factory; the token implementations and the pricing library keep their addresses. The cheapest moment is now, while the only launches on the third deployment are those two tests: a new Portal serves every launch created after it, and the earlier two simply stay where they are. The 51 launches on the second deployment are unaffected. Regression tests: an unlisted caller facing an excess must be refused; an allowlisted router must be served; a buyFor to the Portal must revert.
New · open New in v1.2: a sell is credited with any excess token balance in the Portal
commissionBps is computed at initialisation as effectiveTax <= 100 ? 600 : 60_000 / effectiveTax. The commission receiver therefore takes 6% of the post-protocol remainder on a 0.5–1% tax but only 0.6% on a 10% tax. This is a deliberate normalisation holding the commission roughly constant as a share of volume.
None. Immutable once set and readable through commissionBps().
No action required beyond ensuring any UI that displays a commission shows the derived value rather than a nominal one — which interacts with STX-M02.
—
By design This token type no longer exists
Every contract references the others by immutable address, the math library is linked by address into two of them, and every Tax clone is permanently bound to this TaxProcessor. This immutability is a genuine security property — no component can be silently swapped, which is why this audit could verify that the code audited is the code running.
It is also a hard remediation constraint. Of the 27 findings, only three can be fixed without a new Portal and Factory, and exactly one — STX-H04 — can be remediated with no new code at all.
By design. Section 06 sequences remediation around this constraint rather than against it.
—
By design By design — and, in the event, what the project did
The documentation page renders only when GET /api/bnb/bnc-mode returns a consistent status, so the protocol's disclosures — including the Floor Reserve admin disclosure that STX-C01 depends on — are unavailable whenever that endpoint is. GET /api/vault/stats returns 502 in production. The vault section is titled “Five vault extensions” while listing six.
Disclosures users are expected to rely on should not depend on an API call. The docs are otherwise accurate and commendably frank.
Render the disclosures statically, fix the broken endpoint, and correct the count.
Frontend and backend.
Not checked Not re-examined
The new check measures the curve inventory as TOKEN_SUPPLY − sold, with TOKEN_SUPPLY a constant of 1e9 ether in the Portal. Both token implementations mint exactly that and the Factory hands all of it to the Portal, so the constant is correct today. For a token whose supply is larger and is held entirely by the Portal, the balance exceeds the inventory the check expects for every sell, so every sell is treated as already deposited. Demonstrated in-process with a token of twice the supply: a caller holding no tokens is paid for tokens it never owned, sell after sell.
None on the deployed system: setFactory can be called once, the Factory's token implementations are immutable, and both mint exactly 1e9. It is recorded because the defect is Critical-class and the trigger is a single changed constant elsewhere. A future redeployment that changes any token's supply without changing the Portal would inherit it silently.
Read IERC20BnbPortal(token).totalSupply() instead of the constant, as in the code of STX-L10. If the constant is kept, add a registration-time check that the Portal's balance of the token equals TOKEN_SUPPLY exactly.
Same new Portal as STX-L10; no additional deployment.
New · open New in v1.2: the Portal hard-codes a 1e9 token supply
Sequencing is dictated by immutability: the deployment cannot be patched in place. That cuts both ways — but the phases that actually clear the gate need no new contracts at all.
Read against section 00. Costed against the audited baseline; the successor build has since completed most of it, marked ✓ below. What remains is M06, declined, and H02, partial. The cheapest remaining gain is outside this table: raise the Safe off 2-of-2 and put a guard or timelock in front of configuration — configuration only, no contract change. New in v1.2: L10 I05 need one new Portal, best done now, while the only launches on the third deployment are two tests.
stateDetails and the Lens; pin protocol constants H05 L08process, buyAndBurn and collect M01 M03 ✓ Both fixed in contract codeminOut on Buyback & Burn M04 — HIGH ✓ Closed by removing the pre-graduation path entirelywarmObservation fix H03 M01 ✓ Done on the successor build; purchase caps and two-step ownership M06 H02 remain openThis report issued STX-H05 and STX-M08 as the two conditions on the successor deployment, and supplied a working patch for each. Both are now live. The checks below were run against production on 12 November 2026.
Every vault write target is now derived from the chain. The deployed bundle reads token.portal(), requires the result to be one of a build-pinned allowlist of approved deployments, cross-checks factory.portal() against it so the deployment is triangulated rather than asserted, then reads stateDetails(token) from that pinned Portal and takes the vault from field [3]. A vault supplied by the application record is compared against it and refused on mismatch — “Vault does not match the registered token. Nothing was sent.” The value that reaches approve and the action call is the chain’s, not the record’s.
Three further checks ride along: the vault must hold code, vault.token() must point back at this launch, and vault.vaultQuoteToken() must match the payment asset. The resolution is then repeated immediately before signing, so a state change between simulation and submission cannot slip through.
The deployment allowlist is the part that exceeds the recommendation. This report asked for the write target to be derived from chain state. Pinning the set of Portals the application will act against at all, and verifying each against its Factory, closes a path the recommendation left open: an on-chain derivation that is itself rooted in an attacker-chosen Portal.
All six headers are present on the application shell and on /assets/, which is the half most often missed, because a nested rule that replaces rather than extends the parent set drops protection on exactly the files that carry the application code. Content-Security-Policy-Report-Only is running, so the policy is in its observation phase and no enforcing CSP has been shipped blind.
One step remains to finish the sequence, and it is theirs to time rather than a condition of this report: read the violation reports, fold the real origins into connect-src and frame-src, then move the policy to Content-Security-Policy. Until that happens the CSP observes and does not protect. X-Frame-Options is at SAMEORIGIN; the reports will show whether DENY is safe.
STX-C01 — the operator can withdraw 100% of every floor reserve with no token burn, collapsing an advertised floor to zero. Rated Informational in this report on the basis of the project’s public disclosure; the impact is unchanged, and a reader weighing impact independently should treat it as a Critical centralisation risk. STX-H02 is the single unguarded step by which that capability transfers, now gated behind a 2-of-2 Safe. STX-M06, the absence of a purchase cap, was declined. None of these is a defect the project failed to fix; each is a position it has taken, and the GO is issued with them stated.
On 28 November 2026 the project redeployed the protocol for the third time. The change is consistent with a deposit-then-sell router flow, the pattern trading integrators use. Everything below was read from the chain and from the verified source on 28 November 2026, at block 136 241 661.
The third deployment opened to launches at block 136 211 366. The second deployment is closed to new launches and holds 51 launches that keep trading on their own Portal. The third has two, both named as tests and created by the same wallet, each with about 1.2 BNCB in its curve. The first is a Simple launch and the second a Tax launch, so both token types are being exercised.
| Contract | Second deployment | Third deployment | Result |
|---|---|---|---|
| Factory | 0x9b8b…588f | 0x4380…5c8d | identical after masking |
| Portal | 0x5515…fcb5 | 0x7e22…410b | changed: +132 bytes |
| Graduator | 0x0bc2…50b8 | 0x137d…0ccc | identical after masking |
| Tax processor | 0xc7ee…f001 | 0x305f…222a | identical after masking |
| V3 locker | 0x15fd…43ed | 0xd9b2…00dc | identical after masking |
| Lens V2 | 0x21e7…6dd2 | 0xb0d3…3dd0 | identical after masking |
| Five vault factories | unchanged logic | new addresses | 5 of 5 identical after masking |
| Token implementations, pricing library | 0xf3e2…6d85, 0xd74d…972d, 0x42db…6ae0 | same addresses | unchanged, already verified |
Ownership is unchanged in kind: the same Gnosis Safe, threshold 2 of 2, owns the Factory, Portal, tax processor, locker and the five vault factories. All 14 cross-contract references that the contracts expose were read, and none points back into the second deployment. The WBNB, BNCB and NVDAB quote parameters, the treasury, the creator dispatch threshold and the vault-factory allowlist match the second deployment.
In the Portal’s source tree only two files differ: the Portal by twelve lines, and its entry-point wrapper by ten, almost all of them the rename. Every other file is identical: the pricing library, the curve, the common base, the payout helper and the interfaces. A constant is added, and one statement in _sell becomes conditional.
// second deployment
token.safeTransferFrom(msg.sender, address(this), amount);
// third deployment
uint256 private constant TOKEN_SUPPLY = 1e9 ether;
...
if (IERC20BnbPortal(token).balanceOf(address(this)) < TOKEN_SUPPLY - m.newSold) {
token.safeTransferFrom(msg.sender, address(this), amount);
}
A sell no longer pulls the tokens when the Portal already holds the curve inventory plus the amount sold. That is what lets a router transfer first and call second. Where nothing extra sits in the Portal the behaviour is the second deployment’s, and the test suite confirms it. Where something does, the credit goes to whoever calls first. That is STX-L10. The constant behind the check is STX-I05.
Nine property tests run the real compiled Portal and the real Tax token implementation, cloned and wired as the Factory wires them, on the live production WBNB curve (r = 4e18, k = 4e27, graduation 16 BNB). The two fuzz tests ran 1 000 cases each. Nothing in them touches a live contract.
| Test | What it establishes |
|---|---|
| noExcess_sellPullsFromSeller | with no excess, a sell pulls from the seller and the accounting stays exact |
| noExcess_sellWithoutTokensReverts | with no excess, a caller holding nothing is refused |
| excessTokens_areClaimedByTheFirstSeller | a caller with zero tokens is paid for another account’s tokens; the depositor loses them; single use |
| excessTokens_sellForPaysAnyRecipient | sellFor routes the proceeds to any recipient |
| excessSmallerThanAmount_stillPullsEverything | a claim larger than the excess is not partly honoured |
| buyForRecipientPortal_createsExcess | buyFor with the Portal as recipient moves sold and leaves the tokens |
| selfInflictedRoundTripNeverProfits | 1 000 fuzz runs: that route always loses at least the fees |
| accountingNeverBreaks | 1 000 fuzz runs: the Portal never holds less than the curve inventory |
| latent_largerSupplyTurnsEverySell… | STX-I05: with a larger supply, every sell is free money |
Tokens that reach the Portal outside an atomic call are credited to the first seller. The loss is bounded to those tokens, the reserve is not drained, and a round trip through the self-inflicted route never profits. Nothing is claimable today: the two existing launches are tests and the Portal holds no excess on either. Fix on a new Portal with an allowlist for routers that rely on a prior deposit, now, while only those two launches would stay behind.
The hard-coded supply is correct for both token implementations and cannot be changed on the deployed system, because the Portal’s factory is set once and the implementations are immutable. It is recorded because a future redeployment that changes a supply would inherit a Critical-class defect.
Ten of eleven contracts are the audited second deployment under new addresses, the eleventh differs by one reviewed function, and the review found one Low and one Informational finding with nothing claimable today. The score is unchanged at 9.0, on the same basis and with the same reading of STX-C01. The one action that matters is on the Portal and is cheapest now.
eth_call simulation against BNB Smart Chain.| Revision | Date | Change |
|---|---|---|
| v1.0 | 12 November 2026 | First issue: the audited deployment, 27 findings, score 5.4, later 6.0. |
| v1.1 | 13 November 2026 | Second deployment verified; STX-H02 reduced to Medium; score 9.0 on the severities as rated. PDF SHA-256 3fb9650c…ef3e. |
| v1.2 | 28 November 2026 | Addendum for the third deployment (section 08); STX-L10 and STX-I05 added; the GO extends to the third deployment; score unchanged. |
Recorded while verifying STX-L06. These are construction notes, not findings of this engagement, which did not audit the successor build.
A transfer of a hook-enabled token now requires roughly 580 000 gas available (HOOK_GAS 400k plus a 180k journal reserve) or it reverts InsufficientHookGas. The floor is deliberate — it stops a griefer supplying just enough gas to make the hook fail and force a queue entry. Wallets that estimate gas will clear it, but integrations with a fixed gas budget per inner call may not, and in the tax-enforced phase the check runs on every swap. This is the residual of STX-L06: transferability no longer depends on the hook behaving, but it does now depend on the caller's gas.
That floor is enforced even when no hook call will be made. The check precedes the updateHead == updateTail branch, so while the queue is draining — the path that only writes a struct and costs about 25k — transfers still require the full 580k to be available.
A hook that never recovers freezes that vault's rewards permanently, with no escape. Nothing can drop or reset a queued update; repairBalanceHook only replays in sequence. That is the deliberate inverse of STX-L06 — the failure was moved from transfers to rewards, which is the right direction — but it should be a conscious operational position, not a surprise.
A future vault factory returning wantsBalanceHook() == true whose vault does not inherit BnbBalanceJournalGuard would revert UnsupportedBalanceHook on its token's very first transfer, bricking the launch at creation. Nothing enforces the coupling. Both shipped hook-requesting vault types, Stocks and Routed Stocks, do inherit it, so there is no live effect; failing at the first buy rather than silently later is also the better of the two failure modes.
Two smaller notes. _apply hardcodes call(400000, …) in assembly rather than reading the HOOK_GAS constant beside it, so the two can drift. And both tokens return address(0) from owner() and getOwner() as hardcoded pure functions while the Portal still gates transfers through the bonding-curve and migrating phases — pre-existing behaviour, but automated scanners read those functions and will report ownership renounced on a token whose transfers are still externally controlled.
One pattern worth copying. StoxesBnbSimpleToken.setMainPool accepts a pool only after resolving it from graduator.simplePool() and checking the pool's own token0/token1 against itself and its quote. That is precisely the on-chain derivation STX-H05 asks for, already written and shipped in this codebase — applied to the vault address in the application tier, it would close that finding.