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
The vulnerability arises from the fact that this fee can set at any time by the protocol authority account :
function setTokenizationFee(uint256_tokenizationFee) externaloverride restricted {
if (_tokenizationFee > MAX_TOKENIZATION_FEE) {
revertFeeGreaterThanMaxValue();
}
emitTokenizationFeeChange(tokenizationFee, _tokenizationFee);
tokenizationFee = _tokenizationFee;
}
If the fee goes up, users can end-up paying higher fees than expected.
Attack Scenario
Consider the following scenario:
User A wishes to make several deposits from his contract.
He therefore calculates the required amounts plus fee to facilitate the deposits.
Finally he sends the deposit transactions.
Meanwhile, the protocol authority wants to increases the fee by 5%. He therefore calls setTokenizationFee, but with a higher gas price than User A.
When the transactions are processed, the validator chooses to prioritize the protocol authority's transaction ahead of user A's calls .
Due to the fee increment, the protocol user will pay more than expected fee causing some transactions to fail with an ERC20InsufficientAllowance error.
This scenario is even more likely to happen if the protocol admin chooses to send his transaction via MEV or during periods of high gas price volatility that can motivate the protocol authority to send his transaction with high gas price. Even if a TimeLock contract is used to update such fee, users can still end up with suprise fee changes since that requires users to keep up with the relevant updating contracts.
Attachments
Proof of Concept (PoC) File
This POC shows that a deposit transaction can fail due to insufficient token approval:
Hello,
The report does not say that the DAO needs to be malicious for the user to pay excess fee. There is a very real possibility for this scenario to happen since both parties are well motivated to act in their own interest even unaware of the other's actions. The DAO can send the update as part of other transactions. Maybe I can provide a better POC...
ie the user is making a deposit, the DAO is updating the tokenization fee and the validator chooses to prioritize the DAO transactions. In this scenario, the user will definitely pay unexpected fee. All these conditions are very likely to happen.
Github username: @0xSwahili
Twitter username: --
Submission hash (on-chain): 0x468bd6737182dd0a8ad12826c0130b1894c9a1c18627568f8e26abd58f1e68c2
Severity: high
Description:
Description
When depositing IBT token to the PrincipleToken contract, users pay a tokenization fee:
The vulnerability arises from the fact that this fee can set at any time by the protocol authority account :
If the fee goes up, users can end-up paying higher fees than expected.
Attack Scenario
Consider the following scenario:
Due to the fee increment, the protocol user will pay more than expected fee causing some transactions to fail with an ERC20InsufficientAllowance error.
This scenario is even more likely to happen if the protocol admin chooses to send his transaction via MEV or during periods of high gas price volatility that can motivate the protocol authority to send his transaction with high gas price. Even if a TimeLock contract is used to update such fee, users can still end up with suprise fee changes since that requires users to keep up with the relevant updating contracts.
Attachments
This POC shows that a deposit transaction can fail due to insufficient token approval:
The text was updated successfully, but these errors were encountered: