Skip to content

Commit

Permalink
docs: Update reference of Approximation (backport #22550) (#22558)
Browse files Browse the repository at this point in the history
Co-authored-by: NAIHANU <[email protected]>
  • Loading branch information
mergify[bot] and NAIHANU authored Nov 19, 2024
1 parent 3fcdcae commit 3a26c3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/build/building-apps/04-security-part-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ This is a consideration that seems trivial but comes up much more frequently tha

A few months ago, a security researcher [reported a vulnerability](https://blog.trailofbits.com/2023/10/23/numbers-turned-weapons-dos-in-osmosis-math-library/) in the Osmosis codebase stemming from [PowApprox function](https://github.com/osmosis-labs/osmosis/blob/44a6a100a92f2984a760b41b7486fb9000ac670e/osmomath/math.go#L86). The crux of the issue was centered around long-lasting convergence for certain input values. A determined attacker could in theory use such edge cases to temporarily halt the chain. **The solution in these cases is simple - [introduce a constant loop bound](https://github.com/osmosis-labs/osmosis/pull/6627).**

As a side note, from our experience, rational approximation is a more accurate and performant substitute to Taylor expansion which is used in `PowApprox` of the above example. See [this article](https://xn--2-umb.com/22/approximation/) for details.
As a side note, from our experience, rational approximation is a more accurate and performant substitute to Taylor expansion which is used in `PowApprox` of the above example. See [this article](https://web.archive.org/web/20240628100055/https://xn--2-umb.com/22/approximation/) for details.

## Key Malleability and Prefix Iteration

Expand Down

0 comments on commit 3a26c3b

Please sign in to comment.