Skip to content

Simple Bot to Restake APT every 24h. Compound interest on Aptos.

License

Notifications You must be signed in to change notification settings

AzureKn1ght/AptosTest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aptos Compound

Aptos

Strategy

My first test project on Aptos! Simple Bot to Restake tokens every 24h on PCS. Thus creating compound interest.

BASIC STRATEGY BREAKDOWN

  1. Call the function to receive all rewards (every 24h)
  2. Get the account's current balance of CAKE tokens
  3. Swap all CAKE rewards received to APT tokens
  4. Add appropriate amounts of tokens to the LP
  5. Get the account's balance of LP tokens
  6. Deposit the LP tokens into the LP farm

ENV Variables

You will need to create a file called .env in the root directory, copy the text in .env.example and fill in the variables

How to Run

You could run it on your desktop just using Node.js in your terminal. However, on a production environment, it is recommended to use something like PM2 to run the processes to ensure robust uptime and management.

## Because we want to run with PM2
## So we need to transpile to JS 
npm install
cd src
npx tsc 

APT Compound

pm2 start src/index.js -n "APT"
pm2 save