Skip to content

[PR #27] FlashLoanSource::UniswapV3 variant is wrong chain — BSC uses PancakeSwap V3 #64

@obchain

Description

@obchain

PR: #27 (commit 4a9a6d3)
File: crates/charon-core/src/types.rs, lines 43-50

Charon targets BSC exclusively (v0.1 scope). Uniswap V3 has no canonical deployment on BSC mainnet. FlashLoanSource enum exposes a UniswapV3 variant that will never resolve to a real pool on the target chain. Correct BSC flash-swap source is PancakeSwap V3, with fee tiers 100 / 500 / 2500 / 10000 (2500 tier does not exist on Uniswap V3).

Risk: Executor branching on FlashLoanSource::UniswapV3 to build flash-swap calldata produces a transaction that reverts on BSC. No funds lost (revert), but bot cannot execute any swap-backed liquidation.

Fix:

  • Rename UniswapV3PancakeSwapV3.
  • Update SwapRoute.pool_fee comment to reflect PancakeSwap V3 tiers (100/500/2500/10000).
  • Add #[non_exhaustive] to FlashLoanSource.

Metadata

Metadata

Assignees

No one assigned

    Labels

    layer:rustRust crates (core / scanner / protocols / executor / cli)pr-reviewFindings from PR review processpriority:p0-blockerBlocks the critical path

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions