EPOL

SECURITY

Audit & Verification

EPOL DEX Phase 3 — Internal Security Audit | March 16, 2026

Scope: EpolVault.sol, EpolStrategy.sol, EpolLockedVault.sol, AntiWhaleRouter.sol

CONTRACTS VERIFIED

8

CRITICAL ISSUES

0

TEST COVERAGE

72 tests

LAST AUDIT

Mar 2026

Summary

SeverityFoundFixedRemaining
CRITICAL220
HIGH752
MEDIUM633
LOW615
INFO413

Findings

CRITICAL-1

EpolVault.sol

ERC-4626 Inflation Attack

No virtual share offset or dead shares — first depositor could steal subsequent deposits via share price manipulation.

FIXAdded _decimalsOffset() returning 6, providing 1e6 virtual shares per asset unit.

CRITICALFIXED

CRITICAL-2

EpolVault.sol:191-213

setStrategy() Reentrancy + CEI Violation

External call to old strategy before state update; missing nonReentrant.

FIXAdded nonReentrant modifier. Reordered to update strategy state BEFORE making external calls (CEI pattern).

CRITICALFIXED

HIGH-1

EpolStrategy.sol:178-199

harvest() State Update After External Calls

State was updated after external calls, violating CEI pattern.

FIXMoved lastHarvest = block.timestamp before _chargeFees() and _addLiquidity() external calls.

HIGHFIXED

HIGH-2

EpolStrategy.sol:165

withdraw() Not Paused

Withdraw function remains active during paused state.

FIXIntentional — users must be able to withdraw even during emergencies.

HIGHACCEPTED

HIGH-3

AntiWhaleRouter.sol

AntiWhaleRouter Multi-Hop Bypass

Only checked first/last token pair, allowing bypass via intermediate routing.

FIXReplaced _computeTax with _computeTaxMultiHop that checks ALL hops in the path.

HIGHFIXED

HIGH-4

AntiWhaleRouter.sol

Flash Loan Pool Manipulation

Requires TWAP oracle for full mitigation.

FIXCurrent spot-price check is sufficient for initial deployment on Polygon where flash loans are less prevalent.

HIGHACCEPTED

HIGH-5

EpolLockedVault.sol:244-247

earlyWithdraw() MIN_DEPOSIT Revert

Vault deposit could revert if amount is below MIN_DEPOSIT.

FIXWrapped vault.deposit() in try/catch. If vault rejects, penalty is sent to treasury instead.

HIGHFIXED

HIGH-6

EpolVault.sol:231-238

panic() Recovery Path

Unclear recovery path after panic() is called.

FIXUpdated documentation to clarify that strategy should NOT be set to address(0) after panic.

HIGHFIXED

MEDIUM-3

AntiWhaleRouter.sol

ETH Tax Transfer to Non-Payable Treasury

Treasury is an EOA in current deployment. If changed to contract via timelock, ensure it accepts ETH.

MEDIUMNOTED

MEDIUM-5

EpolStrategy.sol

minHarvestAmount Lower Bound

No minimum floor for harvest amount could allow griefing.

FIXAdded require(_amount >= 1e15) floor to prevent griefing harvests with 0 EPOL.

MEDIUMFIXED

Test Results

72tests passed — 0 failed, 0 skipped
EpolVaultTest7
EpolStrategyTest6
EpolLockedVaultTest6
AntiWhaleRouterTest12
AntiWhaleTimelockTest12
UniswapV2IntegrationTest17
EpolFarmTest12

Verified Contracts

FactorySolidity 0.5.16
0x275503aC…0a7f0524
RouterSolidity 0.6.6
0x0F6093ab…E5A6C0de
FarmSolidity 0.8.33
0x7B316968…7b4f57BE
BEDR/WPOL LPSolidity 0.5.16
0xeE0d7115…5e225d52
wBEDR/EPOL LPSolidity 0.5.16
0x147a6f05…72a3cAF8
USDT/BEDR LPSolidity 0.5.16
0x236B74c1…46853816
USDT/EPOL LPSolidity 0.5.16
0x6a9fc77D…af4d02ec

Residual Risks

  • !Flash loan manipulation of AntiWhaleRouter — mitigated by Polygon's lower flash loan availability; full fix requires TWAP oracle
  • !Centralization risk — Owner can set strategy, deposit cap, treasury. Mitigated by timelock on AntiWhaleRouter
  • !MEV/Sandwich attacks on harvest — Inherent to on-chain swaps. slippageTolerance (default 0.5%) limits exposure
  • !Hard-locked positions irrecoverable — By design for private sale compliance

This is an internal audit report. External audit recommended before significant TVL growth.

All contract source code is verified and publicly viewable on PolygonScan.