sherlock-audit / 2024-11-telcoin-judging

0 stars 0 forks source link

smbv-1923 - `defiToStablecoinSwap()` would fail if `ss.stablecoinFeeCurrency` and `ss.origin` token are same #193

Open sherlock-admin3 opened 1 week ago

sherlock-admin3 commented 1 week ago

smbv-1923

Medium

defiToStablecoinSwap() would fail if ss.stablecoinFeeCurrency and ss.origin token are same

Summary

defiToStablecoinSwap() would fail if ss.stablecoinFeeCurrency and ss.origin token are same

Root Cause

https://github.com/sherlock-audit/2024-11-telcoin/blob/main/telcoin-audit/contracts/stablecoin/StablecoinHandler.sol#L144 https://github.com/sherlock-audit/2024-11-telcoin/blob/main/telcoin-audit/contracts/swap/AmirX.sol#L111

Internal pre-conditions

External pre-conditions

No response

Attack Path

Impact

PoC

No response

Mitigation