snowball-finance / snow-harvester Goto Github PK
View Code? Open in Web Editor NEWThis project forked from bmino/snow-harvester
Such harvest! Much snowball! Auto harvests snowglobe strategies so the gains can be compounded
License: MIT License
This project forked from bmino/snow-harvester
Such harvest! Much snowball! Auto harvests snowglobe strategies so the gains can be compounded
License: MIT License
If a new contract for harvesting is added that doesn't provide a permission for the configured harvester, the script aborts. Eventually it would be beneficial to modify the script to ignore contracts it can't connect with or prioritize the ones it can first. Using the pm2, it will keep running the script and aborting as seen below.
timestamp=2021-07-28-00:12:14-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:14: web3-shh package will be deprecated in version 1.3.5 and will no longer be supported. timestamp=2021-07-28-00:12:14-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:14: web3-bzz package will be deprecated in version 1.3.5 and will no longer be supported. timestamp=2021-07-28-00:12:15-0700 app=HARVEST id=0 type=out message=2021-07-28T00:12:15: WARNING!! Test mode is disabled. Real harvesting might begin!! timestamp=2021-07-28-00:12:15-0700 app=HARVEST id=0 type=out message=2021-07-28T00:12:15: DiscordBot: Logging in ... timestamp=2021-07-28-00:12:24-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:24: Error adding gas timestamp=2021-07-28-00:12:24-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:24: Error: Returned error: execution reverted timestamp=2021-07-28-00:12:24-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:24: at Object.ErrorResponse (/home/abominablesasquatch/snow-harvester/node_modules/web3-core-helpers/lib/errors.js:28:19) timestamp=2021-07-28-00:12:24-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:24: at /home/abominablesasquatch/snow-harvester/node_modules/web3-core-requestmanager/lib/index.js:303:36 timestamp=2021-07-28-00:12:24-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:24: at XMLHttpRequest.request.onreadystatechange (/home/abominablesasquatch/snow-harvester/node_modules/web3-providers-http/lib/index.js:98:13) timestamp=2021-07-28-00:12:24-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:24: at XMLHttpRequestEventTarget.dispatchEvent (/home/abominablesasquatch/snow-harvester/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22) timestamp=2021-07-28-00:12:24-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:24: at XMLHttpRequest._setReadyState (/home/abominablesasquatch/snow-harvester/node_modules/xhr2-cookies/dist/xml-http-request.js:208:14) timestamp=2021-07-28-00:12:24-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:24: at XMLHttpRequest._onHttpResponseEnd (/home/abominablesasquatch/snow-harvester/node_modules/xhr2-cookies/dist/xml-http-request.js:318:14) timestamp=2021-07-28-00:12:24-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:24: at IncomingMessage.<anonymous> (/home/abominablesasquatch/snow-harvester/node_modules/xhr2-cookies/dist/xml-http-request.js:289:61) timestamp=2021-07-28-00:12:24-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:24: at IncomingMessage.emit (events.js:327:22) timestamp=2021-07-28-00:12:24-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:24: at endReadableNT (internal/streams/readable.js:1327:12) timestamp=2021-07-28-00:12:24-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:24: at processTicksAndRejections (internal/process/task_queues.js:80:21) { timestamp=2021-07-28-00:12:24-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:24: data: null timestamp=2021-07-28-00:12:24-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:24: } timestamp=2021-07-28-00:12:25-0700 app=pm2 message=App [HARVEST:0] exited with code [1] via signal [SIGINT] timestamp=2021-07-28-00:12:25-0700 app=pm2 message=App [HARVEST:0] starting in -fork mode- timestamp=2021-07-28-00:12:25-0700 app=pm2 message=App [HARVEST:0] online timestamp=2021-07-28-00:12:28-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:28: web3-shh package will be deprecated in version 1.3.5 and will no longer be supported. timestamp=2021-07-28-00:12:28-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:28: web3-bzz package will be deprecated in version 1.3.5 and will no longer be supported. timestamp=2021-07-28-00:12:28-0700 app=HARVEST id=0 type=out message=2021-07-28T00:12:28: WARNING!! Test mode is disabled. Real harvesting might begin!! timestamp=2021-07-28-00:12:28-0700 app=HARVEST id=0 type=out message=2021-07-28T00:12:28: DiscordBot: Logging in ... timestamp=2021-07-28-00:12:38-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:38: Error adding gas timestamp=2021-07-28-00:12:38-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:38: Error: Returned error: execution reverted timestamp=2021-07-28-00:12:38-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:38: at Object.ErrorResponse (/home/abominablesasquatch/snow-harvester/node_modules/web3-core-helpers/lib/errors.js:28:19) timestamp=2021-07-28-00:12:38-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:38: at /home/abominablesasquatch/snow-harvester/node_modules/web3-core-requestmanager/lib/index.js:303:36 timestamp=2021-07-28-00:12:38-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:38: at XMLHttpRequest.request.onreadystatechange (/home/abominablesasquatch/snow-harvester/node_modules/web3-providers-http/lib/index.js:98:13) timestamp=2021-07-28-00:12:38-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:38: at XMLHttpRequestEventTarget.dispatchEvent (/home/abominablesasquatch/snow-harvester/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22) timestamp=2021-07-28-00:12:38-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:38: at XMLHttpRequest._setReadyState (/home/abominablesasquatch/snow-harvester/node_modules/xhr2-cookies/dist/xml-http-request.js:208:14) timestamp=2021-07-28-00:12:38-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:38: at XMLHttpRequest._onHttpResponseEnd (/home/abominablesasquatch/snow-harvester/node_modules/xhr2-cookies/dist/xml-http-request.js:318:14) timestamp=2021-07-28-00:12:38-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:38: at IncomingMessage.<anonymous> (/home/abominablesasquatch/snow-harvester/node_modules/xhr2-cookies/dist/xml-http-request.js:289:61) timestamp=2021-07-28-00:12:38-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:38: at IncomingMessage.emit (events.js:327:22) timestamp=2021-07-28-00:12:38-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:38: at endReadableNT (internal/streams/readable.js:1327:12) timestamp=2021-07-28-00:12:38-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:38: at processTicksAndRejections (internal/process/task_queues.js:80:21) { timestamp=2021-07-28-00:12:38-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:38: data: null timestamp=2021-07-28-00:12:38-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:38: } timestamp=2021-07-28-00:12:39-0700 app=pm2 message=App [HARVEST:0] exited with code [1] via signal [SIGINT] timestamp=2021-07-28-00:12:39-0700 app=pm2 message=App [HARVEST:0] starting in -fork mode- timestamp=2021-07-28-00:12:39-0700 app=pm2 message=App [HARVEST:0] online timestamp=2021-07-28-00:12:42-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:42: web3-shh package will be deprecated in version 1.3.5 and will no longer be supported. timestamp=2021-07-28-00:12:42-0700 app=HARVEST id=0 type=error message=2021-07-28T00:12:42: web3-bzz package will be deprecated in version 1.3.5 and will no longer be supported. timestamp=2021-07-28-00:12:43-0700 app=HARVEST id=0 type=out message=2021-07-28T00:12:43: WARNING!! Test mode is disabled. Real harvesting might begin!! timestamp=2021-07-28-00:12:43-0700 app=HARVEST id=0 type=out message=2021-07-28T00:12:43: DiscordBot: Logging in ...
Discord Messages are not being fully sended in container mode because the schedule container is stopping before it can send it all, putting some awaits for the discord messages to be sent can resolve this issue.
Assuming the threshold for harvesting is above $50 bucks in USD equivalent, the single sided harvesting is calling earn well, but not necessarily harvesting appropriately.
This is a manual harvest for Benqi Eth called a few minutes after the automated harvest. There are two possible reasons. 1: the harvesters is fizzling out before completion or 2. the evaluation of the rewards have some issues.
I will follow up with more details from the log later.
https://cchain.explorer.avax.network/tx/0xe380c2e618662c247169c3a1d87eed209d2d4e2398b4c9e13c1b663331d6be3c/token-transfers
function leverageToMax() public {
uint256 unleveragedSupply = getSuppliedUnleveraged();
uint256 idealSupply = getLeveragedSupplyTarget(unleveragedSupply);
leverageUntil(idealSupply);
}
Currently the harvester is able to harvest single-sided strategies and Liquidity Pairs.
The next feature would be the ability to call leverageToMax when new funds over 50-100k are swept into the strategy or the collateral factor exceed 10% (given over 500k) for example. I think the post sweeping part is the highest priority.
Note to the person running the harvester. In addition to being whitelisted as a harvester, it also needs to be whitelisted as a Keeper.
(The step after that would be to actual monitor the status/health and adjust weights accordingly... but that is longer term)
Users have noticed that some of of our strats aren't increasing LP amounts. This is verified by large getHarvestable()
amounts being present in the StrategyContracts
AVAX-GB
: https://cchain.explorer.avax.network/address/0x14519ABf2f04a632Ee65D84D9A37d9Eec02955F3/transactionsAVAX-SPELL
: https://cchain.explorer.avax.network/address/0x5E881dE5B6127134600e03705966f3EA37D9e2d2/read-contractThere are probably many more out there, I know very little about the harvester but once we identify why these aren't being harvested - we should search for other potential pools that aren't being harvested
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.