Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
418 commits
Select commit Hold shift + click to select a range
ea9423f
Add contract ABI for Faang stonk strategy and vault.
waikahkwan Jun 25, 2021
d0cfc6e
Add Faang Stonk config.
waikahkwan Jun 25, 2021
1933fb3
Add Faang Stonk Config.
waikahkwan Jun 26, 2021
9997d2b
Update DAOstake kovan address.
waikahkwan Jun 26, 2021
4ab2ffc
Merge commit '9997d2b8f627f6d9f8065e9f0b84ad893acb92dc' into develop
soonlai814 Jun 26, 2021
7b2cd44
Add FAANG stonk into saveVaultApy() and savePricePerFullShare() cronjob
waikahkwan Jun 26, 2021
e63d61c
saveHistoricalAPY() cronjob for Faang Stonk.
waikahkwan Jun 26, 2021
5920a83
saveHistoricalTVL() cronjob for Dao FAANG.
waikahkwan Jun 26, 2021
4d306eb
update category for DAO Faang in db script.
waikahkwan Jun 26, 2021
43b4481
Add Faang Stonk into user related API.
waikahkwan Jun 26, 2021
9dd39d1
Remove unused import.
waikahkwan Jun 26, 2021
492a2f3
Fix in APY calculation.
waikahkwan Jun 26, 2021
56fe7ba
Merge commit '492a2f38bc88504b8ac77add5906b94e6e48d186' into develop
soonlai814 Jun 26, 2021
7b673ba
Adding missing faangApy to other strategies.
waikahkwan Jun 27, 2021
38ffe2a
Update implementation for deposited amount FAANG.
waikahkwan Jun 28, 2021
f4f8736
Revert "Update implementation for deposited amount FAANG."
waikahkwan Jun 28, 2021
02122c0
Update implementation for deposited amount FAANG.
waikahkwan Jun 28, 2021
c48bf38
Update returned message for Happy Hour API.
waikahkwan Jun 28, 2021
0261b57
Merge branch 'elon-ape' into beta
soonlai814 Jun 28, 2021
1aa06dd
Updated daoElo
soonlai814 Jun 28, 2021
825a7c2
Merge commit 'c48bf38f96a1ace743a227caeea77ec0ffdf926d' into develop
soonlai814 Jun 28, 2021
a1fe9d1
Merge branch 'beta' into app
soonlai814 Jun 28, 2021
3c90026
Merge branch 'develop' of https://github.com/daoventures/yearn-api in…
lucky3418 Jun 29, 2021
e32bad8
Fixed the errors of Elon's APR and TVL
lucky3418 Jun 29, 2021
56430e0
Update for price per full share checking.
waikahkwan Jun 30, 2021
c2fdbd5
Update DAOmine mainnet address.
waikahkwan Jun 30, 2021
c1fa853
Merge commit 'c48bf38f96a1ace743a227caeea77ec0ffdf926d' into beta
soonlai814 Jun 30, 2021
24f8c58
merged
soonlai814 Jun 30, 2021
8a741b7
Merge commit 'c2fdbd5ff06ac92044e0b09fbc177b9cd08352d3' into beta
soonlai814 Jun 30, 2021
d892cf4
Added mainnet uniswapp dvg eth
soonlai814 Jun 30, 2021
79e4c57
Merge branch 'develop' into app
soonlai814 Jun 30, 2021
97c5650
Merge commit '56430e00dc8dfcd05bdf34053bc83cc3db22238c' into develop
soonlai814 Jun 30, 2021
5a3ee26
Fixed the adddresss
soonlai814 Jun 30, 2021
cd8ea63
merged
soonlai814 Jun 30, 2021
67aa923
merged
soonlai814 Jun 30, 2021
32a98e5
Merge branch 'elon-ape' into app
soonlai814 Jun 30, 2021
bd6df58
Update FAANG Stonk kovan address.
waikahkwan Jul 1, 2021
1ddd1e1
Update Elon Ape and FAANG kovan address.
waikahkwan Jul 1, 2021
bfceb11
Merge commit '1ddd1e192e801710ba42ad4180e4805340c7b5f3' into develop
soonlai814 Jul 1, 2021
c885b45
Merge commit '1ddd1e192e801710ba42ad4180e4805340c7b5f3' into beta
soonlai814 Jul 1, 2021
584a856
Merge commit '1ddd1e192e801710ba42ad4180e4805340c7b5f3' into app
soonlai814 Jul 1, 2021
f536060
added DAOSto for DAOmine
soonlai814 Jul 2, 2021
6b08fed
Update FAANG Stonk Kovan Address.
waikahkwan Jul 3, 2021
22be742
Merge branch 'faang-stonk' of https://github.com/daoventures/yearn-ap…
waikahkwan Jul 3, 2021
c97fd33
merged
soonlai814 Jul 3, 2021
f6502a8
Update FAANG mainnet address.
waikahkwan Jul 5, 2021
b2bdf67
updated
soonlai814 Jul 5, 2021
75306af
Merge commit 'f6502a8b07cc6d6013cb9e64c98a5c15dae3d869' into develop
soonlai814 Jul 5, 2021
a485fa0
Merge commit 'f6502a8b07cc6d6013cb9e64c98a5c15dae3d869' into beta
soonlai814 Jul 5, 2021
de931a5
Update Kovan address of Elon Ape.
waikahkwan Jul 5, 2021
0fa7b56
Merge branch 'beta' into app
soonlai814 Jul 5, 2021
0d94a29
Update the name of DAO FAANG Stonk in DAOmine pool
waikahkwan Jul 5, 2021
bfb0a1e
getMultiplier() from current block number.
waikahkwan Jul 6, 2021
7a1c3c3
fixed getMultiplier bug
soonlai814 Jul 6, 2021
c1db723
Merge commit 'bfb0a1e1648e653444cde7456a957a95a357f018' into beta
soonlai814 Jul 6, 2021
38b2695
Merge branch 'beta' into app
soonlai814 Jul 6, 2021
b0b3e2a
Update DAOmine start block.
waikahkwan Jul 6, 2021
9cb19dd
Fix for APR.
waikahkwan Jul 6, 2021
218ba71
Merge commit '9cb19dd42c2f042b3f6fd21edacc1d8124893eec' into beta
soonlai814 Jul 6, 2021
60b4e94
Working to add cuban
lucky418 Jul 6, 2021
e51002d
Multiply apr by 100 for frontend display.
waikahkwan Jul 6, 2021
535b34c
Merge commit 'e51002dd77cd153a0ae9e9aed165f2d977d46aa0' into beta
soonlai814 Jul 6, 2021
26d946e
Merge commit 'e51002dd77cd153a0ae9e9aed165f2d977d46aa0' into app
soonlai814 Jul 6, 2021
7a423f4
Merge commit 'e51002dd77cd153a0ae9e9aed165f2d977d46aa0' into develop
soonlai814 Jul 6, 2021
0962be2
Update tokenId for daoSTO.
waikahkwan Jul 6, 2021
8dba862
update address according to dao-docs
admud Jul 6, 2021
eb0163c
Merge commit '0962be20c963ec20a067677b3c926dc699ff0fc9' into beta
soonlai814 Jul 6, 2021
278df43
Fixed Uniswap price token
soonlai814 Jul 6, 2021
8a86db6
merged
soonlai814 Jul 6, 2021
bfe8b94
Add implementation of start block checking in DAOmine.
waikahkwan Jul 6, 2021
3d76990
updated testnet addresses to dao-docs
admud Jul 7, 2021
2a65754
Merge branch 'develop' into cuban-ape
lucky418 Jul 7, 2021
bbf4239
Merge pull request #19 from daoventures/backendHarvestFighterUpdate
soonlai814 Jul 8, 2021
0e26176
patched from develop
lucky418 Jul 8, 2021
f0a726e
Add Money Printer Vault and Strategy Contract ABI.
waikahkwan Jul 8, 2021
dc85407
TVL Implementation.
waikahkwan Jul 8, 2021
b322a98
Add utility function to get block number based on timeline.
waikahkwan Jul 8, 2021
1c6283c
Historical APY cronjob for Polygon contract. Integrate daoMPT into hi…
waikahkwan Jul 9, 2021
8d642b0
APY cronjob for Polygon contract.
waikahkwan Jul 9, 2021
589ad78
Integrate daoMPT into saveHistoricalPrice() cronjob and get historica…
waikahkwan Jul 9, 2021
7d599ac
Integrate Polygon contract into user's transaction API.
waikahkwan Jul 9, 2021
0912029
Integrate daoMPT into user statistics API.
waikahkwan Jul 9, 2021
4aab858
Update vault and strategy address.
waikahkwan Jul 10, 2021
91a57db
Update new last measurement.
waikahkwan Jul 10, 2021
dec7576
feat(DAO-162): :sparkles: Citadel Vault Performance
2manslkh Jul 10, 2021
d1b8015
feat(DAO-162): :sparkles: Citadel Vault Performance
2manslkh Jul 10, 2021
d882fe9
Update for other farmers
2manslkh Jul 11, 2021
cea2131
Update to handle all etf type vaults
2manslkh Jul 11, 2021
d596909
Merge commit 'cea2131a9c37f5ce80be1fe78833bb9342c12a78' into develop
soonlai814 Jul 11, 2021
ac883e2
Add deposit and withdraw property to stake_pools.
waikahkwan Jul 11, 2021
2192a1c
Merge commit 'ac883e2cde564db73c70af3507650e790137ce88' into develop
soonlai814 Jul 11, 2021
4885501
Merge commit 'ac883e2cde564db73c70af3507650e790137ce88' into beta
soonlai814 Jul 11, 2021
1a3b96a
Merge branch 'beta' into app
soonlai814 Jul 11, 2021
7b731dc
Added emergency withdraw snapshot for DAOmine
soonlai814 Jul 11, 2021
c3f5165
Mergedd
soonlai814 Jul 11, 2021
c1018be
Updated emergency withdrawal
soonlai814 Jul 11, 2021
1a68318
Merge branch 'emergency-withdraw' into develop
soonlai814 Jul 11, 2021
65205bc
update
soonlai814 Jul 12, 2021
b69c256
Merge branch 'emergency-withdraw' into develop
soonlai814 Jul 12, 2021
85a243e
Merge commit 'b69c256f5c08b061617719af9aaf1073e9835c03' into citadel-…
2manslkh Jul 12, 2021
3b74af1
feat(DAO-162): :sparkles: Citadel Vault Performance
2manslkh Jul 12, 2021
fc653c1
feat(DAO-162): :sparkles: Fixed CORS issue
2manslkh Jul 12, 2021
5b5a8d4
Added mainnet addresses
soonlai814 Jul 12, 2021
a3f8c7f
merged Cuban's Ape
soonlai814 Jul 12, 2021
67bf546
feat(DAO-162): :sparkles: Update btc/eth price source to coingecko
2manslkh Jul 13, 2021
e0ad869
Update Money Printer vault and strategy address.
waikahkwan Jul 14, 2021
31aa4c4
Update DVD contract address and abi (Kovan)
waikahkwan Jul 16, 2021
23f21a0
feat(DAO-162): :sparkles: Add PNL endpoint
2manslkh Jul 16, 2021
7d07889
added API for upgrade token (findOne)
soonlai814 Jul 16, 2021
afa802c
Merge commit '31aa4c4b70a0e5026e5d7b5be26b562e92e3d954' into develop
soonlai814 Jul 16, 2021
7764a82
Create endpoint for reimbursement
2manslkh Jul 16, 2021
b87f058
Update vipDVD contract address and ABI.
waikahkwan Jul 16, 2021
9fcef73
Hardcode DVD price
waikahkwan Jul 16, 2021
2c4bb4a
Hardcode DVD price
waikahkwan Jul 16, 2021
4f2d392
Merge commit '2c4bb4acd0b080d68119a9a793e9d1bbbd16b9ef' into develop
soonlai814 Jul 16, 2021
f03b3bc
Merge commit '7764a8291da929005df0d54cf029ff3f7498706e' into develop
soonlai814 Jul 16, 2021
f5b146c
Update contract address of DVD (mainnet).
waikahkwan Jul 16, 2021
e2b781d
Update vipDVD address and last measurement (mainnet)
waikahkwan Jul 16, 2021
bc06006
Merge commit 'e2b781dff379a989ad376fbfe22a962a6675fe23' into develop
soonlai814 Jul 16, 2021
a225403
remove save functions
soonlai814 Jul 16, 2021
00b7e8c
Merge branch 'reimbursement-dvd' into develop
soonlai814 Jul 16, 2021
8062cc9
Merge branch 'upgrade-token' into beta
soonlai814 Jul 16, 2021
3487e4d
Merge commit 'e2b781dff379a989ad376fbfe22a962a6675fe23' into beta
soonlai814 Jul 16, 2021
252ba2f
Merge branch 'reimbursement-dvd' into beta
soonlai814 Jul 16, 2021
3c185df
Update API to support both vipDVG and vipDVD.
waikahkwan Jul 17, 2021
0f1b1f6
Merge commit '3c185dfe5e29b3c59782b67310b18498fd44720d' into develop
soonlai814 Jul 18, 2021
aefa1d7
Update user's claim amount API.
waikahkwan Jul 19, 2021
46c8b93
Merge commit 'aefa1d76119965ead35acb55b17a79be1c035196' into develop
soonlai814 Jul 19, 2021
d188adb
Update Swagger.
waikahkwan Jul 19, 2021
a3bee4f
Sum up previous claimed amount.
waikahkwan Jul 19, 2021
f21d8f2
Merge commit 'a3bee4fa8019319226ae035c26878bc1953950c6' into develop
soonlai814 Jul 19, 2021
da1df40
Merge commit '3c185dfe5e29b3c59782b67310b18498fd44720d' into beta
soonlai814 Jul 19, 2021
0ec8847
Merge commit 'a3bee4fa8019319226ae035c26878bc1953950c6' into beta
soonlai814 Jul 19, 2021
f6439ec
Merge commit '3c185dfe5e29b3c59782b67310b18498fd44720d' into app
soonlai814 Jul 19, 2021
e70f52d
Merge commit 'a3bee4fa8019319226ae035c26878bc1953950c6' into app
soonlai814 Jul 19, 2021
e504d19
mergedd
soonlai814 Jul 20, 2021
f179c36
Update contract ABI, add decimals to mainnet vipDVG and vipDVD.
waikahkwan Jul 20, 2021
f963fd2
Bug fixes decimals issues and scientific notation
soonlai814 Jul 20, 2021
6a8df6f
Merge branch 'upgrade-token' into develop
soonlai814 Jul 20, 2021
c40e8b0
Merge commit 'f179c36ccf3926ab57f244808ca15119365175e4' into develop
soonlai814 Jul 20, 2021
608e1e0
no message
soonlai814 Jul 20, 2021
8002e39
Merge commit 'f179c36ccf3926ab57f244808ca15119365175e4' into beta
soonlai814 Jul 20, 2021
ada90f6
Merge branch 'beta' of https://github.com/daoventures/yearn-api into …
soonlai814 Jul 20, 2021
a8786c5
Merge branch 'upgrade-token' into app
soonlai814 Jul 20, 2021
86a2c10
Merge branch 'beta' into app
soonlai814 Jul 20, 2021
84f7eb7
Update for daoSTO
2manslkh Jul 20, 2021
d12e861
Remove polygon archivenode endpoint from .env.example.
waikahkwan Jul 21, 2021
6ceff6a
merged
soonlai814 Jul 21, 2021
837a337
merged bug fixed
soonlai814 Jul 21, 2021
c72fd70
Add network property to each of vault.
waikahkwan Jul 21, 2021
7936878
Set getEthereumContract() for default option.
waikahkwan Jul 21, 2021
9cee94c
Add xDVD into historical tvl implementation.
waikahkwan Jul 21, 2021
6804813
Merge commit '9cee94c85ea1e941705a151db80fb503b7e2e7df' into develop
soonlai814 Jul 21, 2021
7d88a3e
Merge commit '9cee94c85ea1e941705a151db80fb503b7e2e7df' into beta
soonlai814 Jul 22, 2021
79912e3
Merge branch 'beta' into app
soonlai814 Jul 22, 2021
988c326
Update whitelist.js
soonlai814 Jul 22, 2021
8998d6b
Merge xDVD implementation.
waikahkwan Jul 21, 2021
bd731a1
Remove daoSTO
2manslkh Jul 26, 2021
bdd0a3b
Merge commit 'bd731a11c1bfdb3e994c38b798c81bffd45d4072' into develop
soonlai814 Jul 26, 2021
e5f372e
Merge commit 'bd731a11c1bfdb3e994c38b798c81bffd45d4072' into beta
soonlai814 Jul 26, 2021
c245a4d
Merged for matic network
soonlai814 Jul 27, 2021
e3a3704
Merge branch 'money-printer' into beta
soonlai814 Jul 27, 2021
11d0bf8
Fix inception APY issue
2manslkh Jul 27, 2021
0563869
updated
soonlai814 Jul 27, 2021
30ed90d
Merge commit '11d0bf8e8e7dddf84bb7d1751e6deb3d47779670' into develop
soonlai814 Jul 27, 2021
5f48b59
Merge commit '11d0bf8e8e7dddf84bb7d1751e6deb3d47779670' into beta
soonlai814 Jul 27, 2021
0420bb7
Merge commit '8998d6bd84894c96d2a09f583078fdbade099112' into beta
soonlai814 Jul 27, 2021
65e9c1c
fixeddd
soonlai814 Jul 27, 2021
8ba846a
Update whitelist.js
soonlai814 Jul 27, 2021
1942b7e
Update whitelist.js
soonlai814 Jul 28, 2021
4d76b34
Fix inception price fr BTC and ETH
2manslkh Jul 30, 2021
b953c7f
Update whitelist.js
soonlai814 Jul 30, 2021
03196fe
Merge commit '8998d6bd84894c96d2a09f583078fdbade099112' into app
soonlai814 Jul 30, 2021
ea52291
Merge commit '11d0bf8e8e7dddf84bb7d1751e6deb3d47779670' into app
soonlai814 Jul 30, 2021
6785755
Hide unncessary stuff
soonlai814 Jul 30, 2021
2937ba9
bug fixes
soonlai814 Jul 30, 2021
7e3d035
Merge branch 'money-printer' into develop
soonlai814 Jul 30, 2021
13c0623
Merge commit '8998d6bd84894c96d2a09f583078fdbade099112' into develop
soonlai814 Jul 30, 2021
93c2321
commit new faang stonk
soonlai814 Jul 31, 2021
7d5afb4
Merge branch 'faang-stonk' into beta
soonlai814 Jul 31, 2021
5ae5947
Enable DaoSTO
soonlai814 Jul 31, 2021
bde2fa8
Merge branch 'citadel-performance' into beta
soonlai814 Jul 31, 2021
d515d89
merged live
soonlai814 Jul 31, 2021
77e4187
Merge branch 'citadel-performance' into beta
soonlai814 Jul 31, 2021
0077280
bug fixes
soonlai814 Jul 31, 2021
409443a
Merge branch 'citadel-performance' into beta
soonlai814 Jul 31, 2021
1a1de74
bug fixes
soonlai814 Jul 31, 2021
62773a3
Merge branch 'citadel-performance' into beta
soonlai814 Jul 31, 2021
848f1a9
bug fixes
soonlai814 Jul 31, 2021
e167d09
Merge branch 'citadel-performance' into beta
soonlai814 Jul 31, 2021
92d3e6c
bug fixes
soonlai814 Jul 31, 2021
b2095d7
Merge branch 'citadel-performance' into beta
soonlai814 Jul 31, 2021
773e1a8
bug fixes
soonlai814 Jul 31, 2021
7eae8cd
Merge branch 'citadel-performance' into beta
soonlai814 Jul 31, 2021
b3711ff
bug fixes
soonlai814 Jul 31, 2021
a84e407
Merge branch 'citadel-performance' into beta
soonlai814 Jul 31, 2021
e52a886
Merge branch 'citadel-performance' of https://github.com/daoventures/…
2manslkh Jul 31, 2021
8a7d974
Update Swagger
2manslkh Jul 31, 2021
a3045e1
Update whitelist.js
soonlai814 Aug 1, 2021
f6f34ad
Fix situation where vault from subgraph cannot match with domain.js
waikahkwan Aug 2, 2021
cb72883
Fix Performance update
2manslkh Aug 2, 2021
ca15dd6
Merge branch 'money-printer' into app
soonlai814 Aug 2, 2021
6cff9c3
temporary hide money printer
soonlai814 Aug 2, 2021
c47f99f
Fix Cron Job
2manslkh Aug 2, 2021
cabdb6d
Update whitelist.js
soonlai814 Aug 2, 2021
1885c2b
Merge branch 'citadel-performance' into beta
soonlai814 Aug 3, 2021
04376cb
Added for updated money printer contract
soonlai814 Aug 3, 2021
81708eb
updated money printer
soonlai814 Aug 3, 2021
0a70ad3
Update to save performance every 5 minutes
2manslkh Aug 3, 2021
df7ffa6
Do not insert if date already exists
2manslkh Aug 3, 2021
ed0f29d
remove console logs
2manslkh Aug 3, 2021
f3a76ad
Update whitelist.js
soonlai814 Aug 4, 2021
a9a7f47
Merge commit 'ed0f29d11401cf416fef817745a54aa8d3e81483' into develop
soonlai814 Aug 4, 2021
1ba944d
Merge commit 'ed0f29d11401cf416fef817745a54aa8d3e81483' into beta
soonlai814 Aug 4, 2021
08d8e1c
Fix inception APY issue
2manslkh Aug 5, 2021
0a26058
Merge commit '08d8e1cca5c5b34bc3455bdeffcf9e9f2e5ac092' into develop
soonlai814 Aug 5, 2021
82f6324
Merge commit '08d8e1cca5c5b34bc3455bdeffcf9e9f2e5ac092' into beta
soonlai814 Aug 5, 2021
313775c
Update FAANG mainnet address to 0x9ee54014e1E6CF10fD7E9290FdB6101fd0d…
2manslkh Aug 5, 2021
c4efc9b
Update calculation for daoSTO
2manslkh Aug 5, 2021
4ecfe98
Merge branch 'money-printer' into app
soonlai814 Aug 6, 2021
001f675
Added polygon cronjob
soonlai814 Aug 6, 2021
1fc7185
Update whitelist.js
soonlai814 Aug 6, 2021
d6bab6e
merged daoSTO
soonlai814 Aug 6, 2021
91fd5c5
Update number of compounding per year.
waikahkwan Aug 6, 2021
9220a50
Merge commit '91fd5c5f86e72521f9d06bdc16135e4b8010839a' into beta
soonlai814 Aug 6, 2021
5e29ab8
Merge branch 'citadel-performance' into app
soonlai814 Aug 7, 2021
fd46527
megredd
soonlai814 Aug 7, 2021
f662674
Merge commit '91fd5c5f86e72521f9d06bdc16135e4b8010839a' into app
soonlai814 Aug 7, 2021
f0cfbe0
Merge branch 'faang-stonk' into app
soonlai814 Aug 7, 2021
39329a7
Fix LP Price issue
2manslkh Aug 10, 2021
89a18d7
Merge commit '39329a753aa8189b297f808d91afaa5df9827607' into beta
soonlai814 Aug 10, 2021
db40352
Merge commit '39329a753aa8189b297f808d91afaa5df9827607' into app
soonlai814 Aug 10, 2021
3dd2ea4
Replace historical apy value if latest apy is 0.
waikahkwan Aug 11, 2021
29cce26
Replace apy value with previous one if current apy = 0.
waikahkwan Aug 11, 2021
44bb168
Delay polygon's cronjob for 2 minutes.
waikahkwan Aug 11, 2021
a8f0a50
Merge commit '44bb168e9be32481bfaac00809fc927254f5d025' into beta
soonlai814 Aug 11, 2021
86b5f9a
update address
soonlai814 Aug 12, 2021
3d22db6
updated strategy info
soonlai814 Aug 12, 2021
b075089
Merge branch 'money-printer' into beta
soonlai814 Aug 12, 2021
7d70e21
Merge branch 'money-printer' into app
soonlai814 Aug 12, 2021
326e2f7
Update whitelist.js
soonlai814 Aug 13, 2021
571c95e
Enhanced cronjob execution sequence.
waikahkwan Aug 13, 2021
f904220
TVL: Amendment on Coingecko API call.
waikahkwan Aug 9, 2021
f8344c1
Merge branch 'beta' into app
soonlai814 Aug 13, 2021
812a1f2
Add DAOventures token to vipDVD and vipDVG TVL calculation.
waikahkwan Aug 13, 2021
008575c
Merge branch 'beta' into app
soonlai814 Aug 13, 2021
7ca9719
Referral Work
AdityaPune Sep 8, 2021
fe30632
Tried API testing, some code changes
AdityaPune Sep 10, 2021
f48352b
Working APIs referral
AdityaPune Sep 16, 2021
f53545b
Referral that works
AdityaPune Sep 27, 2021
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
14 changes: 11 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
SUBGRAPH_ENDPOINT = https://api.thegraph.com/subgraphs/name/rrridges-crypto/yearn-vault-roi-dev
POLYGON_SUBGRAPH_ENDPOINT =
WEB3_ENDPOINT = https://mainnet.infura.io/v3/4f8bf400ab354820998e6dfdea0a1b78
ARCHIVENODE_ENDPOINT = https://api.archivenode.io/93mwpmy684fb0dc3c0q93mwpmwlssf6a
POLYGON_ARCHIVENODE_ENDPOINT =
ETHERSCAN_API_KEY = GEQXZDY67RZ4QHNU1A57QVPNDV3RP1RYH4
SLACK_HOOK_URL =

AWS_ACCESS_KEY_ID = AKIA2FCIA3THEGVNNLSN
AWS_SECRET_ACCESS_KEY = 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
AWS_DEFAULT_REGION = us-east-1
MONGO_USERNAME=
MONGO_PASSWORD=
MONGO_HOSTNAME=
MONGO_PORT=
MONGO_DB=
PRODUCTION=
AUTH_MECHANISM=
MONGO_AUTH=
15 changes: 6 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
FROM node:14-buster
FROM node:14

RUN npm install -g serverless && \
npm install -g serverless-offline
WORKDIR /api

WORKDIR /opt/app

COPY package*.json ./
COPY package*.json /api/

RUN npm install

COPY . .
COPY ./ /api/

EXPOSE 3000
EXPOSE 8080

CMD [ "sls", "offline", "--host", "0.0.0.0" ]
CMD ["npm", "start"]
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Yearn API intentions are as follows:

## Interact

https://yearn.tools
[https://test.daoventures.co/api/api-docs/]

## Setup Instructions

Expand All @@ -20,8 +20,8 @@ https://yearn.tools
- Install docker
- Execute terminal commands

```
git clone https://github.com/yearn-integrations/yearn-api.git
```cmd
git clone [https://github.com/daoventures/yearn-api.git]
cd yearn-api
cp .env.example .env
docker-compose up
Expand All @@ -48,15 +48,13 @@ docker-compose up
## Stages

- Currently three stages are available
- `prod` is used for production deployments. Production endpoint is https://api.yearn.tools
- `dev` is used for development purposes. Development endpoint is https://dev-api.yearn.tools
- `staging` is used for APIs pending production deployment. Staging endpoint is https://staging-api.yearn.tools

### Reset a stage
- `beta` is used for beta deployments. Beta endpoint is [https://beta.daoventures.co/api/]
- `test` is used for development purposes. Development endpoint is [https://test.daoventures.co/api/]

- Use the command `sls remove --stage dev` to remove all functions and custom domains associated with a stage
## Testing Locally

### API deployment
Comment out the following line in docker-compose.yml

- Use the command `sls deploy --stage dev` to deploy
- You can also deploy a single function using `sls deploy function -f functionName --stage dev`
```yml
command: [--auth]
```
158 changes: 158 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
require("dotenv").config();
const express = require("express");
const db = require("./config/db");
const vaultsApy = require("./services/vaults/apy/handler");
const userStatistics = require("./services/user/vaults/statistics/handler");
const userTransactions = require("./services/user/vaults/transactions/handler");
const vaultsPrice = require("./services/vaults/price/handler");
const vaultsTvl = require("./services/vaults/tvl/handler");
const vaultHistoricalAPYSave = require("./services/vaults/apy/save/historical-handle");
const vaultCategory = require("./services/vaults/category/handler");
const vaultPerformance = require("./services/vaults/performance/handler");
const stakeVIP = require("./services/staking/xdvg/handler");
const stakePool = require("./services/staking/handler");
const stakeXDvg = require("./services/staking/vipdvg/handler");
const reimbursementAddresses = require("./services/reimbursement/handler");
const stakeDaoStakes = require("./services/staking/dao-stake/handler");
const specialEvent = require("./services/user/special-event/handler");
const reimburse = require("./services/user/reimburse/handler");
const referral = require("./services/referral/handler");
const deposit = require("./services/referral/deposit/handler");
const withdraw = require("./services/referral/withdraw/handler");
const app = express();
const cors = require("cors");
const port = process.env.PORT || 8080;
const jobs = require("./jobs/task");
const swaggerUi = require("swagger-ui-express");
const swaggerDocument = require("./swagger.json");
const bodyParser = require("body-parser");

async function init() {
// Improve debugging
process.on("unhandledRejection", (reason, p) => {
console.log("Unhandled Rejection at:", p, "reason:", reason);
});

db.connectDB(async (err) => {
if (err) throw err;
jobs.saveVault();
jobs.saveVaultAPY();
jobs.savePolygonVaultAPY();
jobs.savePricePerFullShare();
jobs.saveHistoricalAPY();
jobs.savePolygonHistoricalAPY();
jobs.saveHistoricalTVL();
jobs.saveHistoricalPools();
jobs.saveABIPools();
jobs.saveVipApr();
jobs.savePerformance();
jobs.saveTransaction();
});

app.use(cors());
app.use(
bodyParser.urlencoded({
extended: true,
})
);
app.use(bodyParser.json());

app.get("/vaults/apy", (req, res) => vaultsApy.handler(res));
app.get("/user/:userAddress/vaults/statistics", (req, res) =>
userStatistics.handler(req, res)
);
app.get("/user/:userAddress/vaults/transactions", (req, res) =>
userTransactions.handler(req, res)
);
app.get("/vaults/price/:farmer/:days", (req, res) =>
vaultsPrice.handleHistoricialPrice(req, res)
);
app.get("/vaults/historical-apy/:contractAddress/:days", (req, res) =>
vaultHistoricalAPYSave.handleHistoricialAPY(req, res)
);
app.get("/vaults/tvl/total", (req, res) => vaultsTvl.totalHandle(req, res));
app.get("/vaults/tvl/:farmer", (req, res) => vaultsTvl.tvlHandle(req, res));
app.get("/vaults/category", (req, res) =>
vaultCategory.getVaultCategory(req, res)
);
app.get("/staking/get-vip-tokens", (req, res) =>
stakeVIP.getVipDVGToken(req, res)
);
app.get("/staking/get-pools", (req, res) => stakePool.getPools(req, res));
app.get("/staking/get-xdvg-stake", (req, res) =>
stakeXDvg.getxDVGStake(req, res)
);
app.get("/staking/get-xdvd-stake", (req, res) => {
stakeXDvg.getxDVDStake(req, res);
});
app.get("/event/verify", (req, res) =>
specialEvent.handleVerifyEvent(req, res)
);
app.get("/event/verify/:amount", (req, res) =>
specialEvent.handler(req, res)
);

app.get("/vaults/performance/:farmer/:days", (req, res) =>
vaultPerformance.performanceHandle(req, res)
);
app.get("/vaults/performance/:farmer", (req, res) =>
vaultPerformance.performanceHandle(req, res)
);

app.get("/reimbursement-addresses/dvg", (req, res) =>
reimbursementAddresses.handler(req, res)
);

app.get("/reimbursement-addresses/dvg/:address", (req, res) =>
reimbursementAddresses.handler(req, res)
);

app.get("/vaults/pnl/:farmer/:days", (req, res) =>
vaultPerformance.pnlHandle(req, res)
);
app.get("/vaults/pnl/:farmer", (req, res) =>
vaultPerformance.pnlHandle(req, res)
);

app.post("/staking/emergency-withdraw-snapshot", (req, res) =>
stakePool.snapshotEmergency(req, res)
);

app.get("/user/reimburse-address/:address", (req, res) =>
reimburse.getReimburseAddress(req, res)
);

app.get("/user/getreferrals", (req, res) => {
referral.seeAllReferrals(req, res);
});

app.post("/user/addreferral", (req, res) => {
referral.addNewReferral(req, res);
});

app.post("/user/adddeposit", (req, res) => {
deposit.addDepositAmount(req, res);
});

app.get("/user/deposits", (req, res) => {
deposit.getAll(req, res);
});

app.post("/user/addwithdrawal", (req, res) => {
withdraw.addWithdrawalAmount(req, res);
});

app.get("/user/withdrawals", (req, res) => {
withdraw.getAll(req, res);
});

app.post("/user/reimburse-address/update", (req, res) => {
reimburse.updateReimburseAddressClaimAmount(req, res);
});

app.use("/api-docs", swaggerUi.serve, swaggerUi.setup(swaggerDocument));

app.listen(port, () => console.log(`Listening on ${port}`));
}

init();
Loading