Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sambacha/swap-compare
Solidity/Ethereum knowledge test: trade/swap implementation assessment
https://github.com/sambacha/swap-compare
ethereum flashbots mev skill-test skill-tests solidity sushiswap uniswap
Last synced: 2 months ago
JSON representation
Solidity/Ethereum knowledge test: trade/swap implementation assessment
- Host: GitHub
- URL: https://github.com/sambacha/swap-compare
- Owner: sambacha
- License: mit
- Created: 2021-08-13T11:30:25.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-02-23T08:42:20.000Z (11 months ago)
- Last Synced: 2024-10-12T08:15:26.008Z (3 months ago)
- Topics: ethereum, flashbots, mev, skill-test, skill-tests, solidity, sushiswap, uniswap
- Language: Solidity
- Homepage:
- Size: 1.69 MB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SwapMeHarder
> [!IMPORTANT]
> This is an example showing the usage difference between case/switch vs. If/elseCompare the implementation of the two different functions in `contracts/SwapMeHarder.sol`.
They are suppose to implement a swap functionality for trading. They achieve the same* results, but from slightly different ways.> [!WARNING]
> *same* is, well, you will see.
## Objectives
calculate: transaction cost
calculate: execution cost
determine best implementation for general use case
determine best implementation for bespoke/specific use case## Brownie points:
Any defects or anti-patterns?
Any additional optimizations? *(Yul versions do not count!)*## Key Results
Decided which one to use, and any additional caveats
What further enhancements could be made?## Summary
Which implementation is gas minimizing?
Which implementation is `better`? Does the answer depend on pairs/markets/etc?
## License
MIT
## Notice
![](.github/iu.png)