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

Below-LUP Deposit Fee Has Extreme Values At High Interest Rates #12

Open
kmbarry1 opened this issue May 3, 2023 · 0 comments
Open

Below-LUP Deposit Fee Has Extreme Values At High Interest Rates #12

kmbarry1 opened this issue May 3, 2023 · 0 comments

Comments

@kmbarry1
Copy link
Collaborator

kmbarry1 commented May 3, 2023

Context: LenderActions.sol#L168

Description: When poolState_.rate is very high, the assessed fee for deposits below the LUP (Lowest Utilized Price) will approach the entirety of the lender's deposit (note the calculation here); eventually, it even surpasses 100%, causing below-LUP deposit attempts to revert due to an underflow. Essentially, below-LUP deposits go from discouraged to impossible when rates in a pool are high. There is also the risk that a lender might not notice the incredibly high penalty and incur an almost total loss by accident.

Recommendation: Consider limiting the maximum below-LUP deposit fee.

Ajna: Maximum deposit fee capped to 10% in ajna-finance/ajna-core@1bf6ae9.

Prototech: Fix verified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant