Based on the tests and usage in provide_liquidity, get_deposit_amounts assumes that:
▶ desired_a and desired_b are assumed to be > 0
▶ min_a and min_b are >= 0 if they are not None
However, these assumptions are not explicitly checked in the function.
Impact: Implicit constraints may be accidentally violated in future versions of the code.
Recommendation: Add checks to the arguments passed to get_deposit_amounts.
files: contracts/pool/src/storage.rs location: get_deposit_amounts
Based on the tests and usage in
provide_liquidity
,get_deposit_amounts
assumes that: ▶ desired_a and desired_b are assumed to be > 0 ▶ min_a and min_b are >= 0 if they are not NoneHowever, these assumptions are not explicitly checked in the function.
Impact: Implicit constraints may be accidentally violated in future versions of the code.
Recommendation: Add checks to the arguments passed to get_deposit_amounts.