-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing all unused functions of liquid staked base apr, left just xB…
…oo, because idk what to do with the spooky apr service yet;
- Loading branch information
Luiz Gustavo Abou Hatem De Liz
committed
Aug 29, 2023
1 parent
fd7f136
commit a836720
Showing
1 changed file
with
0 additions
and
37 deletions.
There are no files selected for viewing
37 changes: 0 additions & 37 deletions
37
modules/pool/lib/apr-data-sources/liquid-staked-base-apr.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,10 @@ | ||
import axios from 'axios'; | ||
|
||
export class LiquidStakedBaseAprService { | ||
//TODO - remove this, i | ||
public async getWstEthBaseApr(): Promise<number> { | ||
const { data } = await axios.get<{ | ||
data: { aprs: [{ timeUnix: number; apr: number }]; smaApr: number }; | ||
}>('https://eth-api.lido.fi/v1/protocol/steth/apr/sma'); | ||
return data.data.smaApr / 100; | ||
} | ||
|
||
public getSftmxBaseApr(): number { | ||
return 0.046; | ||
} | ||
|
||
//TODO - Remove this, since it's already in ib-linear-apr-handlers | ||
public async getAnkrFtmBaseApr(): Promise<number> { | ||
const { data } = await axios.get<{ services: { serviceName: string; apy: string }[] }>( | ||
'https://api.staking.ankr.com/v1alpha/metrics', | ||
{}, | ||
); | ||
|
||
const ankrFtmApy = data.services.find((service) => service.serviceName === 'ftm'); | ||
return parseFloat(ankrFtmApy?.apy || '0') / 100; | ||
} | ||
//TODO - Remove this, since it's already in ib-linear-apr-handlers | ||
public async getAnkrEthBaseApr(): Promise<number> { | ||
const { data } = await axios.get<{ services: { serviceName: string; apy: string }[] }>( | ||
'https://api.staking.ankr.com/v1alpha/metrics', | ||
{}, | ||
); | ||
|
||
const ankrEthApy = data.services.find((service) => service.serviceName === 'eth'); | ||
return parseFloat(ankrEthApy?.apy || '0') / 100; | ||
} | ||
|
||
public async getXBooBaseApr(): Promise<number> { | ||
const { data } = await axios.get<string>('https://api.spooky.fi/api/xboo', {}); | ||
return parseFloat(data) / 100; | ||
} | ||
|
||
public getREthBaseApr(): number { | ||
return 0.0425; | ||
} | ||
} | ||
|
||
export const liquidStakedBaseAprService = new LiquidStakedBaseAprService(); |