v2.1.2 — Soken round-2 remediation (APY-2026-06-002)
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
minOutfloor (F-04-MEV.1, N-03) —_computeMinOutFloorderives 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;_validateSwapPathiterates middle hops and revertsHopTokenNotWhitelisted. - Pause propagation (N-02) —
whenVaultNotPausedmodifier on all 5 concreteclaimAndCompound. Userwithdrawremains pause-free (invariant unchanged). rewardToken == underlyingAssetskip-swap branch — replaces the priorAssetMismatchrevert with a direct_depositpath when the distributor pays yield in USDC.- Owner rescue helper —
sweepIdleAssetToVault(). Moves onlyunderlyingAsset; destination hardcoded tovault; 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) —
dexRouterextcodesize > 0check;DEPLOY_CHAIN_IDimmutable +onlyDeployChainon every fund-moving external;DexRouterConfiguredevent.
Self-identified post-submission (informational)
- Accrue-aware view math (fix #9) — Vault.sol
_convertToAssets/_convertToSharesoverridden to include_pendingFeeShares()in the divisor. Fixes the observedERC4626ExceededMaxWithdrawrevert 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). Seedocs/SOKEN_AUDIT.md§11.3.9.
Tests
- 40 new specs (36 for the 8 recommendations, 4 for fix #9).
npx hardhat teston this repo atv2.1.2: 143 passing / 9 pending / 0 regression.
Docs
docs/SOKEN_AUDIT.md§11 — V2.1.2 remediation full section including §11.3.9 fix #9.docs/TRUST_MODEL.md§9 — V2.1.2 additions.CHANGELOG.md— full V2.1.2 changelog entry with new Vault layer section.
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.