-
Notifications
You must be signed in to change notification settings - Fork 5
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
KupiaSec - The api.burn
function should have cool down period
#114
Comments
api.burn
function should have cool down periodapi.burn
function should have cool down period
Escalate This is a duplicate of #94 |
You've created a valid escalation! To remove the escalation from consideration: Delete your comment. You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final. |
root cause is same for both |
Agree with the escalation, planning to accept and validate with #94. |
Result: |
Escalations have been resolved successfully! Escalation status:
|
KupiaSec
High
The
api.burn
function should have cool down periodSummary
Liquidity providers can burn their liquidity tokens anytime regardless minting time.
Attackers can take fees without contributing to the pool using this vulnerability.
Root Cause
There is no cool down period in the
api.burn
function.Internal pre-conditions
None
External pre-conditions
None
Attack Path
lp_token
by depositing 100 in quote token and the total supply oflp_token
is 100.lp_token
by depositing 10001000 + 100 + 10 = 1110
.lp_token
: Alice receives1000 * 1110 / 1100 = 1009
Alice pays 10 fees while closing the position and receives additional 9 fees while burning.
Even though Alice's minted 1000
lp_token
did not contribute to the users' positions, she received fees and this is unfair for other liquidity providers.This vulnerability is available for attackers to frontrun the closing position.
Impact
Fees are distributed to liquidity providers unfairly.
PoC
None
Mitigation
It is recommended to add the cool down period in the
api.burn
function and make burning available after cool down period.Duplicate of #94
The text was updated successfully, but these errors were encountered: