Yan

Results 7 issues of Yan

## Issue Run ```cargo install --locked --path ./checker``` failed due to ``` failed to run custom build command for `z3-sys v0.7.1` ``` Caused by ``` process didn't exit successfully: `/target/release/build/z3-sys-1ee5d02118b012a6/build-script-build`...

It is suspected that overflow checking when minting LRNA token is not sufficient, in the `do_deposit` function of open-runtime-module-library-d3634ee624a28945/63b3219/tokens/src/lib.rs. ### Description ```Rust let new_total_issuance = Self::total_issuance(currency_id) .checked_add(&amount) .ok_or(ArithmeticError::Overflow)?; if change_total_issuance...

2 vulnerabilities and 1 deprecated crate are detected while performing dependency linting. The vulnerabilities will lead to memory leakage and segfault, considered to be sever ones. Strongly recommend to upgrade...

The AMM state machine in Omnipool operates in integer domain, where rounding is needed at each state change. We provided an analysis of the rounding effect with a special focus...

It is not necessary an issue or a vulnerability, but an observation of the current design. ### Description https://github.com/galacticcouncil/HydraDX-node/blob/16cdbcf25ef2f1dac5c3569d8cd44cc028ec4076/pallets/omnipool/src/lib.rs#L751 The state change of the `remove_liquidity()` operation calculates a [`delta_b`](https://github.com/galacticcouncil/HydraDX-math/blob/1f359462f1db35525fe588e5896a194cb485eb52/src/omnipool/math.rs#L285) variable...

When add liquidity, the tvl of an asset is vulnerable to stable coin price manipulation, since the preferred stable coin is a tradable asset in the pool and tvl is...

Usable balance of an account should be the free balance minus the frozen/locked balance. ### Description https://github.com/galacticcouncil/HydraDX-node/blob/20c8ac6079b8b3d6f16a9f15e9e43353ea6b9abc/pallets/omnipool/src/lib.rs#L1048 The quoted code above does not implement the correct logic of checking usable...