Skip to content

Latest commit

 

History

History
46 lines (26 loc) · 1.13 KB

080.md

File metadata and controls

46 lines (26 loc) · 1.13 KB

Late Hotpink Dinosaur

Medium

Native Token (POL) Fee Processing Failure in StablecoinSwap

Summary

Incorrect ERC20 handling of native POL token will cause complete failure of fee collection for POL-based fees as the contract attempts to use ERC20 methods on the native token address, preventing successful fee processing.

Root Cause

In StablecoinHandler.sol:_stablecoinSwap() at https://github.com/sherlock-audit/2024-11-telcoin/blob/main/telcoin-audit/contracts/stablecoin/StablecoinHandler.sol#L152, the function attempts to handle POL (native token) using ERC20 interface methods, which is fundamentally incompatible with native token transfers in case stablecoinFeeCurrency is POL.

ERC20PermitUpgradeable(ss.stablecoinFeeCurrency).safeTransferFrom(
    wallet,
    ss.stablecoinFeeSafe,
    ss.feeAmount
);

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

No response

Impact

The protocol cannot process any swaps that use POL as the fee currency, effectively breaking a core feature of the system.

PoC

No response

Mitigation

No response