You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If Fee token would be Buy Token, then StableCoinSwap will revert
Summary
In StableCoinSwap, in codebase feetoken is being transfered to safe first and then buyToken is being minted to user.
So there can be case in both defiToStable and normal stablecoinswap that, feetoken will not be there with user in stablecoin swap if fee token would be buy token or lets say Target Token. then it would revert as low balance would be there in wallet
in both the case lets say there can be the case, in defitoSablecoin swap and in direct stable coin swap.
in user will swap AAve --> usdc --> eMXn
And if fee token would be eMxn , then in stableCoinSwap eMxn would not be minted to user before , as fee token would be transfered first and it would not be there with user as it i being minted later
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
both functions could revert due to minting of token is done after fee token is transfered
PoC
No response
Mitigation
FeeToken means target token should be minted first and then fee should be supplied to feeSafe.
The text was updated successfully, but these errors were encountered:
sherlock-admin3
changed the title
Shambolic Fiery Rook - If Fee token would be Buy Token, then StableCoinSwap will revert
0xlucky - If Fee token would be Buy Token, then StableCoinSwap will revert
Nov 17, 2024
0xlucky
High
If Fee token would be Buy Token, then StableCoinSwap will revert
Summary
In StableCoinSwap, in codebase feetoken is being transfered to safe first and then buyToken is being minted to user.
So there can be case in both defiToStable and normal stablecoinswap that, feetoken will not be there with user in stablecoin swap if fee token would be buy token or lets say Target Token. then it would revert as low balance would be there in wallet
Root Cause
https://github.com/sherlock-audit/2024-11-telcoin/blob/main/telcoin-audit/contracts/stablecoin/StablecoinHandler.sol#L144C4-L181C6
in both the case lets say there can be the case, in defitoSablecoin swap and in direct stable coin swap.
in user will swap AAve --> usdc --> eMXn
And if fee token would be eMxn , then in stableCoinSwap eMxn would not be minted to user before , as fee token would be transfered first and it would not be there with user as it i being minted later
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
both functions could revert due to minting of token is done after fee token is transfered
PoC
No response
Mitigation
FeeToken means target token should be minted first and then fee should be supplied to feeSafe.
The text was updated successfully, but these errors were encountered: