Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/volumefi/twap_bot_vyper


https://github.com/volumefi/twap_bot_vyper

Last synced: about 2 months ago
JSON representation

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 |