Pre-auditThree days of senior audit time for $1,500, credited in full toward your Zealynx audit.3 audit days, credited toward your auditSee how →
Checklists/EVM/Swap & Trading Security

Swap & Trading Security Checklist

Security checks for DEX swap execution, routing, MEV protection, and trading mechanics. 40 security checks derived from 1,505 real audit findings. Covering swap execution, routing, MEV protection, fee mechanisms, flash swaps, reentrancy, token compatibility, and access control.

Threat Analysis

Key statistics from analyzing 1,505 audit findings:

• 1,505 findings analyzed from real smart contract audits across major DeFi protocols

• 40 vulnerability patterns identified and categorized across 8 security domains

• 27 Critical/High items require immediate attention in any audit

📄
Want this as a PDF? DM me on Telegram →
⚡

Automate with Krait CLI

6/40 checks

15% of these checks can be automated against your codebase. 34 checks require manual review.

/krait:scan --deepInstall Krait →
Showing 40 of 40 vulnerabilities
#1

Swap Function Input Validation Missing

MediumKrait
▼

Swap functions fail to validate calldata against SwapParams, allowing parameter manipulation

#2

Insufficient Swap Path Validation

HighKrait
▼

Missing validation of swap routes can lead to token theft or liquidity drain

#3

Incorrect Swap Parameter Handling

High
▼

Swap functions pass incorrect parameters, causing users to receive wrong amounts

#4

Free Token Generation via Swap

High
▼

Swap functions allow receiving tokens without providing input tokens

#5

Swap Reverts on Overly Strict Requirements

MediumKrait
▼

Inner swap functions using stricter requirements than necessary cause unexpected reverts

#6

Missing Collection-Pool Validation in NFT Swaps

HighKrait
▼

NFT swap actions fail to validate collection against the target swap pool

#7

Router ETH Balance Drainage

Medium
▼

Router contract ETH balance can be drained by manipulating swap paths or transfers

#8

Incorrect Timestamp in Price Calculations

High
▼

Using block.timestamp instead of submitted timestamp in EMA/TWAP calculations

#9

Deprecated Transfer Methods for Native Tokens

Medium
▼

Using .transfer() instead of .call() for native token transfers causes failures

#10

Signature Concatenation Without Delimiters

MediumKrait
▼

Concatenating operations and parameters without separators enables signature forgery

#11

Malicious Calldata in Multi-Step Operations

High
▼

Multi-step operations like liquidations can be exploited via malicious calldata injection

#12

MEV and Sandwich Attack Vulnerabilities

High
▼

Swap and liquidity functions vulnerable to front-running and sandwich attacks

#13

MEV Exploitation in AMM Rebalancing

High
▼

AMM rebalancing and compounding functions susceptible to MEV extraction

#14

Post-Callback Execution Exploitation

Medium
▼

Callback functions allow additional operations after execution, enabling state manipulation

#15

Gas Limit Exceedance in Batch Auctions

MediumKrait
▼

Settlement of batch auctions can exceed gas limit, causing transaction failures

#16

Signature Replay Across Wallet Updates

Medium
▼

Public keys reused across wallet updates enable signature replay attacks

#17

Swap Fee Calculation Manipulation

Medium
▼

Incorrect fee calculations allow economic exploits through unbounded accumulation or time manipulation

#18

Incorrect Fee Decimal Scaling

High
▼

AMM protocols miscalculate fees due to decimal scaling errors across token pairs

#19

Inconsistent Fee Logic Between Quote and Execution

High
▼

Fee calculations differ between quoting and execution functions, causing unexpected costs

#20

Incorrect Fee Distribution Function Calls

Medium
▼

Wrong fee calculation functions called in AMM contracts cause improper fee allocation

#21

Fee Rounding Exploitation

High
▼

Rounding down of fees or fixed fee levels enables systematic fee avoidance

#22

Reentrancy in Liquidation Functions

High
▼

Liquidation functions vulnerable to reentrancy via external calls before state updates

#23

Reentrancy in LP Token Minting

High
▼

Reentrancy during LP token minting allows repeated calls that drain vault funds

#24

Incorrect Rounding Direction in AMM Math

High
▼

Rounding errors in AMM pricing functions allow systematic fund extraction

#25

Price Manipulation via Order Splitting

High
▼

Splitting large orders into smaller transactions achieves better rates due to fee/price calculation flaws

#26

State Manipulation in Order Updates

High
▼

Repeatedly calling order update functions creates risk-free trading opportunities

#27

Unsafe Token Transfer Methods

Medium
▼

Using transfer() instead of safeTransfer() causes silent failures with non-standard tokens

#28

Fee-on-Transfer Token Incompatibility

High
▼

Fee-on-transfer tokens break expected token behavior in AMM pools

#29

Inconsistent Rounding Directions Across Operations

High
▼

Different rounding directions for buy/sell or mint/burn operations create arbitrage

#30

Token Decimal Mismatch

High
▼

Hardcoded 18-decimal assumption causes incorrect calculations with non-standard tokens

#31

Missing Token Transfer Validation

High
▼

Functions process state changes without verifying that token transfers actually succeeded

#32

Oracle Manipulation via Flash Swap Timing

Medium
▼

Oracle prices updated multiple times in the same block enable arbitrage through flash swaps

#33

Flash Loan Exploitation in Liquidation

High
▼

Flash loans can open/close positions within one transaction to siphon liquidation rewards

#34

Missing Flash Loan Initiator Validation

High
▼

Flash loan callbacks don't verify the caller identity, enabling impersonation

#35

Flash Loan Governance Manipulation

High
▼

Flash loans temporarily inflate voting power to manipulate governance outcomes

#36

Reentrancy in Flash Swap Operations

High
▼

Flash swaps exploitable via reentrancy attacks during token transfers

#37

Mutable Pool Contract Configuration

High
▼

Setter functions for pool contracts can redirect funds or break trading functionality

#38

Unrestricted Owner Withdrawals

High
▼

Owner can withdraw any token at any time, including user-staked tokens

#39

Unrestricted Administrative Functions

High
▼

Administrative functions lack proper access control restrictions, allowing anyone to call them

#40

Unrestricted Liquidity Ownership Assumption

High
▼

Contracts assume full control over liquidity pools without verifying actual ownership

Need a Professional Swap & Trading Audit?

DeFi protocols handle billions in daily trading volume. Get your protocol audited by a team that understands swap mechanics and MEV-specific attack vectors.