Giter Site home page Giter Site logo

limit-order-bot-uniswap-v2-vyper's Introduction

Limit Order Bot Vyper for Uniswap V2

Dependencies

Brownie

Ganache

Add account

brownie accounts new deployer_account

Deploy on mainnet

Create scripts/deploy_*.py and Compass-EVM contract address.

- Pancakeswap V2

brownie run scripts/deploy_pancakeswap.py --network bsc-main

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

deposit_size

Key Type Description
Return uint256 Returns deposit list current size

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
path address[] Initial token swap path via Uniswap V2
amount0 uint256 Deposit token amount
min_amount1 uint256 Expected token amount from the initial swap
profit_taking uint256 Permille of profit_taking
stop_loss uint256 Permille of stop_loss

cancel

Cancel order. This is run by users.

Key Type Description
deposit_id uint256 Deposit Id to cancel
min_amount0 uint256 Mininum amount of original token to receive on cancel

withdraw

Swap and send the token to the depositor. This is run by Compass-EVM only.

Key Type Description
deposit_id uint256 Deposit Id to swap and send to the depositor
min_amount0 uint256 Mininum amount of original token to receive on withdraw
withdraw_type WithdrawType Withdraw type enum value

multiple_withdraw

Swap and send multiple tokens to the depositor. This is run by Compass-EVM only.

Key Type Description
deposit_ids uint256[] Deposit Id array to swap and send to the depositor
min_amounts0 uint256[] Mininum amount array of original token to receive on withdraw
withdraw_types WithdrawType[] Withdraw type enum value array

update_compass

Update Compass-EVM address. This is run by Compass-EVM only.

Key Type Description
new_compass address New compass-evm address

Struct

Deposit

Key Type Description
path address[] Initial token swap path via Uniswap V2
amount uint256 Ordered token amount
depositor address Depositor address

Enum

WithdrawType

Key Description
CANCEL Cancel order
PROFIT_TAKING Profit taking
STOP_LOSS Stop loss

limit-order-bot-uniswap-v2-vyper's People

Contributors

webelf101 avatar taariq avatar wc117 avatar verabehr avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.