code-423n4 / 2023-09-goodentry-mitigation-findings

0 stars 0 forks source link

H-04 MitigationConfirmed #31

Open c4-submissions opened 1 year ago

c4-submissions commented 1 year ago

Lines of code

Vulnerability details

Comments

H-04 raised two questions:

  1. The 1% threshold check is based on the separate quantity for each token rather than the total value
  2. Users can inject a small amount of funds to bypass the feeLiquidity charging logic and ensure maximum liquidity

The attack process is to use flash loans to first deposit and then withdraw to steal part fees. The more idle fees, the greater the attacker's profits.

Mitigation

  1. The team has removed this part of the logic. TokenisableRange fees are no longer compounded directly in TR, but instead sent to the corresponding GeVault.
  2. The team has removed the complex double charging mechanism. Now each deposit will only charge for Liquidity, so attackers can no longer bypass the feeLiquidity relevant logic.

Conclusion

LGTM

c4-judge commented 12 months ago

gzeon-c4 marked the issue as confirmed for report

c4-judge commented 12 months ago

gzeon-c4 marked the issue as satisfactory