-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #290 from alchemix-finance/staging
CHORE: Staging
- Loading branch information
Showing
10 changed files
with
24 additions
and
12 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/** Alchemist contract takes a 10% fee at harvest transactions. */ | ||
export const ALCHEMIST_FEE_MULTIPLIER = 0.9; |
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,9 +1,10 @@ | ||
import { AprFn } from "@/lib/config/metadataTypes"; | ||
import { ALCHEMIST_FEE_MULTIPLIER } from "./common"; | ||
|
||
const apiUrl = "https://api.frax.finance/v2/frxeth/summary/latest"; | ||
|
||
export const getFraxApy: AprFn = async () => { | ||
const query = await fetch(apiUrl); | ||
const data = (await query.json()) as { sfrxethApr: number }; | ||
return data.sfrxethApr * 0.9; | ||
return data.sfrxethApr * ALCHEMIST_FEE_MULTIPLIER; | ||
}; |
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
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
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,9 +1,10 @@ | ||
// see documentation at https://docs.lido.fi/integrations/api | ||
|
||
import { AprFn } from "@/lib/config/metadataTypes"; | ||
import { ALCHEMIST_FEE_MULTIPLIER } from "./common"; | ||
|
||
export const getLidoApy: AprFn = async () => { | ||
const api = await fetch("https://eth-api.lido.fi/v1/protocol/steth/apr/last"); | ||
const data = await api.json(); | ||
return (data.data.apr * 0.9) as number; | ||
return (data.data.apr as number) * ALCHEMIST_FEE_MULTIPLIER; | ||
}; |
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
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
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