Jask
Back to Audit Services
Spinance
PASSED

Spinance

Self-Sovereign Token Protocol

Spin Team 2026-06-01 Ethereum Mainnet spinance.xyz

Executive Summary

Comprehensive audit of 13 contracts (~1,450 lines Solidity) on Ethereum Mainnet. Uniswap V4 hook-based. Found 2 High, 6 Medium. All high resolved.

Audit Scope

ContractFileLinesCategory
Tokensrc/Token.sol56ERC-20
Hooksrc/Hook.sol29V4 Hook Entry
HookBasesrc/hook/HookBase.sol173Shared State
HookSwapsrc/hook/HookSwap.sol267Bonding Curve + Tax
HookReleasesrc/hook/HookRelease.sol62Phase + Release
HookStakingsrc/hook/HookStaking.sol161NFT Staking
SpinCurvesrc/lib/SpinCurve.sol82Curve Math
SpinRoutersrc/SpinRouter.sol146Custom V4 Router
SpinNFTsrc/SpinNFT.sol14NFT Entry
NFTBasesrc/nft/NFTBase.sol146ERC-721 Base
NFTMintingsrc/nft/NFTMinting.sol215Mint + Singularity
NFTMetadatasrc/nft/NFTMetadata.sol147On-Chain SVG
RoyaltyAutoBuysrc/RoyaltyAutoBuy.sol63Royalty Deflation

Methodology

01

Architecture & Threat Modeling — map Token→Hook→HookSwap/HookRelease/HookStaking→SpinRouter→NFT→RoyaltyAutoBuy

02

Access Control Review — onlyHook, onlyDeployer, onlyPoolManager gates, cross-contract trust model

03

Vulnerability Scanning — reentrancy, hook permissions (14 flags), arithmetic, business logic

04

Economic Attack Simulation — curve manipulation, tax evasion, Singularity RNG gaming, reward extraction

05

Edge Case & Invariant Testing — zero-supply, boundary values, bonding curve inverse verification

06

Gas & Operational Review — on-chain SVG cost, loop bounds, event coverage, storage packing

Findings Summary

IDSeverityContractTitleStatus
H-01 HIGH NFTMinting paidMint ETH transfer before state update violates CEI Resolved
H-02 HIGH HookSwap Unbounded buy in Phase 2 enables curve manipulation Resolved
M-01 MEDIUM NFTMinting mintWithETH raw call return could trap ETH Resolved
M-02 MEDIUM Token setHook front-runnable if not deployed atomically Resolved
M-03 MEDIUM HookStaking emergencyUnstake forfeits pending rewards without event Resolved
M-04 MEDIUM RoyaltyAutoBuy buyAndLock uses minOut=0 — no slippage protection Resolved

Detailed Findings

HIGH H-01 NFTMinting

paidMint ETH transfer before state update violates CEI

paidMint() sends ETH via .call{}("") BEFORE updating paidMintCount and hasMinted. Violates Checks-Effects-Interactions principle.

Resolution: Reordered to update state before external ETH transfer.

HIGH H-02 HookSwap

Unbounded buy in Phase 2 enables curve manipulation

Phase 2 _executeBuy() has no maximum buy limit. A whale could buy massive SPIN in one tx, causing extreme price impact.

Resolution: Added configurable max buy in Phase 2 (default: 100 ETH).

Invariant Verification

#InvariantHoldsNotes
1 TOKEN.totalSupply() ≤ MAX_SUPPLY (3^21) Yes Enforced in Token.mint()
2 circulatingSupply() = totalSupply - lockPoolBalance Yes Lock pool excluded from circulation
3 totalMinted(0) = 0, monotonic increasing Yes SpinCurve property verified
4 burnFor(X, m) = valid inverse of totalMinted Yes Round-trip property verified
5 phaseTwoActivated transitions false→true exactly once Yes Immutable transition

Positive Security Properties

Zero Admin / Zero Upgrade — no Ownable, no proxy, no governance. Protocol is fully autonomous.
ReentrancyGuardTransient (EIP-1153) — cheaper than SSTORE, auto-cleared at tx end.
CEI pattern on every ETH/SPIN transfer path.
Bonding curve natural deterrence — exponential curve makes manipulation expensive.
Lock pool alignment — tax from buys AND sells distributed to stakers.
Phase transition automated — no manual trigger, no governance vote.
Deflationary royalty flywheel — royalty ETH → auto-buy SPIN → burn.
Singularity forging costly — 13k SPIN + 2 Vortex NFTs burned per attempt.
Immutable economic parameters — no one can change protocol economics.
On-chain SVG metadata — fully self-contained NFT, no external dependencies.

Deployed Contracts

ContractAddress
Token (SPIN) 0xbB4213015468AFa7f2670f2298CA79AAE7679B4C
Hook (V4) 0xe48B1Ce2FC24365D29bfB4081aC9924965CB58C8
SpinRouter 0xDe84F19c9950F6df860fDB6954e724E8E62F16fe
SpinNFT (VORTEX) 0xCec2E3626fBa84D8D235F8A79Efc0166B03b6B78

Need a Smart Contract Audit?

Contact us to discuss your project's security needs.

Get in Touch