Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gammaswap/v2-deltaswap
GammaSwap decentralized feeless spot exchange
https://github.com/gammaswap/v2-deltaswap
Last synced: about 1 month ago
JSON representation
GammaSwap decentralized feeless spot exchange
- Host: GitHub
- URL: https://github.com/gammaswap/v2-deltaswap
- Owner: gammaswap
- License: gpl-3.0
- Created: 2023-08-14T17:53:35.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-22T19:45:08.000Z (9 months ago)
- Last Synced: 2024-11-08T19:52:34.439Z (about 2 months ago)
- Language: Solidity
- Size: 924 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
V2-DeltaSwap
## Description
DeltaSwap is an AMM that employes the constant product market maker formula used by UniswapV2 but without or low trading fees on transactions with low market impact## Note
Built with solidity version 0.8.19 because Arbitrum doesn't support 0.8.21## Steps to Run GammaSwap Tests Locally
1. Run `yarn` to install GammaSwap dependencies
2. Run `yarn test` to run hardhat tests
3. Run `yarn fuzz` to run foundry tests
*must use second init code hash when running foundry tests.## Note
If code is updated print init code hash for hardhat tests from DeltaSwapV2Factory.spec.ts. Uncomment the part in the BeforeEach statement. This is the first init_code_hash shown in DeltaSwapLibrary.sol.
For foundry tests uncomment the part in DeltaSwapSetup.sol initDeltaSwap. This is the second init code hash.The difference in initcode hashes for foundry tests and hardhat tests seems to be because of foundry inserting metadata into the solidity code, which makes the code compile to a different bytecode and unrecognized by the router contract.
The actual bytecode use in a live network would be the one in the first line of the DeltaSwapLibrary.sol file. The one produced by the Factory contract hardhat unit test.