Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded Q -> M from #336 [1668467652322] #508

Closed
c4-judge opened this issue Nov 14, 2022 · 2 comments
Closed

Upgraded Q -> M from #336 [1668467652322] #508

c4-judge opened this issue Nov 14, 2022 · 2 comments
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value duplicate-430 satisfactory satisfies C4 submission criteria; eligible for awards

Comments

@c4-judge
Copy link
Contributor

Judge has assessed an item in Issue #336 as M risk. The relevant finding follows:

[L-1]: Volatility accumulator can be be prevented from decaying by way of dust transactions
There is no required minimum swap amount for updating the volatility accumulated. The _fp.time is always updated during a swap.

src/libraries/FeeHelper.sol-69- }
src/libraries/FeeHelper.sol-70- }
src/libraries/FeeHelper.sol-71-
src/libraries/FeeHelper.sol:72: _fp.time = (block.timestamp).safe40(); /// @Audit LOW: This can be updated with dust txs.
src/libraries/FeeHelper.sol-73-
src/libraries/FeeHelper.sol-74- updateVolatilityAccumulated(_fp, _activeId);
src/libraries/FeeHelper.sol-75- }
By making dust transactions within the filter period interval, one can keep the volatility accumulator from decaying. This can be used to manipulate the volatility fees. This can be a profitable attack after the active bin moves by few hundred bins, hence _activeId.absSub(_fp.indexRef) is high enough when updating the volatility fee.

Consider requiring a minimum amount when updating the _fp.time.

@c4-judge c4-judge added the 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value label Nov 14, 2022
@c4-judge
Copy link
Contributor Author

GalloDaSballo marked the issue as duplicate of #430

@c4-judge
Copy link
Contributor Author

c4-judge commented Dec 3, 2022

GalloDaSballo marked the issue as satisfactory

@c4-judge c4-judge added the satisfactory satisfies C4 submission criteria; eligible for awards label Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value duplicate-430 satisfactory satisfies C4 submission criteria; eligible for awards
Projects
None yet
Development

No branches or pull requests

1 participant