HydraDX-node
HydraDX-node copied to clipboard
HydraDX node - cross-chain liquidity protocol built on Substrate
`sell` passes the absolute value of the hub asset imbalance to `calculate_sell_state_changes`, ignoring the sign: https://github.com/galacticcouncil/HydraDX-node/blob/8de6222f967cc1bfe120207a775e8f0dc8eb92a5/pallets/omnipool/src/lib.rs#L957 . This should be safe, since the LRNA imbalance is always negative for now....
`calculate_delta_imbalance` uses `asset_state.reserve` and `asset_state.hub_reserve` for its computation: https://github.com/galacticcouncil/HydraDX-math/blob/f4dab244bb5d57971325f0ba6fbb8f6c1353beeb/src/omnipool/math.rs#L419-L421 `add_liquidity` calls `recalculate_imbalance` which calls `calculate_delta_imbalance` with `new_asset_state` as an argument. This means that `calculate_delta_imbalance` receives the updated values for `asset_state.reserve`...
The sell endpoint does not check that the in and out assets are distinct. At the same time, it loads the asset data for both assets near the start of...
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...
The `SimpleBalance` implementation does not use a consistent sign for `0`. By default `0` is negative, and `add` also makes `0` negative, but `sub` makes it positive. In the current...
Companion https://github.com/galacticcouncil/Basilisk-node/issues/465
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...
Omnipool implementation. TODO: - [x] Imbalances/TVL updates - [x] Few clarifications about math ( marked as TODO: ask colin ). - [x] Tests - [x] Benchmarks