Skip to content

Automate periodic tokens transfers from Ethereum smart contracts.

License

Notifications You must be signed in to change notification settings

fabioDMFerreira/dca-automator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DCA Automator

The DCA Automator creates smart contracts in Ethereum that deposit periodically an amount of ETH or ERC20 tokens in a liquidity pool.

dca-automator-demo

What’s Included?

Quick start

Start by downloading the project.

$ git clone https://github.com/fabiodmferreira/dca-automator.git
$ cd dca-automator

Deploy smart contracts

Enter smart contracts directory.

$ cd smart-contracts

Install dependencies

$ npm install

Set INFURA_ID in your system environment variables or create the .env with next content.

INFURA_ID=<your infura node id>

Run the Buidler's testing network.

npm run launch-node

On a new terminal, go to smart-contracts directory and deploy the contracts.

npm run deploy-contracts

The deploy scripts added the contracts addresses and the ABI files to client/src/contracts and keeper/contracts, so they can interact with the contracts deployed.

Launch client

Make sure you have Metamask installed.

Enter client directory.

$ cd client

Install dependencies.

$ npm install

Run the client server.

$ npm start

It will popup a tab in your browser with the url http://localhost:3000. Here you will have to connect with your metamask account and you will be able to create your smart contracts that will deposit tokens in Aave liquidity pools.

Note: Metamask may popup an invalid nonce error the first time you sign a transaction. Reset your account in Metamask settings (Settings > Advanced > Reset Account) to fix this issue. The nonce cached will be reset.

Keeper

The keeper is a daemon service that inspects for dca contracts that allow to transfer tokens to the liquidity pools.

Enter keeper directory.

$ cd keeper

Install dependencies.

$ npm install

Run the keeper.

$ npm start

About

Automate periodic tokens transfers from Ethereum smart contracts.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published