Skip to main content

Smart Contract Security

This page covers what the 7N7D contracts do, who controls them, and how far they've been reviewed.

:::info Testnet only The contracts below are deployed on testnets with test funds: the 7N7D token, staking and governance on Ethereum Sepolia (chain ID 11155111), the earlier set on Arbitrum Sepolia (chain ID 421614). No contracts are on mainnet. The contracts have not been independently audited. Source is verified on Sourcify and is team-accessible in the apps/contracts directory of the monorepo. :::

Contract architecture​

┌──────────────────────────────────────────────────────────────┐
│ 7N7D Smart Contracts │
├──────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────┐ stake ┌───────────────────────────┐ │
│ │ Token7N7D │─────────►│ ProfitDistributor │ │
│ │ (ERC-20, 1B, │ │ (staking, USDC rewards) │ │
│ │ fixed supply) │ └─────────────┬─────────────┘ │
│ └────────┬─────────┘ │ staked balance │
│ │ ┌─────────────▼─────────────┐ │
│ │ │ StakedGovernance │ │
│ │ │ (votes = staked balance) │ │
│ │ └───────────────────────────┘ │
│ ▼ │
│ ┌──────────────────┐ ┌───────────────────────────┐ │
│ │LockedVesting- │ │ Uniswap launch contracts │ │
│ │Wallet (x4) │ │ (auction, v4 pool) │ │
│ └──────────────────┘ └─────────────┬─────────────┘ │
│ ┌─────────────▼─────────────┐ │
│ │ LaunchLiquidityLock (LP) │ │
│ │ LiquidityAgentModule │ │
│ └───────────────────────────┘ │
│ │
│ ┌──────────────────┐ fees ┌───────────────────────────┐ │
│ │ TradingVault │─────────►│ fee recipient → stakers │ │
│ │ (ERC-4626) │ └───────────────────────────┘ │
│ └────────▲─────────┘ │
│ ┌────────┴─────────┐ ┌───────────────────────────┐ │
│ │ DepositReceiver │◄─────────│ DepositRouter │ │
│ │ (Arb, CCTP mint) │ │ (ETH/Base, none published)│ │
│ └──────────────────┘ └───────────────────────────┘ │
│ │
└──────────────────────────────────────────────────────────────┘

Deployed addresses (Ethereum Sepolia)​

ContractAddress
Token7N7D0x535bd08033A06d3CbF2D4566BafB62445eed9702
ProfitDistributor v20xAbFdcB235b56dd32cc1172C64D0550f99423FEdA
StakedGovernance v20x925585C2cAC054b1517bB0FA28B78d7Ae4f5aA0E
ProfitDistributor v1, exit only0x3d2742c5C5EdF2Fcd3A27254e27620D6c1BDDCdD
Interim ProfitDistributor (MockUSDC), exit only0x2750427C70b3dAF8EeA96f6c3dFC7459faaaF59B

v2 carries the internal-audit staking fixes (reward precision, governance snapshot weight). The app stakes and votes with v2 only; v1 and the interim distributor stay open for their stakers to withdraw and claim.

Deployed addresses (Arbitrum Sepolia)​

The ProfitDistributor, StakedGovernance and TradingVault below are retired (2026-11-25).

ContractAddress
Token7N7D0x3ECC41994b8f8eFb944ea10Ed16ef2766fc45feF
ProfitDistributor0xE4AAdc43434AAa3872A8D183Dd3CB8b0fFf9dbea
StakedGovernance0x26d57B1Cc45568128e6c2fc639931aB7Aa4fBCcd
TradingVault0x225c91C3943028EbBa44e33202Ef914B845F0267 (a new build is pending, see below)
LaunchLiquidityLock (demo)0x4248Ed96b6a0a05Cb253027EB4CBE28d5B363d9d
LiquidityAgentModule0xc36A6812B93Bc0ceD8a3CCC28693d295Fc57A329
LockedVestingWallet0x1f115d9a83F5d4186BD15006187F2d7F3C4c3C52
LockedVestingWallet0xd9d586FD0Ea455c60AF5E72d303d2da4Ae92f907
LockedVestingWallet0xCf9159e6ef4142b7558Ce501017A54A2cDA4D1ac
LockedVestingWallet0x6302A2a6086f6ac24a15b1CAeEE0D714a07f489d
Vault asset: MockUSDC0x3a55B1E3B5Af2D90A3802b7359a6EC1fc0a435FD

Source code for every contract above is verified on Sourcify. No contract has been deployed to a production network.

Owner powers​

The contracts are not trustless. Some keys can move funds or change behaviour without a token vote.

:::note TradingVault redeploy (2026-11-15) A new TradingVault build limits the owner further: the owner can only send vault USDC to trading at an allow-listed trading wallet, changes to that list wait 48 hours, and a pause no longer blocks completing or cancelling an existing withdrawal request. The contract change is pending approval and is not deployed yet; the address will be listed here once it is live on Arbitrum Sepolia.

The current vault 0x225c…0267 keeps the older powers in the second table below. Its depositors can keep requesting and completing withdrawals from it as before. On that vault the owner can still pause, which blocks new requests and completions until it is unpaused; cancelling still works. :::

TradingVault owner (new build)​

PowerFunctionEffect
Move vault USDCwithdrawFundsForTrading(to, amount)Sends the vault's idle USDC to the agent's trading wallet. to must be on the trading-recipient allow-list; any other address reverts with RecipientNotAllowed. The list is set at deployment (the agent's Hyperliquid wallet 0x46c6…2a59 on testnet).
Change the allow-listproposeTradingRecipient(addr, allowed) → wait 48h → executeTradingRecipient(addr)Adds or removes a recipient. The proposal is public on-chain (TradingRecipientProposed) for 48 hours (RECIPIENT_TIMELOCK) before it can take effect. cancelTradingRecipient(addr) drops it, and pendingTradingRecipient(addr) shows what's queued.
Pausepause() / unpause()Blocks deposits, mints and new withdrawal requests. An existing request can still be completed (processWithdrawal, once its 7 days have passed and the vault holds enough idle USDC) or cancelled (cancelWithdrawal). A depositor who hasn't requested yet has to wait for the unpause.
Set the NAV writersetNavUpdater(address)Chooses who can write NAV, which sets the share price
Write NAVupdateNav(newNav)The owner can also write NAV directly, within the same caps
Set the fee recipientsetFeeRecipient(address)Chooses where all management and performance fees go
Set the governance tokensetGovernanceToken(address)Only affects the informational fee-discount views

TradingVault owner (current vault 0x225c…0267)​

Same as the new build, except:

PowerFunctionEffect
Move vault USDCwithdrawFundsForTrading(to, amount)Sends any amount of the vault's idle USDC to any address the owner chooses. The contract doesn't limit the destination, and there is no timelock.
Pausepause() / unpause()Blocks deposits, withdrawal requests and withdrawal completions. Cancelling a request still works.

ProfitDistributor owner​

PowerFunction
Start reward streamsnotifyRewardAmount(reward)
Change the hold-back sharesetBuybackPercentage(bps), anywhere up to 100% of each reward (0 on testnet)
Set the reserve and send held-back USDC theresetBuybackReserve, transferBuybackToReserve
Pause stakingpause() / unpause(). Unstaking and claiming still work
Recover stray tokensrecoverERC20. This can't take the staking token or USDC

StakedGovernance owner​

PowerFunction
Tune proposal threshold, voting period, quorum and minimum vote weight, within fixed bounds, for new proposalssetProposalThreshold, setVotingPeriod, setQuorumBps, setMinVoteWeight
Pause proposing and voting. Finalization still workspause() / unpause()
Seed the trading-pair lists once. Locked forever afterseedTokens (already used)

StakedGovernance holds no funds.

LiquidityAgentModule owner and guardian​

PowerWho
Pause the moduleGuardian or owner
Unpause, set the operator, guardian and daily limitsOwner
Withdraw idle tokens or a position NFTOwner

The agent (operator) can only add, reduce and collect fees on positions in the one configured pool, within daily caps. It cannot swap or withdraw.

Token7N7D, LockedVestingWallet, LaunchLiquidityLock​

  • Token7N7D has no owner and no admin functions.
  • LockedVestingWallet beneficiaries can never be changed, and only vested tokens can leave.
  • LaunchLiquidityLock: anyone can collect the LP fees to the treasury; the position cannot move before the unlock time, then only to the founder Safe.

What limits the owner​

  • NAV caps. Each update can move NAV by at most ±20%, by at most ±40% in 24 hours (audited build), and no more than once per hour. This limits how fast a bad price can move, but not where it ends up.
  • Fixed fees. Fee rates are constants that no one can change.
  • Fixed supply. The token has no mint function and no owner.
  • Withdrawal mechanics. Withdrawals always use the 7-day request → complete flow. The owner can't change the delay.
  • Trading-wallet allow-list (new build). The owner's withdrawFundsForTrading can only pay allow-listed addresses (depositor withdrawal payouts are unaffected), and adding one takes a public 48-hour wait. A compromised owner key can't send funds to a new address without announcing it two days in advance. That is a warning window, not a guaranteed exit: a new withdrawal request takes 7 days, and the owner can pause new requests.
  • Pause spares existing requests (new build). A request made before the pause can still be completed once it matures, if idle USDC covers it, or cancelled. New requests wait for the unpause.
  • Not upgradeable. There are no proxies. Changing logic requires deploying a new contract and moving users to it.

Trusted price source​

The share price comes from NAV written by the agent's NAV writer (navUpdater).

  • The contract does not check NAV against Hyperliquid or any oracle.
  • The writer is a trusted price source bounded by the caps above.
  • On testnet, the NAV credit mirrors the trading account's percentage return. See Share Price and How Testnet Works.

Audit status​

ReviewScopeStatus
Internal auditTradingVault and ProfitDistributor (still in use), plus four contracts of an earlier token design that has been replacedDone 2026-07-30 (report)
Third-party auditAll contractsPending, not yet commissioned
Internal review and testsToken7N7D, LockedVestingWallet, StakedGovernance, LiquidityAgentModule, LaunchLiquidityLockNo audit yet

The internal audit found:

  • no reentrancy or unauthorized-mint issues;
  • 2 high and 6 medium findings, mostly about TradingVault NAV handling and trust in the price source.

Remediations, such as the NAV rate limit and 24-hour cap, are tracked in the report. The allow-list and pause changes in the new TradingVault build (audit M-1 and L-6) have their own internal re-review (2026-11-15). An internal audit is not a substitute for a third-party audit.

No insurance fund​

There is no insurance fund or reserve to cover losses from trading, a wrong NAV, a compromised key or a contract bug.

Contract notes​

TradingVault​

  • ERC-4626-style vault with MockUSDC as the asset on testnet. totalAssets() returns the NAV written by the agent.
  • The standard withdraw / redeem functions revert. Withdrawals use requestWithdrawal → 7 days → processWithdrawal, and cancelWithdrawal is available at any time. In the new build both also work while the vault is paused.
  • Fees are constants: 0.5%/yr management and 10% performance above a vault-wide high-water mark, paid to one feeRecipient.
  • Fee-discount functions exist but are not applied.
  • Uses ReentrancyGuard, Pausable and OpenZeppelin v5 virtual shares, which mitigate first-depositor inflation.

ProfitDistributor​

  • Stake $7N7D (minimum 0.01) and earn USDC streamed over 24 hours.
  • Functions: stake, withdraw, getReward, exit, earned.
  • Funded daily from the vault's management and performance fees, not a direct share of trading profits (the performance fee is 10% of vault gains above the high-water mark, so rewards rise and fall with vault performance). The daily distribution is currently off.
  • The owner can hold back part of each reward for a reserve. On testnet the share is 0.
  • recoverERC20 refuses the staking token and USDC, so staked tokens cannot be taken. See Staking.

Token7N7D​

PropertyValue
StandardERC-20 (OpenZeppelin), 18 decimals
Total Supply1,000,000,000, minted once in the constructor
MintableNo
BurnableNo
PausableNo
Owner / rolesNone
Vote checkpointsNone (voting power comes from staking)

Security Features:

  • The constructor mints the allocation and reverts unless it sums to exactly 1,000,000,000
  • No owner, roles, blacklist, transfer tax or upgrade path
  • After deployment the only state changes are transfers and approvals

LockedVestingWallet​

PropertyValue
BaseOpenZeppelin VestingWalletCliff
One perFounder, team member or investor
Cliff12 months
Schedule25% at the cliff, 75% linearly over the next 36 months

Security Features:

  • Only vested tokens can be released
  • transferOwnership and renounceOwnership are disabled, so the beneficiary can never change
  • Tokens in the wallet cannot be staked and carry no vote

StakedGovernance​

PropertyValue
Voting PowerBalance staked in ProfitDistributor, read at vote time
Proposal Threshold100 staked 7N7D
Voting Period7 days (default)
Quorum10% of total staked, captured at proposal creation
ExecutionToken list changes at finalization; strategy and treasury outcomes recorded only

Security Features:

  • Votes recounted at finalization as min(recorded weight, stake at finalization), in one transaction
  • At most 1,000 voters per proposal; a counted vote above the minimum weight cannot be displaced
  • Owner (two-step transfer) can tune parameters within fixed bounds and pause proposing and voting
  • Finalization works while paused
  • Moves no funds

LiquidityAgentModule​

PropertyValue
FunctionOn-chain limits for the liquidity-management agent
ScopeOne 7N7D/USDC Uniswap v4 pool, fixed at deployment

Security Features:

  • The agent can add, reduce and collect fees on positions in that pool only
  • Collected fees go to a treasury address fixed at deployment
  • Daily caps on how much the agent can move
  • The agent cannot swap or withdraw funds
  • A guardian or the owner can pause it; only the owner can unpause or withdraw

LaunchLiquidityLock​

PropertyValue
FunctionHolds the launch pool's liquidity position
FeesAnyone can collect them; they always go to the treasury
UnlockThe position cannot move before the unlock time, then only to the founder Safe

Uniswap launch contracts​

The launch uses Uniswap's own contracts, unmodified:

ContractVersionRole
ContinuousClearingAuctionv2.1.0Sells 50M 7N7D for USDC
LiquidityLauncherv3.2.0Receives the liquidity allocation
LBPStrategyv3.3.0Runs the auction, enforces the 80/20 split, creates the v4 pool
Uniswap v4 PoolManager and PositionManagerv4The 7N7D/USDC pool and its position

Uniswap has not deployed the launchpad to Arbitrum Sepolia. The testnet rehearsal uses test instances built from the same source.

DepositRouter / DepositReceiver (CCTP)​

  • These are cross-chain deposit contracts, designed for Ethereum and Base as source chains and Arbitrum as destination.
  • No DepositRouter or DepositReceiver deployment is published for the current testnet.
  • CCTP mints Circle testnet USDC, which the current MockUSDC vault can't accept, so cross-chain deposits aren't available for the current testnet vault. See Cross-Chain Deposits.

Test coverage​

Each contract has its own Hardhat test suite. The launch contracts also have Foundry fuzz, invariant and fork tests.

ContractTests
Token7N7DHardhat unit, Foundry fuzz
LockedVestingWalletHardhat unit, Foundry fuzz
LiquidityAgentModuleHardhat unit, Foundry invariant and Arbitrum fork
ProfitDistributorHardhat unit, branch and audit-regression
StakedGovernanceHardhat unit, including the double-vote and voter-slot attacks
TradingVaultHardhat unit, fee, branch and audit-regression
DepositRouter / DepositReceiverHardhat unit and CCTP integration

The Uniswap launch flow is rehearsed end to end on an Arbitrum One fork and on Arbitrum Sepolia, including a failed auction that refunds every bidder.

Test Types​

  • Unit tests for all functions
  • Integration tests for workflows
  • Edge case and attack testing
  • Fuzz and invariant testing (launch contracts)

Reporting a vulnerability​

Email security@7n7d.com with:

  • the details;
  • steps to reproduce.

Give us time to fix the issue before disclosing it. Valid reports are rewarded under the Bug Bounty.