Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.0.5 #4

Open
wants to merge 107 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
ec6ee2d
Update ConfigExample.js
jomarip May 14, 2021
99276ec
Merge pull request #5 from bmino/master
best-coder-NA May 15, 2021
6689ba7
Delete ConfigExample.js
jomarip May 15, 2021
f40fe6b
Merge branch 'master' of https://github.com/Snowball-Finance/snow-har…
jomarip May 15, 2021
774b52a
Merge pull request #6 from bmino/master
jomarip May 17, 2021
b1ad1fd
Merge branch 'master' of https://github.com/Snowball-Finance/snow-har…
jomarip Jul 6, 2021
0036b1a
changing the source of wants to gauge-proxy
bigwampa Jul 21, 2021
aa70d6d
making naming more consistent
bigwampa Jul 21, 2021
0fac6b0
rename priceLP to rewardPrice for greater clarity
bigwampa Jul 21, 2021
58a3a09
add Wants
bigwampa Jul 21, 2021
7e1d512
fix some bugs
bigwampa Jul 22, 2021
289f1cf
uncomment Discord
bigwampa Jul 22, 2021
4fa837f
cleanup naming a bit
bigwampa Jul 22, 2021
911bc43
Config changes
bmino Jul 23, 2021
c2fa225
WiP Accompanying Logic Changes
bmino Jul 23, 2021
2ded9a9
Critical bug fix calculating harvest decision
bmino Jul 23, 2021
df0a901
Further progress
bmino Jul 23, 2021
7dc9252
more bug fixes
bigwampa Jul 23, 2021
ccc040e
Force high balance for unknown harvestables
bmino Jul 23, 2021
69570e6
Merge branch 'bugfixing' into add-joe
bmino Jul 23, 2021
99658b3
Missed merge fixes
bmino Jul 23, 2021
ae790d6
Move controllers out of hidden config
bmino Jul 24, 2021
0008505
Harvest "override" to handle failing `getHarvestable()`
bmino Jul 24, 2021
379dc1b
Merge pull request #7 from Snowball-Finance/add-joe
theabominablesasquatch Jul 27, 2021
d751f3a
Map want symbol to harvest symbol
bmino Jul 27, 2021
124fb54
Merge pull request #9 from Snowball-Finance/bugfix/harvest_display_token
theabominablesasquatch Jul 27, 2021
75a55fc
Omit gracefully if earn/harvest will fail
bmino Aug 6, 2021
abb8e67
Merge pull request #11 from bmino/feature/bail_earn_harvest
theabominablesasquatch Aug 6, 2021
813e1fd
Account for snowglobes with 0 init balance
bmino Aug 10, 2021
ed0b5d3
Sweep requirement from 5000 to 200
bmino Aug 10, 2021
b3446c9
Merge pull request #13 from Snowball-Finance/bugfix/sweep
jomarip Aug 10, 2021
fd206ab
Bugfix for logging index
bmino Aug 12, 2021
8a618fa
Log, exclude, and continue after failed init
bmino Aug 12, 2021
3213dd3
Nice friendly cchain links
bmino Aug 12, 2021
293caed
Merge pull request #14 from Snowball-Finance/feature/alert_failed_init
theabominablesasquatch Aug 17, 2021
bdf284e
start working
Jonasslv Aug 27, 2021
6afa82a
creating price logic
Jonasslv Aug 27, 2021
f1bf3d8
fixed some logic
Jonasslv Aug 27, 2021
8b7f030
added support to single staking pools
Jonasslv Aug 30, 2021
36530df
Merge pull request #15 from Snowball-Finance/single-staking-pools
jomarip Aug 31, 2021
c6f1868
add support to PNG swept/harvest
Jonasslv Sep 8, 2021
73d834f
Merge pull request #18 from Snowball-Finance/task/jonas/png-single-sided
jomarip Sep 8, 2021
6f67eb5
infra
saito-sv Sep 9, 2021
7f08cfc
correct aws account
saito-sv Sep 9, 2021
4ca4fc8
Merge pull request #19 from Snowball-Finance/task/saito/infra
Jonasslv Sep 9, 2021
2c8ede4
Changed schedule logic (#20)
Jonasslv Sep 10, 2021
f53ef27
some fixes on docker file and infra
Sep 13, 2021
93063a6
Merge pull request #22 from Snowball-Finance/task/saito/docker_file
Jonasslv Sep 13, 2021
3ac9610
harvester fixes
Jonasslv Sep 14, 2021
bafe560
1 mil MAX GAS
Jonasslv Sep 14, 2021
441db90
Merge pull request #23 from Snowball-Finance/harvester-fixes
Jonasslv Sep 14, 2021
5690755
support for compound BENQI QI
Jonasslv Sep 17, 2021
8c3c3eb
Merge pull request #24 from Snowball-Finance/benqi-qi
Jonasslv Sep 17, 2021
4be649a
changed availableUSD calc
Jonasslv Sep 20, 2021
71d30b3
bugfixes
Jonasslv Sep 21, 2021
d845104
added AAVE support
Jonasslv Oct 8, 2021
d3edd6b
added leveraging to AAVE strategies
Jonasslv Oct 8, 2021
5049491
halt harvest if gas price is high
Jonasslv Oct 8, 2021
e36eb12
correct MAX_GAS constant
Jonasslv Oct 8, 2021
6c35ace
changed gas limit to 2.5m wei
Jonasslv Oct 9, 2021
8c17b11
support for keep() and keepMax()
Jonasslv Oct 9, 2021
d948615
changed max_gas const
Jonasslv Oct 10, 2021
255837a
added banker joe support
Jonasslv Oct 12, 2021
e050013
always harvest folding strategies
Jonasslv Oct 14, 2021
9ffcd21
Convert to ethers, add deleveraging, use discord webhook
Jonasslv Oct 21, 2021
51655e0
added webhook env var
saito-sv Oct 22, 2021
231ea58
updated env var
saito-sv Oct 22, 2021
3fb8332
made generic code for tx logic
Jonasslv Oct 23, 2021
5a0720f
Merge pull request #26 from Snowball-Finance/task/jonas/ethers-conver…
Jonasslv Oct 23, 2021
c4d16ed
default reward is wavax
Jonasslv Oct 26, 2021
8f90208
add benqicontroller, disable banker joe strats
Jonasslv Oct 27, 2021
6ab7bbb
reactivate trader joe
Jonasslv Oct 27, 2021
18940c1
change controllers order
Jonasslv Oct 30, 2021
fbacb4b
use our node
Jonasslv Nov 4, 2021
a004163
added fallback to providers
Jonasslv Nov 4, 2021
bf1df1f
dynamic gas
Jonasslv Nov 8, 2021
a36c0df
add extra gas to be safe
Jonasslv Nov 14, 2021
80413fb
added axial support
Jonasslv Nov 15, 2021
fe33da4
add axial at rewardmap
Jonasslv Nov 16, 2021
4194de1
added isAxial()
Jonasslv Nov 17, 2021
7b2eda9
add new axial strategies support
Jonasslv Nov 18, 2021
004e511
limit harvest to 100gwei
Jonasslv Nov 19, 2021
d1006f1
new deleverage logic
Jonasslv Nov 26, 2021
980b24d
leverage from scratch
Jonasslv Nov 27, 2021
60c89b5
don't re-leverage deprecated pools
Jonasslv Nov 27, 2021
5903e9d
use deleverageuntil instead deleveragetothemax
Jonasslv Nov 29, 2021
34b0be4
add sync message to discord
Jonasslv Nov 29, 2021
0860eed
New deleverage logic #28
Jonasslv Nov 30, 2021
839ee27
new controllers/some adjustments
Jonasslv Dec 20, 2021
be12a47
TEDDY rewards are in AVAX
Jonasslv Dec 27, 2021
d01bc10
made script fully synchronous
Jonasslv Jan 2, 2022
f37257b
double rewards from tj and axial
Jonasslv Jan 9, 2022
cd08086
let it run sync
Jonasslv Jan 9, 2022
6a2aeaa
balanceof tokens at the strategy sum harvestable
Jonasslv Jan 10, 2022
71d8be3
added retry
Jonasslv Jan 18, 2022
141dc53
Added support to ptp and pangolin super farm
Jonasslv Jan 21, 2022
ae15368
fixed wrong view of ptp rewards
Jonasslv Jan 21, 2022
73a481c
added support to multiple rewards from pangolin
Jonasslv Jan 26, 2022
528a437
Added platypus and pangolin superfarm #30
Jonasslv Jan 26, 2022
f4a43c2
added optimizing logic (#29)
Jonasslv Mar 1, 2022
670c838
optimized harvests (24 cycle)
Jonasslv Mar 7, 2022
da8c066
immutable image & secrets for sensitive values. (#32)
saito-sv Mar 12, 2022
c71b1b9
Task/saito/secrets (#33)
Jonasslv Mar 12, 2022
d61b09c
version changed on infra
saito-sv Mar 12, 2022
24bd7e8
Merge branch 'master' of github.com:Snowball-Finance/snow-harvester
saito-sv Mar 12, 2022
683913a
deployed 1.0.5
saito-sv Apr 1, 2022
018e508
deployed 1.0.5
saito-sv Apr 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rename priceLP to rewardPrice for greater clarity
bigwampa committed Jul 21, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 0fac6b09c6195e6e8edbd17713e957d45df8e7e4
12 changes: 6 additions & 6 deletions src/main/Main.js
Original file line number Diff line number Diff line change
@@ -95,12 +95,12 @@ async function initHarvests() {

function addRequirements(harvests) {
const addHarvestFees = async (harvest) => {
let priceLP
let rewardPrice
switch(harvest.wantSymbol) {
case("PGL"):
priceLP = await estimatePriceOfAsset(PNG_ADDRESS, 18)
rewardPrice = await estimatePriceOfAsset(PNG_ADDRESS, 18)
case("JLP"):
priceLP = await estimatePriceOfAsset(JLP_ADDRESS, 18)
rewardPrice = await estimatePriceOfAsset(JLP_ADDRESS, 18)
default:
null
}
@@ -113,7 +113,7 @@ function addRequirements(harvests) {
balance: web3.utils.toBN(await harvest.snowglobe.methods.balance().call()),
available: web3.utils.toBN(await harvest.snowglobe.methods.available().call()),
priceWAVAX: await estimatePriceOfAsset(WAVAX_ADDRESS, 18),
priceLP: priceLP,
rewardPrice: rewardPrice,
priceWant: await getPoolShareAsUSD(harvest.want),
}
};
@@ -128,8 +128,8 @@ function addRequirements(harvests) {
function addCalculations(harvests) {
const addHarvestGain = async (harvest) => ({
...harvest,
gainWAVAX: harvest.harvestable.mul(harvest.priceLP).div(harvest.priceWAVAX),
gainUSD: harvest.harvestable.mul(harvest.priceLP).div(Util.offset(18)),
gainWAVAX: harvest.harvestable.mul(harvest.rewardPrice).div(harvest.priceWAVAX),
gainUSD: harvest.harvestable.mul(harvest.rewardPrice).div(Util.offset(18)),
ratio: harvest.available.muln(100).div(harvest.balance),
availableUSD: harvest.available.mul(harvest.priceWant).div(Util.offset(harvest.wantDecimals)),
});