Skip to content

Multi-thread Trading Bot, Smart Contract Liquidator on Chain

License

Notifications You must be signed in to change notification settings

xiaoyu1998/mm-tradingbot-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tradingbot-rs

This trading bot will constant checking the status of all the accounts in dex and liquidate positions on chain

Usage

Download

git clone git@github.com:xiaoyu1998/up-liquidator-rs.git --recursive

copy addresses from up-contracts

cp deployed_addresses.json /path/to/up-liquidator-rs/crates/liquidator-contract/deployments
cp underlyAsset_addresses.json /path/to/up-liquidator-rs/deployments

deploy liquidator contract

cd crates/liquidator-contract
npx hardhat run scripts/deployLiquidator.ts --network localnet

transfer usdt to liquidator contract

usdt.transfer("liquidator contract address", amount);

copy addresses from crates/liquidator-contract

cp deployed_addresses.json /path/to/up-liquidator-rs/deployments

add liquidator address to command line and run liquidator

cargo run -- --rpc http://192.168.2.106:8545 --private-key "private-key " --deployment localnet --bid-percentage 10 --liquidator-address 0xa58FEa4CAD0e8D14294d861c54cCa3606820A871 --chain-id 1998 --last-block-number 1000 --pool-interval-secs 10

About

Multi-thread Trading Bot, Smart Contract Liquidator on Chain

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages