https://github.com/kybernetwork/kyberswap-dex-lib
DexLib is a library used by Kyberswap backend to integrate with decentralized exchanges. This library enables external DEX developers to integrate their DEX with Kyberswap by creating pull requests to this repository.
https://github.com/kybernetwork/kyberswap-dex-lib
Last synced: about 1 month ago
JSON representation
DexLib is a library used by Kyberswap backend to integrate with decentralized exchanges. This library enables external DEX developers to integrate their DEX with Kyberswap by creating pull requests to this repository.
- Host: GitHub
- URL: https://github.com/kybernetwork/kyberswap-dex-lib
- Owner: KyberNetwork
- Created: 2023-05-23T10:06:39.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2026-05-25T03:16:30.000Z (about 1 month ago)
- Last Synced: 2026-05-25T04:29:51.738Z (about 1 month ago)
- Language: Go
- Homepage:
- Size: 72.5 MB
- Stars: 64
- Watchers: 8
- Forks: 90
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# kyberswap-dex-lib
## What?
KyberSwap uses this lib for off-chain tracking and computation, specifically
1. Fetch pools;
2. Track latest pool states; and
3. Simulate expected output for a given input swap amount
in order to search for the optimal aggregated swapping route.
## How to Contribute?
* Off-chain: Implements 3 things in pkg/liquidity-source (pkg/source contains legacy code using big.Int):
1. PoolsListUpdater: fetches latest pool list incrementally
2. PoolTracker: tracks latest pool state on new log event or on an interval
3. PoolSimulator: simulates expected output for a given input swap amount
a. It's recommended to use uint256.Int for better performance
b. CloneState should also be implemented
* On-chain: Contribute encoding to https://github.com/KyberNetwork/ks-dex-adapter-lib