Skip to content

v2.1.2 — Soken round-2 remediation (APY-2026-06-002)

Choose a tag to compare

@kimandy7778 kimandy7778 released this 06 Jul 01:51
f046e9b

Round-2 audit response for Soken APY-2026-06-002 (V2.1.1 review, verdict REVIEW 78/100 with 25 new findings + 8 pre-release recommendations). All 8 recommendations addressed plus one self-identified post-submission fix (fix #9). Round-1 findings (16 total) remain fully mitigated.

What's fixed

Soken 8 pre-release recommendations

  • On-chain Chainlink minOut floor (F-04-MEV.1, N-03) — _computeMinOutFloor derives a fair-price minimum from Chainlink (preferred) or Owner-set fallback (long-tail tokens), reduced by per-token slippage (default 5%, MAX_SLIPPAGE_BPS_CAP = 10%).
  • Intermediate-hop whitelist (F-04-MEV.2, N-01, N-SP-01) — Owner-managed allowedHopToken; _validateSwapPath iterates middle hops and reverts HopTokenNotWhitelisted.
  • Pause propagation (N-02) — whenVaultNotPaused modifier on all 5 concrete claimAndCompound. User withdraw remains pause-free (invariant unchanged).
  • rewardToken == underlyingAsset skip-swap branch — replaces the prior AssetMismatch revert with a direct _deposit path when the distributor pays yield in USDC.
  • Owner rescue helpersweepIdleAssetToVault(). Moves only underlyingAsset; destination hardcoded to vault; reward / receipt tokens untouchable.
  • via_ir = true (M-BUILD-1) — foundry.toml.
  • TRUST_MODEL documentation (F-04-MEV.4) — docs/TRUST_MODEL.md §9 appended. Existing §1–§8 (V2.1 F-16 response) unchanged.
  • Constructor guards (R-01, R-02) — dexRouter extcodesize > 0 check; DEPLOY_CHAIN_ID immutable + onlyDeployChain on every fund-moving external; DexRouterConfigured event.

Self-identified post-submission (informational)

  • Accrue-aware view math (fix #9) — Vault.sol _convertToAssets / _convertToShares overridden to include _pendingFeeShares() in the divisor. Fixes the observed ERC4626ExceededMaxWithdraw revert on frontend "MAX" buttons in the V2.1.1-dev vault (Arbitrum). Not part of Soken's original 8; natural extension of Soken F-01 (accrue-BEFORE-preview) from the transactional path to the view path. Transactional-path correctness preserved (no-op there). See docs/SOKEN_AUDIT.md §11.3.9.

Tests

  • 40 new specs (36 for the 8 recommendations, 4 for fix #9).
  • npx hardhat test on this repo at v2.1.2: 143 passing / 9 pending / 0 regression.

Docs

Deployment status

V2.1.2 dev vault redeployment: pending (separate release track).

Verification

Reproduce with:

```
git clone https://github.com/coinlive-apyee/apyee-protocol.git
cd apyee-protocol
git checkout v2.1.2
npm install
npx hardhat test
```

Expected output: 143 passing, 9 pending, 0 failing.