Skip to content

Commit a3e99b4

Browse files
authored
2024 q3 geysers (#257)
* updated deps * removed binaries from git * deployed new geysers q3 2024 * updated apy calc * ran format * fixed build ssl error * fixed staking token parse error * removed binary from history * updated openssl version * fixed weth price error
1 parent 7b5697c commit a3e99b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+27652
-19550
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,7 @@ flattened
9595
scripts.sh
9696

9797
# python
98-
.python-version
98+
.python-version
99+
100+
# yarn
101+
.yarn/install-state.gz

.yarn/install-state.gz

-17.1 KB
Binary file not shown.

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,18 @@ ethereum:
1515
proxyAdmin: 0xc70F5bc82ccb3de00400814ff8bD406C271db3c4
1616
geyserRegistry: 0xFc43803F203e3821213bE687120aD44C8a21A7e7
1717
geysers:
18-
- poolRef: "UNI-ETH-AMPL-V2 (Beehive V7)"
19-
deployment: 0x5Ec6f02D0b657E4a56d6020Bc21F19f2Ca13EcA9
18+
- poolRef: "CHARM-WAMPL-WETH (Crystal V1)"
19+
deployment: 0xEac308Fa45A9b64cfb6965e8d1237B39016862e3
20+
21+
- poolRef: "BB-SPOT-USDC (Steamboat V1)"
22+
deployment: 0xF0a45FA4fBec33A2A51E08058bEA92761c08D7D5
2023

2124
- poolRef: "CHARM-SPOT-USDC (Great geyser V1)"
2225
deployment: 0x7B2e9353D3Bf71d9f9246B1291eE29DFB11B32C7
2326

27+
# - poolRef: "UNI-ETH-AMPL-V2 (Beehive V7)"
28+
# deployment: 0x5Ec6f02D0b657E4a56d6020Bc21F19f2Ca13EcA9
29+
2430
# - poolRef: "Arrakis Vault V1 USDC/SPOT (RAKIS-35) (Fly V2)"
2531
# deployment: 0x392b58F407Efe1681a2EBB470600Bc2146D231a2
2632

frontend/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ yarn-error.log*
2525
.env
2626
factories-*.json
2727
!factories-latest.json
28+
29+
# yarn
30+
.yarn/install-state.gz

frontend/README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# token-geyser-v2-ui
22

33
Jump to
4+
45
- [Known workarounds](#known-workarounds)
56
- [Required Setup](#required-setup)
67
- [Stats Calculation](#stats)
@@ -12,7 +13,7 @@ Jump to
1213
## Known Workarounds
1314

1415
- `let mounted = true` in `useEffect` is a workaround for suppressing the warning saying that a state update on an unmounted component is not possible: https://stackoverflow.com/questions/53949393/cant-perform-a-react-state-update-on-an-unmounted-component
15-
- react-spring has a bug where floating point numbers are casted as integers on re-render (e.g. '1.0' gets shown as '1' on re-render). This is a temporary work-around, see https://github.com/pmndrs/react-spring/issues/1564
16+
- react-spring has a bug where floating point numbers are casted as integers on re-render (e.g. '1.0' gets shown as '1' on re-render). This is a temporary work-around, see https://github.com/pmndrs/react-spring/issues/1564
1617
- Opening a modal right after closing a previous one can mess up the `overflow-y` of the page. As a workaround, there is a delay before the second modal is opened (see the function `handleConfirmUnstake` under `src/components/GeyserStakeView.tsx`)
1718

1819
## Required Setup
@@ -25,7 +26,6 @@ The following are the main elements that need to be configured prior to deployin
2526
4. [List of additional tokens for vault management](#list-of-additional-tokens)
2627
5. [Infura Project ID](#ethereum-provider)
2728

28-
2929
## GraphQL Endpoint
3030

3131
To make sure that the application can fetch data from the subgraph,
@@ -37,7 +37,6 @@ The initialization of the GraphQL client can be found under `src/queries/client.
3737

3838
Make sure that the environment variable `NODE_ENV` is set to something other than `development` when deploying to production.
3939

40-
4140
## Geyser Specific Configuration
4241

4342
### List of Geysers
@@ -69,6 +68,7 @@ and write a function that will return `Promise<StakingTokenInfo>`.
6968
Say we want to add a new staking token called `LP`. The following changes will need to be made:
7069

7170
Under `src/constants.ts`
71+
7272
```
7373
export enum StakingToken {
7474
...
@@ -77,6 +77,7 @@ export enum StakingToken {
7777
```
7878

7979
Under `src/utils/stakingToken.ts`
80+
8081
```
8182
export const getStakingTokenInfo = async (...) => {
8283
...
@@ -113,6 +114,7 @@ and write a function that will return `Promise<RewardTokenInfo>`.
113114
Say we want to add a new reward token called `REW`. The following changes will need to be made:
114115

115116
Under `src/constants.ts`
117+
116118
```
117119
export enum RewardToken {
118120
...
@@ -121,6 +123,7 @@ export enum RewardToken {
121123
```
122124

123125
Under `src/rewardToken.ts`
126+
124127
```
125128
export const getRewardTokenInfo = async (...) => {
126129
...
@@ -161,6 +164,7 @@ Note that it is assumed that the token is an ERC20 token.
161164
Say we want to show the `WETH` balance of users' vaults. The following changes will need to be made:
162165

163166
Under `src/config/additionalTokens.ts`
167+
164168
```
165169
const mainnetAdditionalTokens = [
166170
...
@@ -203,19 +207,20 @@ A user can manage their vaults through the vault management view. This view will
203207

204208
It is possible for the user to withdraw the unlocked balance of a token from their vault to their wallet through this view.
205209

206-
207210
## Withdraw Unlocked Balance When Unstaking
208211

209212
One edge case that comes up in the current unstake flow is that the staking tokens might be staked into different geyser programs (maybe external ones). If that is the case, then unstaking, say, 5 tokens from a geyser does not always imply that 5 tokens will be unlocked after the unstaking. As it currently stands, if this scenario were to arise, the transaction to withdraw the staking tokens will fail, and the user can withdraw the actual unlocked balance from their vault using the vault management view.
210213

211214
However, the functionality to withdraw exactly the unlocked balance is implemented in the code, but it is simply not used. If the decision is to enable this functionality, the following changes are required:
212215

213216
To withdraw the entire unlocked balance of staking tokens after unstaking, under `src/constants.ts`, set `WITHDRAW_UNLOCKED_STAKING_TOKENS_WHEN_UNSTAKING` to `true`
217+
214218
```
215219
export const WITHDRAW_UNLOCKED_STAKING_TOKENS_WHEN_UNSTAKING = true
216220
```
217221

218222
To withdraw the entire unlocked balance of reward tokens after unstaking, under `src/constants.ts`, set `WITHDRAW_UNLOCKED_REWARD_TOKENS_WHEN_UNSTAKING` to `true`
223+
219224
```
220225
export const WITHDRAW_UNLOCKED_REWARD_TOKENS_WHEN_UNSTAKING = true
221226
```
@@ -271,7 +276,7 @@ You can learn more in the [Create React App documentation](https://facebook.gith
271276

272277
To learn React, check out the [React documentation](https://reactjs.org/).
273278

274-
***
279+
---
275280

276281
## Deployment
277282

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"eject": "react-scripts eject",
3838
"lint:fix": "eslint src --ext .ts,.tsx --fix",
3939
"lint": "eslint src --ext .ts,.tsx",
40-
"prettify": "prettier --write ."
40+
"format": "prettier --write ."
4141
},
4242
"browserslist": {
4343
"production": [
Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
{
2-
"name": "App",
3-
"icons": [
4-
{
5-
"src": "\/android-icon-36x36.png",
6-
"sizes": "36x36",
7-
"type": "image\/png",
8-
"density": "0.75"
9-
},
10-
{
11-
"src": "\/android-icon-48x48.png",
12-
"sizes": "48x48",
13-
"type": "image\/png",
14-
"density": "1.0"
15-
},
16-
{
17-
"src": "\/android-icon-72x72.png",
18-
"sizes": "72x72",
19-
"type": "image\/png",
20-
"density": "1.5"
21-
},
22-
{
23-
"src": "\/android-icon-96x96.png",
24-
"sizes": "96x96",
25-
"type": "image\/png",
26-
"density": "2.0"
27-
},
28-
{
29-
"src": "\/android-icon-144x144.png",
30-
"sizes": "144x144",
31-
"type": "image\/png",
32-
"density": "3.0"
33-
},
34-
{
35-
"src": "\/android-icon-192x192.png",
36-
"sizes": "192x192",
37-
"type": "image\/png",
38-
"density": "4.0"
39-
}
40-
]
41-
}
2+
"name": "App",
3+
"icons": [
4+
{
5+
"src": "/android-icon-36x36.png",
6+
"sizes": "36x36",
7+
"type": "image/png",
8+
"density": "0.75"
9+
},
10+
{
11+
"src": "/android-icon-48x48.png",
12+
"sizes": "48x48",
13+
"type": "image/png",
14+
"density": "1.0"
15+
},
16+
{
17+
"src": "/android-icon-72x72.png",
18+
"sizes": "72x72",
19+
"type": "image/png",
20+
"density": "1.5"
21+
},
22+
{
23+
"src": "/android-icon-96x96.png",
24+
"sizes": "96x96",
25+
"type": "image/png",
26+
"density": "2.0"
27+
},
28+
{
29+
"src": "/android-icon-144x144.png",
30+
"sizes": "144x144",
31+
"type": "image/png",
32+
"density": "3.0"
33+
},
34+
{
35+
"src": "/android-icon-192x192.png",
36+
"sizes": "192x192",
37+
"type": "image/png",
38+
"density": "4.0"
39+
}
40+
]
41+
}

frontend/public/index.html

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1" />
66
<meta name="theme-color" content="#000000" />
7-
<meta
8-
name="description"
9-
content="Ampleforth geyser liquidity mining application"
10-
/>
7+
<meta name="description" content="Ampleforth geyser liquidity mining application" />
118
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
129
<!--
1310
manifest.json provides metadata used when your web app is installed on a
@@ -25,22 +22,30 @@
2522
-->
2623

2724
<!-- Ample additions start -->
28-
<link rel="preload" href="https://fonts.gstatic.com/s/cormorantgaramond/v5/EI2hhCO6kSfLAy-Dpd8fdwtAvOaaBo6YYi0S8FnWF2s.woff2" as="font" crossorigin="anonymous">
29-
<link rel="stylesheet" href="https://use.fontawesome.com/1df5373559.css">
30-
<link href="https://fonts.googleapis.com/css2?family=Montserrat+Alternates:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
31-
<link rel="apple-touch-icon" sizes="57x57" href="%PUBLIC_URL%/favicon/apple-icon-57x57.png">
32-
<link rel="apple-touch-icon" sizes="60x60" href="%PUBLIC_URL%/favicon/apple-icon-60x60.png">
33-
<link rel="apple-touch-icon" sizes="72x72" href="%PUBLIC_URL%/favicon/apple-icon-72x72.png">
34-
<link rel="apple-touch-icon" sizes="76x76" href="%PUBLIC_URL%/favicon/apple-icon-76x76.png">
35-
<link rel="apple-touch-icon" sizes="114x114" href="%PUBLIC_URL%/favicon/apple-icon-114x114.png">
36-
<link rel="apple-touch-icon" sizes="120x120" href="%PUBLIC_URL%/favicon/apple-icon-120x120.png">
37-
<link rel="apple-touch-icon" sizes="144x144" href="%PUBLIC_URL%/favicon/apple-icon-144x144.png">
38-
<link rel="apple-touch-icon" sizes="152x152" href="%PUBLIC_URL%/favicon/apple-icon-152x152.png">
39-
<link rel="apple-touch-icon" sizes="180x180" href="%PUBLIC_URL%/favicon/apple-icon-180x180.png">
40-
<link rel="icon" type="image/png" sizes="192x192" href="%PUBLIC_URL%/favicon/android-icon-192x192.png">
41-
<link rel="icon" type="image/png" sizes="32x32" href="%PUBLIC_URL%/favicon/favicon-32x32.png">
42-
<link rel="icon" type="image/png" sizes="96x96" href="%PUBLIC_URL%/favicon/favicon-96x96.png">
43-
<link rel="icon" type="image/png" sizes="16x16" href="%PUBLIC_URL%/favicon/favicon-16x16.png">
25+
<link
26+
rel="preload"
27+
href="https://fonts.gstatic.com/s/cormorantgaramond/v5/EI2hhCO6kSfLAy-Dpd8fdwtAvOaaBo6YYi0S8FnWF2s.woff2"
28+
as="font"
29+
crossorigin="anonymous"
30+
/>
31+
<link rel="stylesheet" href="https://use.fontawesome.com/1df5373559.css" />
32+
<link
33+
href="https://fonts.googleapis.com/css2?family=Montserrat+Alternates:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
34+
rel="stylesheet"
35+
/>
36+
<link rel="apple-touch-icon" sizes="57x57" href="%PUBLIC_URL%/favicon/apple-icon-57x57.png" />
37+
<link rel="apple-touch-icon" sizes="60x60" href="%PUBLIC_URL%/favicon/apple-icon-60x60.png" />
38+
<link rel="apple-touch-icon" sizes="72x72" href="%PUBLIC_URL%/favicon/apple-icon-72x72.png" />
39+
<link rel="apple-touch-icon" sizes="76x76" href="%PUBLIC_URL%/favicon/apple-icon-76x76.png" />
40+
<link rel="apple-touch-icon" sizes="114x114" href="%PUBLIC_URL%/favicon/apple-icon-114x114.png" />
41+
<link rel="apple-touch-icon" sizes="120x120" href="%PUBLIC_URL%/favicon/apple-icon-120x120.png" />
42+
<link rel="apple-touch-icon" sizes="144x144" href="%PUBLIC_URL%/favicon/apple-icon-144x144.png" />
43+
<link rel="apple-touch-icon" sizes="152x152" href="%PUBLIC_URL%/favicon/apple-icon-152x152.png" />
44+
<link rel="apple-touch-icon" sizes="180x180" href="%PUBLIC_URL%/favicon/apple-icon-180x180.png" />
45+
<link rel="icon" type="image/png" sizes="192x192" href="%PUBLIC_URL%/favicon/android-icon-192x192.png" />
46+
<link rel="icon" type="image/png" sizes="32x32" href="%PUBLIC_URL%/favicon/favicon-32x32.png" />
47+
<link rel="icon" type="image/png" sizes="96x96" href="%PUBLIC_URL%/favicon/favicon-96x96.png" />
48+
<link rel="icon" type="image/png" sizes="16x16" href="%PUBLIC_URL%/favicon/favicon-16x16.png" />
4449
<!-- Ample additions end -->
4550

4651
<title>Ampleforth Geyser</title>

frontend/src/App.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ import { DropdownsContainer } from 'components/DropdownsContainer'
1313
import { useEffect } from 'react'
1414

1515
function App() {
16-
1716
useEffect(() => {
18-
localStorage.clear();
17+
localStorage.clear()
1918
}, [])
2019

2120
return (

frontend/src/components/DisabledInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface Props extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onCha
77

88
export const DisabledInput: React.FC<Props> = (props) => (
99
<Container>
10-
<Input {...props} disabled />
10+
<Input {...props} disabled />
1111
</Container>
1212
)
1313

0 commit comments

Comments
 (0)