Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/volumefi/limit-order-bot-uniswap-v3-vyper
https://github.com/volumefi/limit-order-bot-uniswap-v3-vyper
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/volumefi/limit-order-bot-uniswap-v3-vyper
- Owner: VolumeFi
- License: apache-2.0
- Created: 2023-05-01T15:44:23.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-06-18T18:54:02.000Z (7 months ago)
- Last Synced: 2024-06-19T00:09:01.985Z (7 months ago)
- Language: Vyper
- Size: 23.4 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Limit Order Bot Vyper for Uniswap V3
## Dependencies
[Brownie](https://github.com/eth-brownie/brownie)
[Ganache](https://github.com/trufflesuite/ganache)
## Add account
```sh
brownie accounts new deployer_account
```## Deploy on mainnet
Create `scripts/deploy_*.py` and Compass-EVM contract address.
### - Uniswap V3 Limit order bot
```sh
brownie run scripts/deploy_uniswap_v3.py --network mainnet
```## Read-Only functions
### compass
| Key | Type | Description |
| ---------- | ------- | ------------------------------------------ |
| **Return** | address | Returns compass-evm smart contract address |### admin
| Key | Type | Description |
| ---------- | ------- | ------------------------ |
| **Return** | address | Returns an admin address |### deposits
| Key | Type | Description |
| ---------- | ------- | ------------------------------------- |
| *arg0* | uint256 | Deposit Id to get Deposit information |
| **Return** | Deposit | Deposit information |## State-Changing functions
### deposit
Deposit a token with its amount with an expected token address and amount. This is run by users.
| Key | Type | Description |
| ------- | ------- | --------------------------------------- |
| token0 | address | Deposit token address |
| amount | uint256 | Deposit token amount |
| token1 | address | Expected token address |
| fee | uint24 | Deposit pool on Uniswap V3 |
| to_tick | int24 | Uniswap V3 tick of expected token price |### cancel
Cancels an order.
| Key | Type | Description |
| ------- | ------- | ------------------------------------- |
| tokenId | uint256 | Uniswap V3 liquidity NFT Id to cancel |### multiple_cancel
Cancels multiple orders.
| Key | Type | Description |
| -------- | --------- | -------------------------------------------- |
| tokenIds | uint256[] | Uniswap V3 liquidity NFT Ids array to cancel |### withdraw
Swap and send the token to the depositor.
| Key | Type | Description |
| ------- | ------- | ------------------------------------------------------------- |
| tokenId | uint256 | Uniswap V3 liquidity NFT Id to swap and send to the depositor |### multiple_withdraw
Swap and send multiple tokens to the depositor.
| Key | Type | Description |
| -------- | --------- | ----------------------------------------------------------------- |
| tokenIds | uint256[] | Uniswap V3 liquidity NFT Ids array to swap and send to depositors |### update_admin
Update admin address.
| Key | Type | Description |
| --------- | ------- | ----------------- |
| new_admin | address | New admin address |### update_compass
Update Compass-EVM address.
| Key | Type | Description |
| ----------- | ------- | ----------------------- |
| new_compass | address | New compass-evm address |## Struct
### Deposit
| Key | Type | Description |
| --------- | ------- | --------------------------------- |
| pool | address | Uniswap V3 liquidity pool address |
| token0 | address | Token address to trade |
| token1 | address | Token address to receive |
| from_tick | int24 | Uniswap V3 tick on deposit price |
| to_tick | int24 | Uniswap V3 tick on expected price |
| depositor | address | Depositor address |
| token_id | uint256 | Uniswap V3 liquidity NFT token Id |