The DCA Automator creates smart contracts in Ethereum that deposit periodically an amount of ETH or ERC20 tokens in a liquidity pool.
Start by downloading the project.
$ git clone https://github.com/fabiodmferreira/dca-automator.git
$ cd dca-automatorEnter smart contracts directory.
$ cd smart-contractsInstall dependencies
$ npm installSet 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-nodeOn a new terminal, go to smart-contracts directory and deploy the contracts.
npm run deploy-contractsThe 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.
Make sure you have Metamask installed.
Enter client directory.
$ cd clientInstall dependencies.
$ npm installRun the client server.
$ npm startIt 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.
The keeper is a daemon service that inspects for dca contracts that allow to transfer tokens to the liquidity pools.
Enter keeper directory.
$ cd keeperInstall dependencies.
$ npm installRun the keeper.
$ npm start
