Pi-Squared-Inc / solidity-demo-semantics

Demonstration Solidity Semantics in K
2 stars 2 forks source link

Summary for `uniswapV2LibraryGetAmountOut` and `uniswapV2LibraryGetAmountIn` #35

Closed Robertorosmaninho closed 1 month ago

Robertorosmaninho commented 1 month ago

This PR adds two new summarized rules regarding program execution. The rule presented in this PR summarizes the uniswapV2LibraryGetAmountOut and uniswapV2LibraryGetAmountIn functions.

By summarizing the uniswapV2LibraryGetAmountOut function, we save 380 steps. (Without it, the program took 26748, and after implementing it, the program took 26368)

By summarizing the uniswapV2LibraryGetAmountIn function, we save 408 steps. (Without it, the program took 26368, and after implementing it, the program took 25960)