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)
| Contract | Address |
|---|---|
| Token7N7D | 0x535bd08033A06d3CbF2D4566BafB62445eed9702 |
| ProfitDistributor v2 | 0xAbFdcB235b56dd32cc1172C64D0550f99423FEdA |
| StakedGovernance v2 | 0x925585C2cAC054b1517bB0FA28B78d7Ae4f5aA0E |
| ProfitDistributor v1, exit only | 0x3d2742c5C5EdF2Fcd3A27254e27620D6c1BDDCdD |
| Interim ProfitDistributor (MockUSDC), exit only | 0x2750427C70b3dAF8EeA96f6c3dFC7459faaaF59B |
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).
| Contract | Address |
|---|---|
| Token7N7D | 0x3ECC41994b8f8eFb944ea10Ed16ef2766fc45feF |
| ProfitDistributor | 0xE4AAdc43434AAa3872A8D183Dd3CB8b0fFf9dbea |
| StakedGovernance | 0x26d57B1Cc45568128e6c2fc639931aB7Aa4fBCcd |
| TradingVault | 0x225c91C3943028EbBa44e33202Ef914B845F0267 (a new build is pending, see below) |
| LaunchLiquidityLock (demo) | 0x4248Ed96b6a0a05Cb253027EB4CBE28d5B363d9d |
| LiquidityAgentModule | 0xc36A6812B93Bc0ceD8a3CCC28693d295Fc57A329 |
| LockedVestingWallet | 0x1f115d9a83F5d4186BD15006187F2d7F3C4c3C52 |
| LockedVestingWallet | 0xd9d586FD0Ea455c60AF5E72d303d2da4Ae92f907 |
| LockedVestingWallet | 0xCf9159e6ef4142b7558Ce501017A54A2cDA4D1ac |
| LockedVestingWallet | 0x6302A2a6086f6ac24a15b1CAeEE0D714a07f489d |
| Vault asset: MockUSDC | 0x3a55B1E3B5Af2D90A3802b7359a6EC1fc0a435FD |
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)
| Power | Function | Effect |
|---|---|---|
| Move vault USDC | withdrawFundsForTrading(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-list | proposeTradingRecipient(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. |
| Pause | pause() / 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 writer | setNavUpdater(address) | Chooses who can write NAV, which sets the share price |
| Write NAV | updateNav(newNav) | The owner can also write NAV directly, within the same caps |
| Set the fee recipient | setFeeRecipient(address) | Chooses where all management and performance fees go |
| Set the governance token | setGovernanceToken(address) | Only affects the informational fee-discount views |
TradingVault owner (current vault 0x225c…0267)
Same as the new build, except:
| Power | Function | Effect |
|---|---|---|
| Move vault USDC | withdrawFundsForTrading(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. |
| Pause | pause() / unpause() | Blocks deposits, withdrawal requests and withdrawal completions. Cancelling a request still works. |
ProfitDistributor owner
| Power | Function |
|---|---|
| Start reward streams | notifyRewardAmount(reward) |
| Change the hold-back share | setBuybackPercentage(bps), anywhere up to 100% of each reward (0 on testnet) |
| Set the reserve and send held-back USDC there | setBuybackReserve, transferBuybackToReserve |
| Pause staking | pause() / unpause(). Unstaking and claiming still work |
| Recover stray tokens | recoverERC20. This can't take the staking token or USDC |
StakedGovernance owner
| Power | Function |
|---|---|
| Tune proposal threshold, voting period, quorum and minimum vote weight, within fixed bounds, for new proposals | setProposalThreshold, setVotingPeriod, setQuorumBps, setMinVoteWeight |
| Pause proposing and voting. Finalization still works | pause() / unpause() |
| Seed the trading-pair lists once. Locked forever after | seedTokens (already used) |
StakedGovernance holds no funds.
LiquidityAgentModule owner and guardian
| Power | Who |
|---|---|
| Pause the module | Guardian or owner |
| Unpause, set the operator, guardian and daily limits | Owner |
| Withdraw idle tokens or a position NFT | Owner |
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
withdrawFundsForTradingcan 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
| Review | Scope | Status |
|---|---|---|
| Internal audit | TradingVault and ProfitDistributor (still in use), plus four contracts of an earlier token design that has been replaced | Done 2026-07-30 (report) |
| Third-party audit | All contracts | Pending, not yet commissioned |
| Internal review and tests | Token7N7D, LockedVestingWallet, StakedGovernance, LiquidityAgentModule, LaunchLiquidityLock | No 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/redeemfunctions revert. Withdrawals userequestWithdrawal→ 7 days →processWithdrawal, andcancelWithdrawalis 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.
recoverERC20refuses the staking token and USDC, so staked tokens cannot be taken. See Staking.
Token7N7D
| Property | Value |
|---|---|
| Standard | ERC-20 (OpenZeppelin), 18 decimals |
| Total Supply | 1,000,000,000, minted once in the constructor |
| Mintable | No |
| Burnable | No |
| Pausable | No |
| Owner / roles | None |
| Vote checkpoints | None (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
| Property | Value |
|---|---|
| Base | OpenZeppelin VestingWalletCliff |
| One per | Founder, team member or investor |
| Cliff | 12 months |
| Schedule | 25% at the cliff, 75% linearly over the next 36 months |
Security Features:
- Only vested tokens can be released
transferOwnershipandrenounceOwnershipare disabled, so the beneficiary can never change- Tokens in the wallet cannot be staked and carry no vote
StakedGovernance
| Property | Value |
|---|---|
| Voting Power | Balance staked in ProfitDistributor, read at vote time |
| Proposal Threshold | 100 staked 7N7D |
| Voting Period | 7 days (default) |
| Quorum | 10% of total staked, captured at proposal creation |
| Execution | Token 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
| Property | Value |
|---|---|
| Function | On-chain limits for the liquidity-management agent |
| Scope | One 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
| Property | Value |
|---|---|
| Function | Holds the launch pool's liquidity position |
| Fees | Anyone can collect them; they always go to the treasury |
| Unlock | The position cannot move before the unlock time, then only to the founder Safe |
Uniswap launch contracts
The launch uses Uniswap's own contracts, unmodified:
| Contract | Version | Role |
|---|---|---|
| ContinuousClearingAuction | v2.1.0 | Sells 50M 7N7D for USDC |
| LiquidityLauncher | v3.2.0 | Receives the liquidity allocation |
| LBPStrategy | v3.3.0 | Runs the auction, enforces the 80/20 split, creates the v4 pool |
| Uniswap v4 PoolManager and PositionManager | v4 | The 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.
| Contract | Tests |
|---|---|
| Token7N7D | Hardhat unit, Foundry fuzz |
| LockedVestingWallet | Hardhat unit, Foundry fuzz |
| LiquidityAgentModule | Hardhat unit, Foundry invariant and Arbitrum fork |
| ProfitDistributor | Hardhat unit, branch and audit-regression |
| StakedGovernance | Hardhat unit, including the double-vote and voter-slot attacks |
| TradingVault | Hardhat unit, fee, branch and audit-regression |
| DepositRouter / DepositReceiver | Hardhat 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.