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

Remove-tessera-&-add-sdeUSD #1178

Merged
merged 9 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .changeset/long-candles-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'backend': patch
---

APR sources, remove sAPE, svETH, swETH, USDR; add sdeUSD
26 changes: 6 additions & 20 deletions config/mainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,6 @@ export default <NetworkData>{
maker: {
sdai: '0x83f20f44975d03b1b09e64809b757c47f942beea',
},
tessera: {
tokens: {
sAPE: {
tesseraPoolAddress: '0x5954ab967bc958940b7eb73ee84797dc8a2afbb9',
tokenAddress: '0x7966c5bae631294d7cffcea5430b78c2f76db6fa',
},
},
},
tranchess: {
sourceUrl: 'https://tranchess.com/eth/api/v3/funds',
tokens: {
Expand All @@ -277,7 +269,6 @@ export default <NetworkData>{
url: 'https://gateway.yieldnest.finance/api/v1/graphql',
token: '0x09db87a538bd693e9d08544577d5ccfaa6373a48',
},
sveth: true,
teth: true,
defaultHandlers: {
uniETH: {
Expand Down Expand Up @@ -334,17 +325,6 @@ export default <NetworkData>{
path: 'yearlyAPR',
isIbYield: true,
},
USDR: {
tokenAddress: '0xaf0d9d65fc54de245cda37af3d18cbec860a4d4b',
sourceUrl: 'http://usdr-api.us-east-1.elasticbeanstalk.com/usdr/apy',
path: 'usdr',
isIbYield: true,
},
swETH: {
tokenAddress: '0xf951e335afb289353dc249e82926178eac7ded78',
sourceUrl: 'https://v3.svc.swellnetwork.io/api/tokens/sweth/apr',
isIbYield: true,
},
wjAURA: {
tokenAddress: '0x198d7387fa97a73f05b8578cdeff8f2a1f34cd1f',
sourceUrl: 'https://data.jonesdao.io/api/v1/jones/apy-wjaura',
Expand Down Expand Up @@ -432,6 +412,12 @@ export default <NetworkData>{
path: 'data.smaApr',
isIbYield: true,
},
sdeUSD: {
tokenAddress: '0x5c5b196abe0d54485975d1ec29617d42d9198326',
sourceUrl: 'https://api-deusd-prod-public.elixir.xyz/public/deusd_apy',
path: 'deusd_apy',
isIbYield: true,
},
},
},
datastudio: {
Expand Down
11 changes: 0 additions & 11 deletions modules/network/apr-config-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export interface YbAprConfig {
maker?: MakerAprConfig;
ovix?: OvixAprConfig;
reaper?: ReaperAprConfig;
tessera?: TesseraAprConfig;
tetu?: TetuAprConfig;
tranchess?: TranchessAprConfig;
yearn?: YearnAprConfig;
Expand Down Expand Up @@ -157,16 +156,6 @@ export interface ReaperAprConfig {
};
}

export interface TesseraAprConfig {
tokens: {
[tokenName: string]: {
tesseraPoolAddress: string;
tokenAddress: string;
isIbYield?: boolean;
};
};
}

export interface TetuAprConfig {
sourceUrl: string;
tokens: {
Expand Down
3 changes: 1 addition & 2 deletions modules/pool/lib/apr-data-sources/yb-apr-handlers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const sourceToHandler = {
maker: sources.MakerAprHandler,
ovix: sources.OvixAprHandler,
// reaper: sources.ReaperCryptAprHandler, // Removed, pools rekt
tessera: sources.TesseraAprHandler,
tetu: sources.TetuAprHandler,
tranchess: sources.TranchessAprHandler,
yearn: sources.YearnAprHandler,
Expand All @@ -24,7 +23,7 @@ const sourceToHandler = {
maple: sources.Maple,
yieldnest: sources.Yieldnest,
etherfi: sources.Etherfi,
sveth: sources.svEthAprHandler,
// sveth: sources.svEthAprHandler, // Savvy migrated to arbitrum
dforce: sources.DForce,
defillama: sources.Defillama,
teth: sources.TreehouseAprHandler,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios';
import { AprHandler } from '..';
import { AprHandler } from '../types';

export class AaveAprHandler implements AprHandler {
tokens: {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BeefyAprConfig } from '../../../../../network/apr-config-types';
import { AprHandler } from '..';
import { AprHandler } from '../types';
import axios from 'axios';

export class BeefyAprHandler implements AprHandler {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AprHandler } from '..';
import { AprHandler } from '../types';
import { YbAprConfig } from '../../../../../network/apr-config-types';

const query = `
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios';
import { AprHandler } from '..';
import { AprHandler } from '../types';
import { EulerAprConfig } from '../../../../../network/apr-config-types';

export class EulerAprHandler implements AprHandler {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios';
import { AprHandler } from '..';
import { AprHandler } from '../types';
import { GearBoxAprConfig } from '../../../../../network/apr-config-types';

export class GearboxAprHandler implements AprHandler {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios';
import { AprHandler } from '..';
import { AprHandler } from '../types';
import { IdleAprConfig } from '../../../../../network/apr-config-types';

export class IdleAprHandler implements AprHandler {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
export * from './default-apr-handler';
export * from './aave-apr-handler';
export * from './sftmx-apr-handler';
export * from './euler-apr-handler';
export * from './gearbox-apr-handler';
export * from './idle-apr-handler';
export * from './ovix-apr-handler';
export * from './tessera-apr-handler';
export * from './tetu-apr-handler';
export * from './tranchess-apr-handler';
export * from './yearn-apr-handler';
export * from './reaper-crypt-apr-handler';
// export * from './reaper-crypt-apr-handler'; // Removed, pools rekt
export * from './beefy-apr-handler';
export * from './maker-apr-handler';
export * as MakerGnosis from './maker-gnosis-apr-handler';
export * from './bloom-apr-handler';
export * from './stakewise-apr-handler';
export * from './maple-apr-handler';
export * from './yieldnest-apr-handler';
export * from './etherfi-apr-handler';
export * from './sv-eth';
// export * from './sv-eth'; // Savvy migrated to arbitrum
export * from './dforce-apr-handler';
export * from './defillama-apr-handler';
export * from './teth';
// These need a refactor, because they depend on the network context
export * from './sftmx-apr-handler';
export * from './ovix-apr-handler';
export * from './bloom-apr-handler';
export * as MakerGnosis from './maker-gnosis-apr-handler'; // Not used, not sure why it's not referenced anywhere ???
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AprHandler } from '..';
import { AprHandler } from '../types';
import { MakerAprConfig } from '../../../../../network/apr-config-types';
import { abi as makerPotAbi } from './abis/maker-pot';
import config from '../../../../../../config';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createPublicClient, formatEther, http, parseAbi } from 'viem';
import { mainnet } from 'viem/chains';
import type { AprHandler } from '../';
import type { AprHandler } from '../types';
import config from '../../../../../../config/mainnet';

const client = createPublicClient({
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios';
import { AprHandler } from '..';
import { AprHandler } from '../types';
import { TetuAprConfig } from '../../../../../network/apr-config-types';

export class TetuAprHandler implements AprHandler {
Expand Down
Loading
Loading