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

Added endur to yield server #1621

Merged
merged 26 commits into from
Nov 27, 2024
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
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
32 changes: 32 additions & 0 deletions src/adaptors/endur/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const utils = require('../utils')

const apy = async () => {
const apyData = await utils.getData(
'https://app.endur.fi/api/stats'
);
const symbolToToken = {
"STRK": '0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d'
}
const tvl = apyData.tvl;
const pool = "xSTRK Pool";
const underlyingToken = symbolToToken[apyData.asset];
const apy = apyData.apy * 100;
const poolId = "endur_strk";
return [{
pool: poolId,
chain: 'Starknet',
project: 'endur',
symbol: "STRK",
underlyingTokens: [underlyingToken],
tvlUsd: parseFloat(tvl),
apy: parseFloat(apy),
url: 'https://app.endur.fi',
poolMeta: pool
}];
};

module.exports = {
timetravel: false,
apy: apy,
url : 'https://app.endur.fi'
};
Loading