Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/volumefi/twap_bot_vyper
https://github.com/volumefi/twap_bot_vyper
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/volumefi/twap_bot_vyper
- Owner: VolumeFi
- License: apache-2.0
- Created: 2023-03-13T15:11:12.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-26T19:31:35.000Z (9 months ago)
- Last Synced: 2024-04-26T20:38:50.882Z (9 months ago)
- Language: Vyper
- Size: 65.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Time Weighted Average Price (TWAP) trading bot using pancakeswap
## User function
### deposit
In order to use DCA trading bot, users should deposit their token first with trading information. Of course, users need to approve their token to the DCA bot smart contract.
| field | type | description |
| ------------- | --------- | --------------------------------- |
| path | address[] | Token swap path in pancakeswap |
| input_amount | uint256 | Total token amount to trade |
| number_trades | uint256 | Number of trades |
| interval | uint256 | Interval between trades |
| starting_time | uint256 | Timestamp of starting DCA trading |## Bot functions
### swap
The bot script will run this swap function with swap ID and amount_out_min (for prevent high slippage) when the dca trading is needed. This function should be called from compass-evm from Paloma for safety. Otherwise, it can't run.
| field | type | description |
| ------------- | ------- | ------------------------------------------------ |
| swap_id | uint256 | Swap ID that is going to trade |
| amout_out_min | uint256 | minimum token amount to receive in current trade |