Submitted by Bauchibred
Take a look here:
This function is used to add a new token, when the token is added the rates are set to 0 by default up until a general epoch update before the real rate gets set for the token here.
Which calls this:
However, the problem is the fact that once this new token is added, and the rate is 0, an attacker can request a huge quota even up to the configured limit without having to pay any interest to the protocol all through the period where rate = 0.
A malicious user can request a very high quota and not pay any interest all through the period when the rate is defaulted to 0.
Consider atomically updating the rates in the instance where a new quoted token is added.
Context
0xtj24 (LoopFi) confirmed
Koolex (judge) decreased severity to Medium and commented:
Bauchibred (warden) commented:
Koolex (judge) increased severity to High and commented:
Bauchibred (warden) commented:
0xAlix2 (warden) commented:
Koolex (judge) commented:
