The extendDeposit() function moves a staking position into a new tranche but does not record the new tranche in the tokenIdToTranches mapping. As a result, stakedNxm() and totalAssets() underreport the vault's holdings until resetTranches() is called, which could let a depositor obtain an inflated number of shares.
The StNxmOracle contract queries a 30-minute TWAP from a Uniswap V3 pool but does not ensure the pool's observation cardinality is sufficient, so the price function reverts. This causes a denial of service for dependent systems like Morpho markets.
During the migration of NXM tokens from the old arNXM contract to the new stNXM contract, the update modifier incorrectly calculates admin fees on the entire migrated balance because the staked amount is zero. This allows a malicious user or the owner to charge admin fees on all migrated NXM tokens, reducing users' balances.
The stNXM contract adds liquidity to a Uniswap pool without any slippage protection, so an attacker can front-run the initialisation and move the pool price to an extreme tick. The liquidity is then added entirely in wNXM at a worthless price, and the attacker can swap a tiny amount of stNXM to drain all the wNXM.
The oracle's sanity check computes an annualised percentage yield by dividing by the time elapsed since the protocol started, which magnifies small normal price deviations early on and lets large deviations pass later. This can cause the Morpho market to revert on health checks early and allow abnormal prices to be accepted later.
The StNXM contract only approves the top-up amount of NXM tokens to the TokenController, but when extending an expired tranche the StakingPool withdraws the full stake and redeposits it together with the top-up, requiring approval for the larger total. As a result, the redeposit fails and the transaction reverts, leaving the extension incomplete.
The owner-only stakeNxm function does not verify that the vault owns the requested NFT token ID, so an admin can approve the vault for an NFT they still own and have vault funds staked to that NFT. The admin can then withdraw the stake, taking assets funded by the vault.
The vault's decreaseLiquidity function does not verify that the supplied Uniswap V3 position tokenId belongs to the wNxm/stNxm pool. The owner can pass a tokenId from a different pool, causing the vault to burn its own shares and allowing the owner to withdraw more assets while other users' withdrawals are blocked.
The contract owner can pass a fake staking pool address to stakeNxm(), which is stored without validation. By setting themselves as fee beneficiary and calling getRewards(), the fake pool returns inflated rewards, increasing adminFees so the owner can withdraw the contract's entire wNXM balance.
The owner can remove a staked NFT from the tokenIds array without withdrawing its stake, causing the vault's totalAssets to appear lower. The owner can then deposit to over-mint shares and later re-add the NFT to inflate totalAssets, redeeming shares at a higher price and diluting other holders.
The stNXM contract adds a tranche ID to a token's tranche list without checking for duplicates, so repeated staking with the same tranche ID inflates the computed stakedNxm and totalAssets. This can lead to incorrect minting and redemption amounts, and a malicious owner could exploit it to redeem at an inflated value.