LP deposits are a core protocol function with no inherent dependency on price data. A user depositing tokens is adding liquidity — there is no reason to consult an oracle during this operation.
deposit() calls getCalculatedFee(token, amount) which internally calls the TSwap pool for the token's WETH price. If the TSwap pool for the token does not exist, has zero liquidity, or reverts for any reason, all LP deposits for that token are blocked — a DoS on core functionality caused by an unrelated oracle dependency.
Likelihood:
A newly allowed token may not yet have a TSwap pool, causing all deposits for that token to revert from the moment it is enabled.
TSwap pool outages or insufficient liquidity — transient conditions outside ThunderLoan's control — propagate directly into deposit failures.
Impact:
LP capital cannot enter the protocol for any token whose TSwap pool is unavailable, paused, or not yet created — blocking protocol growth during new token onboarding.
The oracle failure DoS is silent: the deposit transaction reverts with a TSwap error rather than a ThunderLoan error, making the root cause non-obvious to users.
Place this test in test/ and run forge test --match-test test_depositRevertsWhenNoTSwapPool. The test demonstrates that deposit() reverts with a generic error when a token has no TSwap pool yet, blocking users from depositing newly allowlisted tokens until a pool is created.
Check whether a TSwap pool exists for the token before calling getExchangeRate() and skip the oracle call (using a fallback rate of 1:1) if no pool has been deployed yet.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.