Open hats-bug-reporter[bot] opened 1 month ago
Thank you for your submission.
This method estimates the ideal amounts needed to mint the specified amount of liquidity tokens. It may underestimate the amounts, however, rounding the amounts up could overestimate the amounts. It does not have to account for rates because the ideal amounts are the proportions of the reserves given the liquidity amount. This function works as intended.
Github username: -- Twitter username: -- Submission hash (on-chain): 0xea17b83c40d856bc1df34802a72bab986fcc09c7581e4ffd4ab43994094d6166 Severity: low
Description: Description\ Accroding to lib.get_amounts_for_liquidity_mint, the function returns how much tokens required to get
liquidity
amount of LP token.While calling mod.compute_amounts_given_lp, there are two issues
lib.get_amounts_for_liquidity_mint
, the tx might be reverted because there is another factor rate should be considered inlib.get_amounts_for_liquidity_mint
because rate might be updated within the functionAttack Scenario\ Describe how the vulnerability can be exploited.
Attachments
Proof of Concept (PoC) File
Revised Code File (Optional)