Cross-chain transfers can be frontrun with fee change #60
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate
This issue or pull request already exists
invalid
This doesn't seem right
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Lines of code
https://github.com/code-423n4/2022-03-biconomy/blob/db8a1fdddd02e8cc209a4c73ffbb3de210e4a81a/contracts/hyphen/token/TokenManager.sol#L44
Vulnerability details
Impact
Owners can change the fee that is taken on each transfer by calling
changeFee
.They can frontrun cross-chain transfers and steal the user's transfer amount.
POC
changeFee(_equilibriumFee=100%, maxFee=100%)
sendFundsToUser
, the user loses all their funds.Recommended Mitigation Steps
Consider adding a delay to when the new fees can be activated to ensure that users get the fees they saw when they started the x-chain transfer.
The text was updated successfully, but these errors were encountered: