From 24cc5728ce28dfaf537ee515679f844ca4a80768 Mon Sep 17 00:00:00 2001 From: Define101 Date: Sun, 17 Dec 2023 18:27:34 +0000 Subject: [PATCH] clear code (npm run format) --- .../peggedAssets/alchemix-usd/index.ts | 11 +- .../peggedAssets/anchored-coins-eur/index.ts | 6 +- .../peggedAssets/bacon-protocol-home/index.ts | 6 +- .../peggedAssets/bank-of-chain/index.ts | 12 +- src/adapters/peggedAssets/baousd/index.ts | 10 +- .../peggedAssets/binance-usd/index.ts | 62 +- src/adapters/peggedAssets/bob/index.ts | 9 +- src/adapters/peggedAssets/cadc/index.ts | 30 +- .../peggedAssets/celo-dollar/index.ts | 2 +- src/adapters/peggedAssets/clever-usd/index.ts | 10 +- .../peggedAssets/coin98-dollar/index.ts | 22 +- src/adapters/peggedAssets/composite/index.ts | 14 +- src/adapters/peggedAssets/czusd/index.ts | 27 +- src/adapters/peggedAssets/dai/index.ts | 29 +- .../peggedAssets/dam-finance/index.ts | 2 +- .../peggedAssets/davos-protocol/index.ts | 18 +- src/adapters/peggedAssets/defi-franc/index.ts | 51 +- src/adapters/peggedAssets/dei-token/index.ts | 6 +- .../peggedAssets/digitaldollar/index.ts | 8 +- src/adapters/peggedAssets/djed/index.ts | 28 +- src/adapters/peggedAssets/dola-usd/index.ts | 92 +- .../peggedAssets/e-money-eur/index.ts | 27 +- .../peggedAssets/ethena-usde/index.ts | 8 +- .../peggedAssets/ethos-reserve-note/index.ts | 2 +- .../peggedAssets/euroe-stablecoin/index.ts | 4 +- src/adapters/peggedAssets/fei-usd/index.ts | 8 +- .../peggedAssets/first-digital-usd/index.ts | 6 +- src/adapters/peggedAssets/flex-usd/index.ts | 8 +- .../float-protocol-float/index.ts | 8 +- src/adapters/peggedAssets/frax/index.ts | 26 +- .../peggedAssets/gemini-dollar/index.ts | 18 +- src/adapters/peggedAssets/grai/index.ts | 6 +- src/adapters/peggedAssets/gyen/index.ts | 63 +- src/adapters/peggedAssets/hedge-usd/index.ts | 6 +- .../peggedAssets/helio-protocol-hay/index.ts | 24 +- src/adapters/peggedAssets/helper/cardano.ts | 19 +- src/adapters/peggedAssets/helper/getSupply.ts | 53 +- src/adapters/peggedAssets/helper/mixin.ts | 2 +- src/adapters/peggedAssets/helper/ontology.ts | 10 +- .../peggedAssets/helper/polynetwork.ts | 6 +- src/adapters/peggedAssets/helper/tezos.ts | 14 +- .../peggedAssets/high-yield-usd/index.ts | 5 +- src/adapters/peggedAssets/husd/index.ts | 6 +- src/adapters/peggedAssets/index.ts | 88 +- .../peggedAssets/inter-stable-token/index.ts | 14 +- .../peggedAssets/iron-bank-euro/index.ts | 6 +- src/adapters/peggedAssets/iusd/index.ts | 20 +- .../peggedAssets/liquity-usd/index.ts | 6 +- .../peggedAssets/monerium-eur-money/index.ts | 56 +- src/adapters/peggedAssets/nars/index.ts | 18 +- src/adapters/peggedAssets/nexus-usd/index.ts | 2 +- src/adapters/peggedAssets/nexus/index.ts | 29 +- src/adapters/peggedAssets/note/index.ts | 2 +- src/adapters/peggedAssets/nxusd/index.ts | 72 +- .../peggedAssets/offshift-anonusd/index.ts | 16 +- .../ondo-us-dollar-yield/index.ts | 10 +- .../peggedAssets/origin-dollar/index.ts | 10 +- .../peggedAssets/overnight-dai/index.ts | 32 +- src/adapters/peggedAssets/pando-usd/index.ts | 6 +- .../peggedAssets/paxos-standard/index.ts | 8 +- src/adapters/peggedAssets/paypal-usd/index.ts | 16 +- src/adapters/peggedAssets/peg-eusd/index.ts | 2 +- src/adapters/peggedAssets/peggedAsset.type.ts | 2 +- .../peggedAssets/platypus-usd/index.ts | 12 +- .../peggedAssets/prisma-mkusd/index.ts | 2 +- src/adapters/peggedAssets/psy/index.ts | 24 +- src/adapters/peggedAssets/pusd-2/index.ts | 8 +- .../peggedAssets/ratio-stable-coin/index.ts | 33 +- src/adapters/peggedAssets/real-usd/index.ts | 8 +- src/adapters/peggedAssets/redeemable/index.ts | 20 +- src/adapters/peggedAssets/reserve/index.ts | 18 +- src/adapters/peggedAssets/savvy-usd/index.ts | 2 +- src/adapters/peggedAssets/sdai/index.ts | 16 +- src/adapters/peggedAssets/seur/index.ts | 8 +- src/adapters/peggedAssets/sperax-usd/index.ts | 8 +- src/adapters/peggedAssets/stabl-fi/index.ts | 14 +- .../peggedAssets/stasis-eurs/index.ts | 4 +- src/adapters/peggedAssets/stbl/index.ts | 8 +- src/adapters/peggedAssets/tbill/index.ts | 2 +- src/adapters/peggedAssets/terrausd/index.ts | 14 +- src/adapters/peggedAssets/test.ts | 10 +- .../peggedAssets/tether-eurt/index.ts | 4 +- src/adapters/peggedAssets/tether/index.ts | 38 +- .../peggedAssets/token-dforce-usd/index.ts | 2 +- src/adapters/peggedAssets/tor/index.ts | 12 +- src/adapters/peggedAssets/uaht/index.ts | 10 +- .../peggedAssets/usd-balance/index.ts | 2 +- src/adapters/peggedAssets/usd-coin/index.ts | 84 +- src/adapters/peggedAssets/usd/index.ts | 28 +- src/adapters/peggedAssets/usd2/index.ts | 80 +- src/adapters/peggedAssets/usdh/index.ts | 4 +- src/adapters/peggedAssets/usdk/index.ts | 12 +- src/adapters/peggedAssets/usdlemma/index.ts | 2 +- src/adapters/peggedAssets/usdm/index.ts | 14 +- src/adapters/peggedAssets/usdtplus/index.ts | 28 +- src/adapters/peggedAssets/usdv/index.ts | 188 +- src/adapters/peggedAssets/usdx/index.ts | 9 +- src/adapters/peggedAssets/usk/index.ts | 12 +- src/adapters/peggedAssets/usn/index.ts | 8 +- .../peggedAssets/uxd-stablecoin/index.ts | 4 +- src/adapters/peggedAssets/vai/index.ts | 8 +- src/adapters/peggedAssets/xsgd/index.ts | 4 +- .../peggedAssets/yusd-stablecoin/index.ts | 4 +- .../peggedAssets/zunami-protocol/index.ts | 8 +- src/adapters/peggedAssets/zusd/index.ts | 41 +- src/alertOutdated.ts | 31 +- src/getStablecoinPrices.ts | 21 +- src/peggedAssets/storePeggedAssets/errorDb.ts | 3 +- .../getAndStorePeggedAssets.ts | 43 +- .../storePeggedAssets/storePegged.ts | 2 +- .../storePeggedAssets/testStorePegged.ts | 12 +- src/peggedData/backfilledChains.ts | 48 +- src/peggedData/bridgeData.ts | 2 +- src/peggedData/peggedData.ts | 2131 +++++++++-------- src/peggedData/types.ts | 11 +- src/storeGetStablecoinChart.ts | 8 +- src/storePeggedPrices.ts | 6 +- src/storeRates.ts | 22 +- src/testGetPeggedChart.ts | 2 +- src/triggerStorePegged.ts | 7 +- src/types.ts | 13 +- src/utils/normalizeChain.ts | 20 +- src/utils/s3.ts | 6 +- src/utils/wrapOrRedirect.ts | 44 +- 124 files changed, 2415 insertions(+), 2033 deletions(-) diff --git a/src/adapters/peggedAssets/alchemix-usd/index.ts b/src/adapters/peggedAssets/alchemix-usd/index.ts index 810218f5..21c2c0ca 100644 --- a/src/adapters/peggedAssets/alchemix-usd/index.ts +++ b/src/adapters/peggedAssets/alchemix-usd/index.ts @@ -16,7 +16,7 @@ type ChainContracts = { const chainContracts: ChainContracts = { ethereum: { issued: ["0xbc6da0fe9ad5f3b0d58160288917aa56653660e9"], - unreleased: ["0x9735f7d3ea56b454b24ffd74c58e9bd85cfad31b"] // AMO + unreleased: ["0x9735f7d3ea56b454b24ffd74c58e9bd85cfad31b"], // AMO }, arbitrum: { bridgedFromETH: ["0x2130d2a1e51112D349cCF78D2a1EE65843ba36e0"], // multichain @@ -25,7 +25,7 @@ const chainContracts: ChainContracts = { bridgedFromETH: [ "0xb2c22A9fb4FC02eb9D1d337655Ce079a04a526C7", // multichain "0xCB8FA9a76b8e203D8C3797bF438d8FB81Ea3326A", // also multichain? - ], + ], }, fantom: { bridgedFromETH: ["0xB67FA6deFCe4042070Eb1ae1511Dcd6dcc6a532E"], // has more than in multichain bridge contract @@ -90,7 +90,12 @@ async function chainUnreleased( const adapter: PeggedIssuanceAdapter = { ethereum: { minted: chainMinted("ethereum", 18), - unreleased: chainUnreleased("ethereum", 18, chainContracts.ethereum.issued[0], chainContracts.ethereum.unreleased) + unreleased: chainUnreleased( + "ethereum", + 18, + chainContracts.ethereum.issued[0], + chainContracts.ethereum.unreleased + ), }, arbitrum: { minted: async () => ({}), diff --git a/src/adapters/peggedAssets/anchored-coins-eur/index.ts b/src/adapters/peggedAssets/anchored-coins-eur/index.ts index 87697431..73639b7f 100644 --- a/src/adapters/peggedAssets/anchored-coins-eur/index.ts +++ b/src/adapters/peggedAssets/anchored-coins-eur/index.ts @@ -40,7 +40,7 @@ async function chainMinted(chain: string, decimals: number) { sumSingleBalance( balances, "peggedEUR", - totalSupply / 10 ** decimals, + totalSupply / 10 ** decimals, "issued", false ); @@ -57,7 +57,7 @@ const adapter: PeggedIssuanceAdapter = { bsc: { minted: chainMinted("bsc", 18), unreleased: async () => ({}), - }, + }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/bacon-protocol-home/index.ts b/src/adapters/peggedAssets/bacon-protocol-home/index.ts index 6a84384b..8f37f57c 100644 --- a/src/adapters/peggedAssets/bacon-protocol-home/index.ts +++ b/src/adapters/peggedAssets/bacon-protocol-home/index.ts @@ -1,6 +1,10 @@ const sdk = require("@defillama/sdk"); import { sumSingleBalance } from "../helper/generalUtil"; -import { ChainBlocks, PeggedIssuanceAdapter, Balances } from "../peggedAsset.type"; +import { + ChainBlocks, + PeggedIssuanceAdapter, + Balances, +} from "../peggedAsset.type"; const chainContracts = { ethereum: { diff --git a/src/adapters/peggedAssets/bank-of-chain/index.ts b/src/adapters/peggedAssets/bank-of-chain/index.ts index 1cfb5759..4bdb255c 100644 --- a/src/adapters/peggedAssets/bank-of-chain/index.ts +++ b/src/adapters/peggedAssets/bank-of-chain/index.ts @@ -14,8 +14,8 @@ type ChainContracts = { const chainContracts: ChainContracts = { ethereum: { - issued: ["0x83131242843257bc6C43771762ba467346Efb2CF"],//USDi - } + issued: ["0x83131242843257bc6C43771762ba467346Efb2CF"], //USDi + }, }; async function chainMinted(chain: string, decimals: number) { @@ -34,7 +34,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; diff --git a/src/adapters/peggedAssets/baousd/index.ts b/src/adapters/peggedAssets/baousd/index.ts index aae95ca7..14b8b684 100644 --- a/src/adapters/peggedAssets/baousd/index.ts +++ b/src/adapters/peggedAssets/baousd/index.ts @@ -34,7 +34,13 @@ async function chainMinted(chain: string) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** 18, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** 18, + "issued", + false + ); } return balances; }; @@ -47,4 +53,4 @@ const adapter: PeggedIssuanceAdapter = { }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/binance-usd/index.ts b/src/adapters/peggedAssets/binance-usd/index.ts index 18da8b49..6f0f340d 100644 --- a/src/adapters/peggedAssets/binance-usd/index.ts +++ b/src/adapters/peggedAssets/binance-usd/index.ts @@ -176,8 +176,10 @@ const chainContracts: ChainContracts = { bridgedFromBSC: ["0xBEB0131D95AC3F03fd15894D0aDE5DBf7451d171"], }, osmosis: { - bridgedFromETH: ["ibc/6329DD8CF31A334DD5BE3F68C846C9FE313281362B37686A62343BAC1EB1546D"], - } + bridgedFromETH: [ + "ibc/6329DD8CF31A334DD5BE3F68C846C9FE313281362B37686A62343BAC1EB1546D", + ], + }, }; /* @@ -297,21 +299,21 @@ async function chainUnreleased(chain: string, decimals: number) { _chainBlocks: ChainBlocks ) { let balances = {} as Balances; - const reserve = ( - await sdk.api.erc20.balanceOf({ - target: chainContracts[chain].issued[0], - owner: chainContracts[chain].reserves[0], - block: _chainBlocks?.[chain], - chain: chain, - }) - ).output; - sumSingleBalance( - balances, - "peggedUSD", - reserve / 10 ** decimals, - "issued", - false - ); + const reserve = ( + await sdk.api.erc20.balanceOf({ + target: chainContracts[chain].issued[0], + owner: chainContracts[chain].reserves[0], + block: _chainBlocks?.[chain], + chain: chain, + }) + ).output; + sumSingleBalance( + balances, + "peggedUSD", + reserve / 10 ** decimals, + "issued", + false + ); return balances; }; } @@ -451,9 +453,7 @@ const adapter: PeggedIssuanceAdapter = { minted: async () => ({}), unreleased: async () => ({}), bsc: sumMultipleBalanceFunctions( - [ - bridgedSupply("metis", 18, chainContracts.metis.bridgedFromBSC), - ], + [bridgedSupply("metis", 18, chainContracts.metis.bridgedFromBSC)], "peggedUSD" ), }, @@ -486,7 +486,7 @@ const adapter: PeggedIssuanceAdapter = { kava: { minted: async () => ({}), unreleased: async () => ({}), - bsc: kavaMinted(chainContracts.kava.bridgeOnBNB), + bsc: kavaMinted(chainContracts.kava.bridgeOnBNB), }, loopring: { minted: async () => ({}), @@ -528,14 +528,26 @@ const adapter: PeggedIssuanceAdapter = { thundercore: { minted: async () => ({}), unreleased: async () => ({}), - ethereum: bridgedSupply("thundercore", 18, chainContracts.thundercore.bridgedFromETH), - bsc: bridgedSupply("thundercore", 18, chainContracts.thundercore.bridgedFromBSC), + ethereum: bridgedSupply( + "thundercore", + 18, + chainContracts.thundercore.bridgedFromETH + ), + bsc: bridgedSupply( + "thundercore", + 18, + chainContracts.thundercore.bridgedFromBSC + ), }, osmosis: { minted: async () => ({}), unreleased: async () => ({}), - ethereum: osmosisSupply(chainContracts.osmosis.bridgedFromETH, 18, "Axelar"), - } + ethereum: osmosisSupply( + chainContracts.osmosis.bridgedFromETH, + 18, + "Axelar" + ), + }, }; export default adapter; diff --git a/src/adapters/peggedAssets/bob/index.ts b/src/adapters/peggedAssets/bob/index.ts index 74981312..55641d01 100644 --- a/src/adapters/peggedAssets/bob/index.ts +++ b/src/adapters/peggedAssets/bob/index.ts @@ -92,7 +92,7 @@ async function getChainCollateralUsdValue(chain: string) { ) { let balances = {} as Balances; const uniPools = uniPoolsMapping[chain]; - let tokenBalances = {} as {[token: string]: number}; + let tokenBalances = {} as { [token: string]: number }; await Promise.all( Object.entries(uniPools).map(async ([pool, token]) => { const balance = await returnBalance( @@ -101,7 +101,8 @@ async function getChainCollateralUsdValue(chain: string) { _chainBlocks?.[chain], chain ); - tokenBalances[`${chain}:${token}`] = (tokenBalances[`${chain}:${token}`] ?? 0) + balance; + tokenBalances[`${chain}:${token}`] = + (tokenBalances[`${chain}:${token}`] ?? 0) + balance; }) ); const tokens = Object.keys(tokenBalances); @@ -111,9 +112,9 @@ async function getChainCollateralUsdValue(chain: string) { ) ).data.coins; Object.entries(tokenBalances).map(([token, balance]) => { - const usdValue = balance * (prices[token]?.price ?? 0) + const usdValue = balance * (prices[token]?.price ?? 0); sumSingleBalance(balances, "peggedUSD", usdValue, "issued", false); - }) + }); return balances; }; } diff --git a/src/adapters/peggedAssets/cadc/index.ts b/src/adapters/peggedAssets/cadc/index.ts index 6fa258eb..94e7b317 100644 --- a/src/adapters/peggedAssets/cadc/index.ts +++ b/src/adapters/peggedAssets/cadc/index.ts @@ -84,18 +84,18 @@ async function chainUnreleased(chain: string, decimals: number) { } const adapter: PeggedIssuanceAdapter = { - ethereum: { - minted: chainMinted("ethereum", 18), - unreleased: async () => ({}), - }, - polygon: { - minted: chainMinted("polygon", 18), - unreleased: async () => ({}), - }, - arbitrum: { - minted: chainMinted("arbitrum", 18), - unreleased: async () => ({}), - }, - }; - -export default adapter; \ No newline at end of file + ethereum: { + minted: chainMinted("ethereum", 18), + unreleased: async () => ({}), + }, + polygon: { + minted: chainMinted("polygon", 18), + unreleased: async () => ({}), + }, + arbitrum: { + minted: chainMinted("arbitrum", 18), + unreleased: async () => ({}), + }, +}; + +export default adapter; diff --git a/src/adapters/peggedAssets/celo-dollar/index.ts b/src/adapters/peggedAssets/celo-dollar/index.ts index cba8e3e2..81101cbd 100644 --- a/src/adapters/peggedAssets/celo-dollar/index.ts +++ b/src/adapters/peggedAssets/celo-dollar/index.ts @@ -95,7 +95,7 @@ const adapter: PeggedIssuanceAdapter = { solana: { minted: async () => ({}), unreleased: async () => ({}), - celo: solanaMintedOrBridged(chainContracts.solana.bridgedFromCelo) + celo: solanaMintedOrBridged(chainContracts.solana.bridgedFromCelo), }, klaytn: { minted: async () => ({}), diff --git a/src/adapters/peggedAssets/clever-usd/index.ts b/src/adapters/peggedAssets/clever-usd/index.ts index f24aefac..22efbff1 100644 --- a/src/adapters/peggedAssets/clever-usd/index.ts +++ b/src/adapters/peggedAssets/clever-usd/index.ts @@ -34,7 +34,13 @@ async function chainMinted(chain: string) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** 18, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** 18, + "issued", + false + ); } return balances; }; @@ -47,4 +53,4 @@ const adapter: PeggedIssuanceAdapter = { }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/coin98-dollar/index.ts b/src/adapters/peggedAssets/coin98-dollar/index.ts index 195d1561..72e428b1 100644 --- a/src/adapters/peggedAssets/coin98-dollar/index.ts +++ b/src/adapters/peggedAssets/coin98-dollar/index.ts @@ -2,7 +2,7 @@ const sdk = require("@defillama/sdk"); import { ChainBlocks, PeggedIssuanceAdapter, - Balances + Balances, } from "../peggedAsset.type"; import { sumSingleBalance } from "../helper/generalUtil"; import { solanaMintedOrBridged } from "../helper/getSupply"; @@ -14,15 +14,15 @@ type ChainContracts = { }; const chainContracts: ChainContracts = { - ethereum: { - issued: ["0xC285B7E09A4584D027E5BC36571785B515898246"], - }, - bsc: { - issued: ["0xFa4BA88Cf97e282c505BEa095297786c16070129"], - }, - solana: { - issued: ["CUSDvqAQLbt7fRofcmV2EXfPA2t36kzj7FjzdmqDiNQL"], - } + ethereum: { + issued: ["0xC285B7E09A4584D027E5BC36571785B515898246"], + }, + bsc: { + issued: ["0xFa4BA88Cf97e282c505BEa095297786c16070129"], + }, + solana: { + issued: ["CUSDvqAQLbt7fRofcmV2EXfPA2t36kzj7FjzdmqDiNQL"], + }, }; async function chainMinted(chain: string, decimals: number) { @@ -68,4 +68,4 @@ const adapter: PeggedIssuanceAdapter = { }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/composite/index.ts b/src/adapters/peggedAssets/composite/index.ts index dd5e8119..ae11e25b 100644 --- a/src/adapters/peggedAssets/composite/index.ts +++ b/src/adapters/peggedAssets/composite/index.ts @@ -16,7 +16,9 @@ type ChainContracts = { const chainContracts: ChainContracts = { osmosis: { - bridgedFromComdex: ["ibc/23CA6C8D1AB2145DD13EB1E089A2E3F960DC298B468CCE034E19E5A78B61136E"], + bridgedFromComdex: [ + "ibc/23CA6C8D1AB2145DD13EB1E089A2E3F960DC298B468CCE034E19E5A78B61136E", + ], }, }; @@ -33,7 +35,7 @@ async function compositeMinted(decimals: number) { "https://rest.comdex.one/cosmos/bank/v1beta1/supply/ucmst" ) ); - + const supply = res?.data?.amount?.amount / 10 ** decimals; sumSingleBalance(balances, "peggedUSD", supply, "issued", false); return balances; @@ -48,8 +50,12 @@ const adapter: PeggedIssuanceAdapter = { osmosis: { minted: async () => ({}), unreleased: async () => ({}), - comdex: osmosisSupply(chainContracts.osmosis.bridgedFromComdex, 6, "Comdex"), - } + comdex: osmosisSupply( + chainContracts.osmosis.bridgedFromComdex, + 6, + "Comdex" + ), + }, }; export default adapter; diff --git a/src/adapters/peggedAssets/czusd/index.ts b/src/adapters/peggedAssets/czusd/index.ts index e59e5a04..19257531 100644 --- a/src/adapters/peggedAssets/czusd/index.ts +++ b/src/adapters/peggedAssets/czusd/index.ts @@ -1,26 +1,23 @@ const sdk = require("@defillama/sdk"); -import { - ChainBlocks, - PeggedIssuanceAdapter, -} from "../peggedAsset.type"; +import { ChainBlocks, PeggedIssuanceAdapter } from "../peggedAsset.type"; const chainContracts = { - bsc: { - issued: "0xE68b79e51bf826534Ff37AA9CeE71a3842ee9c70", - }, + bsc: { + issued: "0xE68b79e51bf826534Ff37AA9CeE71a3842ee9c70", + }, }; async function bscMinted() { - return async function ( - _timestamp: number, - _ethBlock: number, - _chainBlocks: ChainBlocks - ) { + return async function ( + _timestamp: number, + _ethBlock: number, + _chainBlocks: ChainBlocks + ) { const totalSupply = ( await sdk.api.abi.call({ abi: "erc20:totalSupply", target: chainContracts.bsc.issued, - block: _chainBlocks?.['bsc'], + block: _chainBlocks?.["bsc"], chain: "bsc", }) ).output; @@ -32,7 +29,7 @@ const adapter: PeggedIssuanceAdapter = { bsc: { minted: bscMinted(), unreleased: async () => ({}), - } + }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/dai/index.ts b/src/adapters/peggedAssets/dai/index.ts index 1ae18f4c..9f75a4e0 100644 --- a/src/adapters/peggedAssets/dai/index.ts +++ b/src/adapters/peggedAssets/dai/index.ts @@ -122,7 +122,7 @@ const chainContracts: ChainContracts = { rsk: { bridgedFromETH: [ "0x6b1a73d547f4009a26b8485b63d7015d248ad406", - // "0x639a647fbe20b6c8ac19e48e2de44ea792c62c5c", //multichain + // "0x639a647fbe20b6c8ac19e48e2de44ea792c62c5c", //multichain ], }, reinetwork: { @@ -210,8 +210,10 @@ const chainContracts: ChainContracts = { ethAssetIds: ["8549b4ad-917c-3461-a646-481adc5d7f7f"], }, osmosis: { - bridgedFromETH: ["ibc/0CD3A0285E1341859B5E86B6AB7682F023D03E97607CCC1DC95706411D866DF7"], // axelar - } + bridgedFromETH: [ + "ibc/0CD3A0285E1341859B5E86B6AB7682F023D03E97607CCC1DC95706411D866DF7", + ], // axelar + }, }; /* @@ -248,17 +250,25 @@ async function chainMinted(chain: string, decimals: number) { ).output; const dsr = ( await sdk.api.abi.call({ - abi: {"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"dai","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}, + abi: { + constant: true, + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "dai", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, target: "0x35d1b3f3d7966a1dfe207aa4514c12a259a0492b", block: _chainBlocks?.[chain], chain: chain, - params: ["0x197E90f9FAD81970bA7976f33CbD77088E5D7cf7"] + params: ["0x197E90f9FAD81970bA7976f33CbD77088E5D7cf7"], }) ).output; sumSingleBalance( balances, "peggedUSD", - (Number(totalSupply) + dsr/1e27) / 10 ** decimals, + (Number(totalSupply) + dsr / 1e27) / 10 ** decimals, "issued", false ); @@ -577,8 +587,11 @@ const adapter: PeggedIssuanceAdapter = { osmosis: { minted: async () => ({}), unreleased: async () => ({}), - ethereum: osmosisSupply(chainContracts.osmosis.bridgedFromETH, 18, "Axelar"), - + ethereum: osmosisSupply( + chainContracts.osmosis.bridgedFromETH, + 18, + "Axelar" + ), }, starknet: { minted: async () => ({}), diff --git a/src/adapters/peggedAssets/dam-finance/index.ts b/src/adapters/peggedAssets/dam-finance/index.ts index 2a7132d3..807e45b0 100644 --- a/src/adapters/peggedAssets/dam-finance/index.ts +++ b/src/adapters/peggedAssets/dam-finance/index.ts @@ -61,4 +61,4 @@ const adapter: PeggedIssuanceAdapter = { }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/davos-protocol/index.ts b/src/adapters/peggedAssets/davos-protocol/index.ts index 9584af9f..1b6df3eb 100644 --- a/src/adapters/peggedAssets/davos-protocol/index.ts +++ b/src/adapters/peggedAssets/davos-protocol/index.ts @@ -22,13 +22,13 @@ const chainContracts: ChainContracts = { issued: ["0xa48F322F8b3edff967629Af79E027628b9Dd1298"], }, arbitrum: { - issued: ["0x8ec1877698acf262fe8ad8a295ad94d6ea258988"], + issued: ["0x8ec1877698acf262fe8ad8a295ad94d6ea258988"], }, optimism: { - issued: ["0xb396b31599333739a97951b74652c117be86ee1d"], + issued: ["0xb396b31599333739a97951b74652c117be86ee1d"], }, bsc: { - issued: ["0x8ec1877698acf262fe8ad8a295ad94d6ea258988"], + issued: ["0x8ec1877698acf262fe8ad8a295ad94d6ea258988"], }, }; @@ -48,14 +48,20 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; } const adapter: PeggedIssuanceAdapter = { - polygon: { + polygon: { minted: chainMinted("polygon", 18), unreleased: async () => ({}), }, @@ -77,4 +83,4 @@ const adapter: PeggedIssuanceAdapter = { }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/defi-franc/index.ts b/src/adapters/peggedAssets/defi-franc/index.ts index 4fdb9160..00b98505 100644 --- a/src/adapters/peggedAssets/defi-franc/index.ts +++ b/src/adapters/peggedAssets/defi-franc/index.ts @@ -1,38 +1,35 @@ const sdk = require("@defillama/sdk"); -import { - ChainBlocks, - PeggedIssuanceAdapter, -} from "../peggedAsset.type"; +import { ChainBlocks, PeggedIssuanceAdapter } from "../peggedAsset.type"; const chainContracts = { - ethereum: { - issued: "0x045da4bFe02B320f4403674B3b7d121737727A36", - }, + ethereum: { + issued: "0x045da4bFe02B320f4403674B3b7d121737727A36", + }, }; async function ethereumMinted() { - return async function ( - _timestamp: number, - _ethBlock: number, - _chainBlocks: ChainBlocks - ) { - const totalSupply = ( - await sdk.api.abi.call({ - abi: "erc20:totalSupply", - target: chainContracts.ethereum.issued, - block: _ethBlock, - chain: "ethereum", - }) - ).output; - return { peggedVAR: totalSupply / 10 ** 18 }; - }; + return async function ( + _timestamp: number, + _ethBlock: number, + _chainBlocks: ChainBlocks + ) { + const totalSupply = ( + await sdk.api.abi.call({ + abi: "erc20:totalSupply", + target: chainContracts.ethereum.issued, + block: _ethBlock, + chain: "ethereum", + }) + ).output; + return { peggedVAR: totalSupply / 10 ** 18 }; + }; } const adapter: PeggedIssuanceAdapter = { - ethereum: { - minted: ethereumMinted(), - unreleased: async () => ({}), - } + ethereum: { + minted: ethereumMinted(), + unreleased: async () => ({}), + }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/dei-token/index.ts b/src/adapters/peggedAssets/dei-token/index.ts index 0983c09e..92085f0f 100644 --- a/src/adapters/peggedAssets/dei-token/index.ts +++ b/src/adapters/peggedAssets/dei-token/index.ts @@ -16,10 +16,10 @@ type ChainContracts = { const chainContracts: ChainContracts = { fantom: { issued: ["0xDE1E704dae0B4051e80DAbB26ab6ad6c12262DA0"], - // reserves: [ + // reserves: [ // "0xbB8B2F05A88108F7e9227b954358110c20e97E26", // anyDEI (maybe need to remove once bridged DEI is added?) // "0xEf6b0872CfDF881Cf9Fe0918D3FA979c616AF983", // multisig - // ], + // ], }, ethereum: { bridgedFromFantom: ["0xDE1E704dae0B4051e80DAbB26ab6ad6c12262DA0"], @@ -138,7 +138,7 @@ const adapter: PeggedIssuanceAdapter = { minted: chainMinted("fantom", 18), unreleased: async () => ({}), }, - // Either the bridged contracts are incorrect, or there are no holders on other chains. + // Either the bridged contracts are incorrect, or there are no holders on other chains. // Will need to be updated. /* ethereum: { diff --git a/src/adapters/peggedAssets/digitaldollar/index.ts b/src/adapters/peggedAssets/digitaldollar/index.ts index 987f9788..026a4c22 100644 --- a/src/adapters/peggedAssets/digitaldollar/index.ts +++ b/src/adapters/peggedAssets/digitaldollar/index.ts @@ -34,7 +34,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; diff --git a/src/adapters/peggedAssets/djed/index.ts b/src/adapters/peggedAssets/djed/index.ts index 4a3d7063..69377e7f 100644 --- a/src/adapters/peggedAssets/djed/index.ts +++ b/src/adapters/peggedAssets/djed/index.ts @@ -1,31 +1,31 @@ import { PeggedIssuanceAdapter, ChainBlocks, - Balances + Balances, } from "../peggedAsset.type"; import { sumSingleBalance } from "../helper/generalUtil"; import { getTotalSupply, getTokenBalance } from "../helper/cardano"; const assetIDs = { cardano: { - issued: ["8db269c3ec630e06ae29f74bc39edd1f87c819f1056206e879a1cd61446a65644d6963726f555344"], + issued: [ + "8db269c3ec630e06ae29f74bc39edd1f87c819f1056206e879a1cd61446a65644d6963726f555344", + ], }, }; async function getCardanoSupply() { let balances = {} as Balances; - let supply = await getTotalSupply(assetIDs.cardano.issued[0]) - const lockedBalance = (await getTokenBalance('8db269c3ec630e06ae29f74bc39edd1f87c819f1056206e879a1cd61446a65644d6963726f555344', 'addr1zxem3j9xw7gyqnry0mfdhku7grrzu0707dc9fs68zwkln5sm5kjdmrpmng059yellupyvwgay2v0lz6663swmds7hp0qul0eqc')) / 1e6 - supply -= lockedBalance - sumSingleBalance( - balances, - "peggedUSD", - supply, - "issued", - false - ); + let supply = await getTotalSupply(assetIDs.cardano.issued[0]); + const lockedBalance = + (await getTokenBalance( + "8db269c3ec630e06ae29f74bc39edd1f87c819f1056206e879a1cd61446a65644d6963726f555344", + "addr1zxem3j9xw7gyqnry0mfdhku7grrzu0707dc9fs68zwkln5sm5kjdmrpmng059yellupyvwgay2v0lz6663swmds7hp0qul0eqc" + )) / 1e6; + supply -= lockedBalance; + sumSingleBalance(balances, "peggedUSD", supply, "issued", false); - return balances + return balances; } const adapter: PeggedIssuanceAdapter = { @@ -35,4 +35,4 @@ const adapter: PeggedIssuanceAdapter = { }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/dola-usd/index.ts b/src/adapters/peggedAssets/dola-usd/index.ts index 55f45b31..19f2610c 100644 --- a/src/adapters/peggedAssets/dola-usd/index.ts +++ b/src/adapters/peggedAssets/dola-usd/index.ts @@ -2,41 +2,41 @@ const sdk = require("@defillama/sdk"); import { ChainBlocks, PeggedIssuanceAdapter, - Balances + Balances, } from "../peggedAsset.type"; import { sumSingleBalance } from "../helper/generalUtil"; const chainContracts = { - ethereum: { - issued: "0x865377367054516e17014CcdED1e7d814EDC9ce4", - }, - fantom: { - bridgedFromETH: "0x3129662808bEC728a27Ab6a6b9AFd3cBacA8A43c", // multichain - }, - optimism: { - bridgedFromETH: "0x8aE125E8653821E851F12A49F7765db9a9ce7384", - }, - bsc: { - bridgedFromETH: "0x2f29bc0ffaf9bff337b31cbe6cb5fb3bf12e5840", + ethereum: { + issued: "0x865377367054516e17014CcdED1e7d814EDC9ce4", + }, + fantom: { + bridgedFromETH: "0x3129662808bEC728a27Ab6a6b9AFd3cBacA8A43c", // multichain + }, + optimism: { + bridgedFromETH: "0x8aE125E8653821E851F12A49F7765db9a9ce7384", + }, + bsc: { + bridgedFromETH: "0x2f29bc0ffaf9bff337b31cbe6cb5fb3bf12e5840", + }, + arbitrum: { + bridgedFromETH: "0x6a7661795c374c0bfc635934efaddff3a7ee23b6", + }, + polygon: { + bridgedFromETH: "0xbc2b48bc930ddc4e5cfb2e87a45c379aab3aac5c", + }, + avax: { + bridgedFromETH: "0x221743dc9e954be4f86844649bf19b43d6f8366d", }, - arbitrum: { - bridgedFromETH: "0x6a7661795c374c0bfc635934efaddff3a7ee23b6", - }, - polygon: { - bridgedFromETH: "0xbc2b48bc930ddc4e5cfb2e87a45c379aab3aac5c", - }, - avax: { - bridgedFromETH: "0x221743dc9e954be4f86844649bf19b43d6f8366d", - } }; async function ethereumMinted() { -return async function ( + return async function ( _timestamp: number, _ethBlock: number, _chainBlocks: ChainBlocks -) { - let balances = {} as Balances; + ) { + let balances = {} as Balances; const totalSupply = ( await sdk.api.abi.call({ abi: "erc20:totalSupply", @@ -56,13 +56,17 @@ return async function ( }; } -async function bridgedFromEthereum(chain: string, decimals: number, address: string) { -return async function ( +async function bridgedFromEthereum( + chain: string, + decimals: number, + address: string +) { + return async function ( _timestamp: number, _ethBlock: number, _chainBlocks: ChainBlocks -) { - let balances = {} as Balances; + ) { + let balances = {} as Balances; const totalSupply = ( await sdk.api.abi.call({ abi: "erc20:totalSupply", @@ -90,12 +94,20 @@ const adapter: PeggedIssuanceAdapter = { fantom: { minted: async () => ({}), unreleased: async () => ({}), - ethereum: bridgedFromEthereum("fantom", 18, chainContracts.fantom.bridgedFromETH), + ethereum: bridgedFromEthereum( + "fantom", + 18, + chainContracts.fantom.bridgedFromETH + ), }, optimism: { minted: async () => ({}), unreleased: async () => ({}), - ethereum: bridgedFromEthereum("optimism", 18, chainContracts.optimism.bridgedFromETH), + ethereum: bridgedFromEthereum( + "optimism", + 18, + chainContracts.optimism.bridgedFromETH + ), }, bsc: { minted: async () => ({}), @@ -105,18 +117,30 @@ const adapter: PeggedIssuanceAdapter = { arbitrum: { minted: async () => ({}), unreleased: async () => ({}), - ethereum: bridgedFromEthereum("arbitrum", 18, chainContracts.arbitrum.bridgedFromETH), + ethereum: bridgedFromEthereum( + "arbitrum", + 18, + chainContracts.arbitrum.bridgedFromETH + ), }, polygon: { minted: async () => ({}), unreleased: async () => ({}), - ethereum: bridgedFromEthereum("polygon", 18, chainContracts.polygon.bridgedFromETH), + ethereum: bridgedFromEthereum( + "polygon", + 18, + chainContracts.polygon.bridgedFromETH + ), }, avalanche: { minted: async () => ({}), unreleased: async () => ({}), - ethereum: bridgedFromEthereum("avax", 18, chainContracts.avax.bridgedFromETH), + ethereum: bridgedFromEthereum( + "avax", + 18, + chainContracts.avax.bridgedFromETH + ), }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/e-money-eur/index.ts b/src/adapters/peggedAssets/e-money-eur/index.ts index 6589fd9c..ebac67a1 100644 --- a/src/adapters/peggedAssets/e-money-eur/index.ts +++ b/src/adapters/peggedAssets/e-money-eur/index.ts @@ -15,11 +15,17 @@ type ChainContracts = { const chainContracts: ChainContracts = { osmosis: { - bridgedFromEmoney: ["ibc/5973C068568365FFF40DEDCF1A1CB7582B6116B731CD31A12231AE25E20B871F"], + bridgedFromEmoney: [ + "ibc/5973C068568365FFF40DEDCF1A1CB7582B6116B731CD31A12231AE25E20B871F", + ], }, -} +}; -export async function osmosisAmount(tokens: string[], decimals: number, bridgedFromChain: string) { +export async function osmosisAmount( + tokens: string[], + decimals: number, + bridgedFromChain: string +) { return async function ( _timestamp: number, _ethBlock: number, @@ -29,8 +35,10 @@ export async function osmosisAmount(tokens: string[], decimals: number, bridgedF for (let token of tokens) { const res = await retry( async (_bail: any) => - await axios.get(`https://lcd.osmosis.zone/osmosis/superfluid/v1beta1/supply?denom=${token}`) - ); + await axios.get( + `https://lcd.osmosis.zone/osmosis/superfluid/v1beta1/supply?denom=${token}` + ) + ); sumSingleBalance( balances, "peggedEUR", @@ -64,7 +72,6 @@ async function emoneyMinted(decimals: number) { }; } - const adapter: PeggedIssuanceAdapter = { emoney: { minted: emoneyMinted(6), @@ -73,8 +80,12 @@ const adapter: PeggedIssuanceAdapter = { osmosis: { minted: async () => ({}), unreleased: async () => ({}), - emoney: osmosisAmount(chainContracts.osmosis.bridgedFromEmoney, 6, "e-Money"), - } + emoney: osmosisAmount( + chainContracts.osmosis.bridgedFromEmoney, + 6, + "e-Money" + ), + }, }; export default adapter; diff --git a/src/adapters/peggedAssets/ethena-usde/index.ts b/src/adapters/peggedAssets/ethena-usde/index.ts index b3d65758..a7db3399 100644 --- a/src/adapters/peggedAssets/ethena-usde/index.ts +++ b/src/adapters/peggedAssets/ethena-usde/index.ts @@ -34,7 +34,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; diff --git a/src/adapters/peggedAssets/ethos-reserve-note/index.ts b/src/adapters/peggedAssets/ethos-reserve-note/index.ts index 2f14cb59..de32abae 100644 --- a/src/adapters/peggedAssets/ethos-reserve-note/index.ts +++ b/src/adapters/peggedAssets/ethos-reserve-note/index.ts @@ -53,4 +53,4 @@ const adapter: PeggedIssuanceAdapter = { }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/euroe-stablecoin/index.ts b/src/adapters/peggedAssets/euroe-stablecoin/index.ts index 84ff84b4..52cdab63 100644 --- a/src/adapters/peggedAssets/euroe-stablecoin/index.ts +++ b/src/adapters/peggedAssets/euroe-stablecoin/index.ts @@ -27,7 +27,7 @@ const chainContracts: ChainContracts = { issued: ["0x820802Fa8a99901F52e39acD21177b0BE6EE2974"], }, solana: { - issued: ["2VhjJ9WxaGC3EZFwJG9BDUs9KxKCAjQY4vgd1qxgYWVg"], + issued: ["2VhjJ9WxaGC3EZFwJG9BDUs9KxKCAjQY4vgd1qxgYWVg"], }, optimism: { issued: ["0x820802Fa8a99901F52e39acD21177b0BE6EE2974"], @@ -89,4 +89,4 @@ const adapter: PeggedIssuanceAdapter = { }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/fei-usd/index.ts b/src/adapters/peggedAssets/fei-usd/index.ts index e2666f03..52ce79ba 100644 --- a/src/adapters/peggedAssets/fei-usd/index.ts +++ b/src/adapters/peggedAssets/fei-usd/index.ts @@ -34,7 +34,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; diff --git a/src/adapters/peggedAssets/first-digital-usd/index.ts b/src/adapters/peggedAssets/first-digital-usd/index.ts index cc880db2..00b155dd 100644 --- a/src/adapters/peggedAssets/first-digital-usd/index.ts +++ b/src/adapters/peggedAssets/first-digital-usd/index.ts @@ -40,7 +40,7 @@ async function chainMinted(chain: string, decimals: number) { sumSingleBalance( balances, "peggedUSD", - totalSupply / 10 ** decimals, + totalSupply / 10 ** decimals, "issued", false ); @@ -57,7 +57,7 @@ const adapter: PeggedIssuanceAdapter = { bsc: { minted: chainMinted("bsc", 18), unreleased: async () => ({}), - }, + }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/flex-usd/index.ts b/src/adapters/peggedAssets/flex-usd/index.ts index bef27b26..b0b18cd7 100644 --- a/src/adapters/peggedAssets/flex-usd/index.ts +++ b/src/adapters/peggedAssets/flex-usd/index.ts @@ -37,7 +37,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; diff --git a/src/adapters/peggedAssets/float-protocol-float/index.ts b/src/adapters/peggedAssets/float-protocol-float/index.ts index bf24ed5b..9cdcc63c 100644 --- a/src/adapters/peggedAssets/float-protocol-float/index.ts +++ b/src/adapters/peggedAssets/float-protocol-float/index.ts @@ -34,7 +34,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedVAR", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedVAR", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; diff --git a/src/adapters/peggedAssets/frax/index.ts b/src/adapters/peggedAssets/frax/index.ts index fcf42882..9fcd5e26 100644 --- a/src/adapters/peggedAssets/frax/index.ts +++ b/src/adapters/peggedAssets/frax/index.ts @@ -75,7 +75,9 @@ const chainContracts: ChainContracts = { bridgedFromETH: ["0xf27Ee99622C3C9b264583dACB2cCE056e194494f"], // multichain }, osmosis: { - bridgedFromETH: ["ibc/0E43EDE2E2A3AFA36D0CD38BDDC0B49FECA64FA426A82E102F304E430ECF46EE"], // axelar + bridgedFromETH: [ + "ibc/0E43EDE2E2A3AFA36D0CD38BDDC0B49FECA64FA426A82E102F304E430ECF46EE", + ], // axelar }, }; @@ -100,7 +102,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; @@ -230,13 +238,21 @@ const adapter: PeggedIssuanceAdapter = { dogechain: { minted: async () => ({}), unreleased: async () => ({}), - ethereum: bridgedSupply("dogechain", 18, chainContracts.dogechain.bridgedFromETH), + ethereum: bridgedSupply( + "dogechain", + 18, + chainContracts.dogechain.bridgedFromETH + ), }, osmosis: { minted: async () => ({}), unreleased: async () => ({}), - ethereum: osmosisSupply(chainContracts.osmosis.bridgedFromETH, 18, "Axelar"), - } + ethereum: osmosisSupply( + chainContracts.osmosis.bridgedFromETH, + 18, + "Axelar" + ), + }, }; export default adapter; diff --git a/src/adapters/peggedAssets/gemini-dollar/index.ts b/src/adapters/peggedAssets/gemini-dollar/index.ts index 04527951..fe52e59e 100644 --- a/src/adapters/peggedAssets/gemini-dollar/index.ts +++ b/src/adapters/peggedAssets/gemini-dollar/index.ts @@ -1,8 +1,6 @@ const sdk = require("@defillama/sdk"); import { sumSingleBalance } from "../helper/generalUtil"; -import { - bridgedSupply, -} from "../helper/getSupply"; +import { bridgedSupply } from "../helper/getSupply"; import { ChainBlocks, PeggedIssuanceAdapter, @@ -44,7 +42,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; @@ -58,11 +62,7 @@ const adapter: PeggedIssuanceAdapter = { wan: { minted: async () => ({}), unreleased: async () => ({}), - ethereum: bridgedSupply( - "wan", - 2, - chainContracts.wan.bridgedFromETH - ), + ethereum: bridgedSupply("wan", 2, chainContracts.wan.bridgedFromETH), }, }; diff --git a/src/adapters/peggedAssets/grai/index.ts b/src/adapters/peggedAssets/grai/index.ts index 4ab79313..23bed56f 100644 --- a/src/adapters/peggedAssets/grai/index.ts +++ b/src/adapters/peggedAssets/grai/index.ts @@ -85,11 +85,7 @@ const adapter: PeggedIssuanceAdapter = { era: { minted: async () => ({}), unreleased: async () => ({}), - ethereum: bridgedSupply( - "era", - 18, - chainContracts.era.bridgedFromETH - ), + ethereum: bridgedSupply("era", 18, chainContracts.era.bridgedFromETH), }, polygon_zkevm: { minted: async () => ({}), diff --git a/src/adapters/peggedAssets/gyen/index.ts b/src/adapters/peggedAssets/gyen/index.ts index 5dec3bed..18256d0a 100644 --- a/src/adapters/peggedAssets/gyen/index.ts +++ b/src/adapters/peggedAssets/gyen/index.ts @@ -3,15 +3,13 @@ const sdk = require("@defillama/sdk"); import { sumSingleBalance } from "../helper/generalUtil"; -import { - bridgedSupply, -} from "../helper/getSupply"; +import { bridgedSupply } from "../helper/getSupply"; import { ChainBlocks, PeggedIssuanceAdapter, Balances, } from "../peggedAsset.type"; -const axios = require("axios") +const axios = require("axios"); const retry = require("async-retry"); type ChainContracts = { @@ -22,10 +20,10 @@ type ChainContracts = { const chainContracts: ChainContracts = { ethereum: { - issued: ["0xC08512927D12348F6620a698105e1BAac6EcD911"] , + issued: ["0xC08512927D12348F6620a698105e1BAac6EcD911"], }, optimism: { - bridgedFromETH: ["0x589d35656641d6aB57A545F08cf473eCD9B6D5F7"] , + bridgedFromETH: ["0x589d35656641d6aB57A545F08cf473eCD9B6D5F7"], }, arbitrum: { bridgedFromETH: ["0x589d35656641d6aB57A545F08cf473eCD9B6D5F7"], @@ -60,30 +58,29 @@ async function chainMinted(chain: string, decimals: number) { }; } async function gmoAPIChainMinted(chain: string) { - return async function ( - _timestamp: number, - _ethBlock: number, - _chainBlocks: ChainBlocks - ) { - let balances = {} as Balances; - const issuance = await retry( - async (_bail: any) => - await axios.get("https://stablecoin.z.com/token/totalSupply") - ); - console.info("GMO API success"); - const gyenData = issuance.data.data.filter( - (obj: any) => obj.symbol === "GYEN" - ); - const filteredChainsData = await gyenData[0].chains.filter( - (obj: any) => obj.chain === chain - ); - const supply = parseInt(filteredChainsData[0].amount); - sumSingleBalance(balances, "peggedJPY", supply, "issued", false); - - return balances; - }; - } + return async function ( + _timestamp: number, + _ethBlock: number, + _chainBlocks: ChainBlocks + ) { + let balances = {} as Balances; + const issuance = await retry( + async (_bail: any) => + await axios.get("https://stablecoin.z.com/token/totalSupply") + ); + console.info("GMO API success"); + const gyenData = issuance.data.data.filter( + (obj: any) => obj.symbol === "GYEN" + ); + const filteredChainsData = await gyenData[0].chains.filter( + (obj: any) => obj.chain === chain + ); + const supply = parseInt(filteredChainsData[0].amount); + sumSingleBalance(balances, "peggedJPY", supply, "issued", false); + return balances; + }; +} const adapter: PeggedIssuanceAdapter = { ethereum: { @@ -100,8 +97,8 @@ const adapter: PeggedIssuanceAdapter = { undefined, undefined, "peggedJPY" - ), - }, + ), + }, arbitrum: { minted: async () => ({}), unreleased: async () => ({}), @@ -117,7 +114,7 @@ const adapter: PeggedIssuanceAdapter = { stellar: { minted: gmoAPIChainMinted("XLM"), unreleased: async () => ({}), - } + }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/hedge-usd/index.ts b/src/adapters/peggedAssets/hedge-usd/index.ts index 4f0562e1..fdf63000 100644 --- a/src/adapters/peggedAssets/hedge-usd/index.ts +++ b/src/adapters/peggedAssets/hedge-usd/index.ts @@ -3,9 +3,11 @@ import { solanaMintedOrBridged } from "../helper/getSupply"; const adapter: PeggedIssuanceAdapter = { solana: { - minted: solanaMintedOrBridged(["9iLH8T7zoWhY7sBmj1WK9ENbWdS1nL8n9wAxaeRitTa6"]), + minted: solanaMintedOrBridged([ + "9iLH8T7zoWhY7sBmj1WK9ENbWdS1nL8n9wAxaeRitTa6", + ]), unreleased: async () => ({}), }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/helio-protocol-hay/index.ts b/src/adapters/peggedAssets/helio-protocol-hay/index.ts index c983e75f..12b8ac1b 100644 --- a/src/adapters/peggedAssets/helio-protocol-hay/index.ts +++ b/src/adapters/peggedAssets/helio-protocol-hay/index.ts @@ -3,22 +3,22 @@ import { sumSingleBalance } from "../helper/generalUtil"; import { ChainBlocks, PeggedIssuanceAdapter, - Balances + Balances, } from "../peggedAsset.type"; const chainContracts = { - bsc: { - issued: "0x0782b6d8c4551B9760e74c0545a9bCD90bdc41E5", - }, + bsc: { + issued: "0x0782b6d8c4551B9760e74c0545a9bCD90bdc41E5", + }, }; async function bscMinted(decimals: number) { -return async function ( + return async function ( _timestamp: number, _bscBlock: number, _chainBlocks: ChainBlocks -) { - let balances = {} as Balances; + ) { + let balances = {} as Balances; const totalSupply = ( await sdk.api.abi.call({ abi: "erc20:totalSupply", @@ -27,7 +27,13 @@ return async function ( chain: "bsc", }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); return balances; }; } @@ -39,4 +45,4 @@ const adapter: PeggedIssuanceAdapter = { }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/helper/cardano.ts b/src/adapters/peggedAssets/helper/cardano.ts index d8491a1b..7f057624 100644 --- a/src/adapters/peggedAssets/helper/cardano.ts +++ b/src/adapters/peggedAssets/helper/cardano.ts @@ -4,11 +4,12 @@ const endpoint = "https://cardano-mainnet.blockfrost.io/api"; const config = { headers: { - "project_id": "mainnet8Ecrf3SQfuuL7XXyotNDGAZoUTcnWQDP" - } -} + project_id: "mainnet8Ecrf3SQfuuL7XXyotNDGAZoUTcnWQDP", + }, +}; -export async function getAsset(assetID: string) { // assetID is concatenation of the policy_id and hex-encoded asset_name +export async function getAsset(assetID: string) { + // assetID is concatenation of the policy_id and hex-encoded asset_name const asset = await retry( async (_bail: any) => await axios.get(`${endpoint}/v0/assets/${assetID}`, config) @@ -24,12 +25,12 @@ export async function getTotalSupply(assetID: string) { return supply / 10 ** decimals; } - async function getAssets(address: string) { - return (await axios.get(`${endpoint}/v0/addresses/${address}`, config)).data.amount + return (await axios.get(`${endpoint}/v0/addresses/${address}`, config)).data + .amount; } export async function getTokenBalance(token: string, owner: string) { - const assets = await getAssets(owner) - return assets.find((i: any) => i.unit === token)?.quantity ?? 0 -} \ No newline at end of file + const assets = await getAssets(owner); + return assets.find((i: any) => i.unit === token)?.quantity ?? 0; +} diff --git a/src/adapters/peggedAssets/helper/getSupply.ts b/src/adapters/peggedAssets/helper/getSupply.ts index 40151d30..971e73c0 100644 --- a/src/adapters/peggedAssets/helper/getSupply.ts +++ b/src/adapters/peggedAssets/helper/getSupply.ts @@ -148,11 +148,14 @@ export async function supplyInEthereumBridge( }; } -export async function solanaMintedOrBridged(targets: string[], pegType?: PeggedAssetType) { +export async function solanaMintedOrBridged( + targets: string[], + pegType?: PeggedAssetType +) { return async function ( _timestamp: number, _ethBlock: number, - _chainBlocks: ChainBlocks, + _chainBlocks: ChainBlocks ) { let balances = {} as Balances; let assetPegType = pegType ? pegType : ("peggedUSD" as PeggedAssetType); @@ -188,7 +191,11 @@ export async function terraSupply(addresses: string[], decimals: number) { }; } -export async function osmosisLiquidity(token: string, bridgeName: string, bridgedFrom: string) { +export async function osmosisLiquidity( + token: string, + bridgeName: string, + bridgedFrom: string +) { return async function ( _timestamp: number, _ethBlock: number, @@ -200,12 +207,24 @@ export async function osmosisLiquidity(token: string, bridgeName: string, bridge await axios.get(`https://api-osmosis.imperator.co/tokens/v2/${token}`) ); const totalLiquidity = res.data[0].liquidity; - sumSingleBalance(balances, "peggedUSD", totalLiquidity, bridgeName, false, bridgedFrom); + sumSingleBalance( + balances, + "peggedUSD", + totalLiquidity, + bridgeName, + false, + bridgedFrom + ); return balances; }; } -export async function cosmosSupply(chain: string, tokens: string[], decimals: number, bridgedFromChain: string) { +export async function cosmosSupply( + chain: string, + tokens: string[], + decimals: number, + bridgedFromChain: string +) { return async function ( _timestamp: number, _ethBlock: number, @@ -215,8 +234,10 @@ export async function cosmosSupply(chain: string, tokens: string[], decimals: nu for (let token of tokens) { const res = await retry( async (_bail: any) => - await axios.get(`https://rest.cosmos.directory/${chain}/cosmos/bank/v1beta1/supply/by_denom?denom=${token}`) - ); + await axios.get( + `https://rest.cosmos.directory/${chain}/cosmos/bank/v1beta1/supply/by_denom?denom=${token}` + ) + ); sumSingleBalance( balances, "peggedUSD", @@ -230,7 +251,11 @@ export async function cosmosSupply(chain: string, tokens: string[], decimals: nu }; } -export async function osmosisSupply(tokens: string[], decimals: number, bridgedFromChain: string) { +export async function osmosisSupply( + tokens: string[], + decimals: number, + bridgedFromChain: string +) { return async function ( _timestamp: number, _ethBlock: number, @@ -240,8 +265,10 @@ export async function osmosisSupply(tokens: string[], decimals: number, bridgedF for (let token of tokens) { const res = await retry( async (_bail: any) => - await axios.get(`https://lcd.osmosis.zone/osmosis/superfluid/v1beta1/supply?denom=${token}`) - ); + await axios.get( + `https://lcd.osmosis.zone/osmosis/superfluid/v1beta1/supply?denom=${token}` + ) + ); sumSingleBalance( balances, "peggedUSD", @@ -255,6 +282,10 @@ export async function osmosisSupply(tokens: string[], decimals: number, bridgedF }; } -export async function kujiraSupply(tokens: string[], decimals: number, bridgedFromChain: string) { +export async function kujiraSupply( + tokens: string[], + decimals: number, + bridgedFromChain: string +) { return cosmosSupply("kujira", tokens, decimals, bridgedFromChain); } diff --git a/src/adapters/peggedAssets/helper/mixin.ts b/src/adapters/peggedAssets/helper/mixin.ts index a230ff46..f8b7fcf2 100644 --- a/src/adapters/peggedAssets/helper/mixin.ts +++ b/src/adapters/peggedAssets/helper/mixin.ts @@ -36,4 +36,4 @@ export const mixinSupply = async ( } return balances; }; -}; \ No newline at end of file +}; diff --git a/src/adapters/peggedAssets/helper/ontology.ts b/src/adapters/peggedAssets/helper/ontology.ts index 829952d7..fd58a555 100644 --- a/src/adapters/peggedAssets/helper/ontology.ts +++ b/src/adapters/peggedAssets/helper/ontology.ts @@ -9,20 +9,24 @@ export async function getTotalSupply(address: string, tokenType: string) { `https://explorer.ont.io/v2/tokens/${tokenType}/${address}` ) ); - console.log("ontology success") + console.log("ontology success"); const bnSupply = new BigNumber(supplyRes?.data?.result?.total_supply); return bnSupply.toNumber(); } -export async function getBalance(address: string, tokenType: string, owner: string) { +export async function getBalance( + address: string, + tokenType: string, + owner: string +) { const balancesRes = await retry( async (_bail: any) => await axios.get( `https://explorer.ont.io/v2/addresses/${owner}/${tokenType}/balances` ) ); - console.log("ontology success") + console.log("ontology success"); const filteredBalances = balancesRes?.data?.result?.filter( (balance: any) => balance.contract_hash === address ); diff --git a/src/adapters/peggedAssets/helper/polynetwork.ts b/src/adapters/peggedAssets/helper/polynetwork.ts index e0fbb337..8d03ba07 100644 --- a/src/adapters/peggedAssets/helper/polynetwork.ts +++ b/src/adapters/peggedAssets/helper/polynetwork.ts @@ -1,7 +1,11 @@ const axios = require("axios"); const retry = require("async-retry"); -export async function getTotalBridged(chainID: number, chainName: string, assetName: string) { +export async function getTotalBridged( + chainID: number, + chainName: string, + assetName: string +) { const res = await retry( async (_bail: any) => await axios.get( diff --git a/src/adapters/peggedAssets/helper/tezos.ts b/src/adapters/peggedAssets/helper/tezos.ts index 9c5a13e0..7fbdc0a0 100644 --- a/src/adapters/peggedAssets/helper/tezos.ts +++ b/src/adapters/peggedAssets/helper/tezos.ts @@ -16,14 +16,22 @@ export async function getTotalSupply(contract: string, decimals?: number) { return supply.div(10 ** d).toNumber(); } -export async function getBalance(address: string, tokenID: string, decimals?: number) { +export async function getBalance( + address: string, + tokenID: string, + decimals?: number +) { const res = await retry( async (_bail: any) => - await axios.get(`https://api.tzkt.io/v1/tokens/balances?account=${address}&token.id=${tokenID}`) + await axios.get( + `https://api.tzkt.io/v1/tokens/balances?account=${address}&token.id=${tokenID}` + ) ); const supply = new BigNumber(res?.data?.[0]?.balance); - const metadataDecimals = new BigNumber(res?.data?.[0]?.token?.metadata?.decimals); + const metadataDecimals = new BigNumber( + res?.data?.[0]?.token?.metadata?.decimals + ); const d = decimals ? decimals : metadataDecimals; diff --git a/src/adapters/peggedAssets/high-yield-usd/index.ts b/src/adapters/peggedAssets/high-yield-usd/index.ts index 6a827fca..b713a03b 100644 --- a/src/adapters/peggedAssets/high-yield-usd/index.ts +++ b/src/adapters/peggedAssets/high-yield-usd/index.ts @@ -40,7 +40,7 @@ async function chainMinted(chain: string, decimals: number) { sumSingleBalance( balances, "peggedUSD", - totalSupply / 10 ** decimals, + totalSupply / 10 ** decimals, "issued", false ); @@ -57,8 +57,7 @@ const adapter: PeggedIssuanceAdapter = { base: { minted: chainMinted("base", 18), unreleased: async () => ({}), - }, + }, }; export default adapter; - diff --git a/src/adapters/peggedAssets/husd/index.ts b/src/adapters/peggedAssets/husd/index.ts index 499b4022..9d41b572 100644 --- a/src/adapters/peggedAssets/husd/index.ts +++ b/src/adapters/peggedAssets/husd/index.ts @@ -33,7 +33,7 @@ const chainContracts: ChainContracts = { bridgedFromETH: [ "7VQo3HFLNH5QqGtM8eC3XQbPkJUu7nS9LeGWjerRh5Sw", // wormhole v2 "BybpSTBoZHsmKnfxYG47GDhVPKrnEKX31CScShbrzUhX", // wormhole v1 - ], + ], }, }; /* @@ -104,8 +104,8 @@ const adapter: PeggedIssuanceAdapter = { solana: { minted: async () => ({}), unreleased: async () => ({}), - ethereum: solanaMintedOrBridged(chainContracts.solana.bridgedFromETH) - } + ethereum: solanaMintedOrBridged(chainContracts.solana.bridgedFromETH), + }, }; export default adapter; diff --git a/src/adapters/peggedAssets/index.ts b/src/adapters/peggedAssets/index.ts index 2e048426..d443c879 100644 --- a/src/adapters/peggedAssets/index.ts +++ b/src/adapters/peggedAssets/index.ts @@ -37,7 +37,7 @@ import ratio from "./ratio-stable-coin"; import usdj from "./just-stablecoin"; import stbl from "./stbl"; import volt from "./volt-protocol"; -import r from './r'; +import r from "./r"; import rai from "./rai"; import float from "./float-protocol-float"; import usdx from "./usdx"; @@ -105,46 +105,46 @@ import eure from "./monerium-eur-money"; import anonusd from "./offshift-anonusd"; import nxusd from "./nxusd"; import davos from "./davos-protocol"; -import defifranc from "./defi-franc" -import czusd from "./czusd" +import defifranc from "./defi-franc"; +import czusd from "./czusd"; import d2o from "./dam-finance"; import eusd from "./eusd"; import crvusd from "./crvusd"; import overnightdai from "./overnight-dai"; import usdtplus from "./usdtplus"; -import silk from './silk'; -import cleverusd from './clever-usd'; -import grai from './grai' -import ethosreservenote from './ethos-reserve-note'; -import gho from './gho'; -import fdusd from './first-digital-usd'; -import pyusd from './paypal-usd'; -import psy from './psy'; -import gyen from './gyen'; -import star from './star'; -import peusd from './peg-eusd'; -import eusdv2 from './eusdv2'; -import prismamkusd from './prisma-mkusd'; -import lcny from './alternity-cny'; -import nexus1 from './nexus'; -import usdy from './ondo-us-dollar-yield'; -import svusd from './savvy-usd'; -import uaht from './uaht' -import usdm from './usdm' -import nars from './nars' -import phase from './phase-dollar' -import inter from './inter-stable-token' -import eeur from './e-money-eur' -import cdt from './membrane' +import silk from "./silk"; +import cleverusd from "./clever-usd"; +import grai from "./grai"; +import ethosreservenote from "./ethos-reserve-note"; +import gho from "./gho"; +import fdusd from "./first-digital-usd"; +import pyusd from "./paypal-usd"; +import psy from "./psy"; +import gyen from "./gyen"; +import star from "./star"; +import peusd from "./peg-eusd"; +import eusdv2 from "./eusdv2"; +import prismamkusd from "./prisma-mkusd"; +import lcny from "./alternity-cny"; +import nexus1 from "./nexus"; +import usdy from "./ondo-us-dollar-yield"; +import svusd from "./savvy-usd"; +import uaht from "./uaht"; +import usdm from "./usdm"; +import nars from "./nars"; +import phase from "./phase-dollar"; +import inter from "./inter-stable-token"; +import eeur from "./e-money-eur"; +import cdt from "./membrane"; import aeeur from "./aryze-eeur"; import aegbp from "./aryze-egbp"; //import aesgd from "./aryze-esgd"; import aeusd from "./aryze-eusd"; -import hydt from './hydt'; -import usdv from './usdv'; -import cadc from './cadc'; -import usde from './ethena-usde' -import aeur from './anchored-coins-eur' +import hydt from "./hydt"; +import usdv from "./usdv"; +import cadc from "./cadc"; +import usde from "./ethena-usde"; +import aeur from "./anchored-coins-eur"; export default { tether, @@ -184,7 +184,7 @@ export default { mimatic, "ratio-stable-coin": ratio, "just-stablecoin": usdj, - "algostable": stbl, + algostable: stbl, "volt-protocol": volt, r, rai, @@ -255,27 +255,27 @@ export default { nxusd, "davos-protocol": davos, "defi-franc": defifranc, - "czusd": czusd, + czusd: czusd, "dam-finance": d2o, "eusd-27a558b0-8b5b-4225-a614-63539da936f4": eusd, crvusd, "overnight-dai": overnightdai, - "usdtplus": usdtplus, + usdtplus: usdtplus, "silk-bcec1136-561c-4706-a42c-8b67d0d7f7d2": silk, - "clever-usd":cleverusd, + "clever-usd": cleverusd, grai, "ethos-reserve-note": ethosreservenote, gho, "first-digital-usd": fdusd, - 'paypal-usd': pyusd, + "paypal-usd": pyusd, psy, gyen, - "preon-star":star, - "peusd": peusd, + "preon-star": star, + peusd: peusd, "eusd-v2": eusdv2, "prisma-mkusd": prismamkusd, "alternity-cny": lcny, - "nexus1": nexus1, + nexus1: nexus1, "ondo-us-dollar-yield": usdy, "savvy-usd": svusd, uaht, @@ -284,14 +284,14 @@ export default { "phase-dollar": phase, "inter-stable-token": inter, "e-money-eur": eeur, - "membrane": cdt, + membrane: cdt, "aryze-eusd": aeusd, "aryze-eeur": aeeur, - "aryze-egbp": aegbp, //if does not work, will test without aegbp, using only coingecko but since its the terminal not sure, will keep an eye + "aryze-egbp": aegbp, //if does not work, will test without aegbp, using only coingecko but since its the terminal not sure, will keep an eye //"aryze-esgd": aesgd, "hydt-protocol-hydt": hydt, "verified-usd-foundation-usdv": usdv, - "cad-coin":cadc, + "cad-coin": cadc, "ethena-usde": usde, - "anchored-coins-eur": aeur + "anchored-coins-eur": aeur, }; diff --git a/src/adapters/peggedAssets/inter-stable-token/index.ts b/src/adapters/peggedAssets/inter-stable-token/index.ts index 8b46e158..96f398d8 100644 --- a/src/adapters/peggedAssets/inter-stable-token/index.ts +++ b/src/adapters/peggedAssets/inter-stable-token/index.ts @@ -16,9 +16,11 @@ type ChainContracts = { const chainContracts: ChainContracts = { osmosis: { - bridgedFromAgoric: ["ibc/92BE0717F4678905E53F4E45B2DED18BC0CB97BF1F8B6A25AFEDF3D5A879B4D5"], + bridgedFromAgoric: [ + "ibc/92BE0717F4678905E53F4E45B2DED18BC0CB97BF1F8B6A25AFEDF3D5A879B4D5", + ], }, -} +}; async function agoricMinted(decimals: number) { return async function ( @@ -48,8 +50,12 @@ const adapter: PeggedIssuanceAdapter = { osmosis: { minted: async () => ({}), unreleased: async () => ({}), - agoric: osmosisSupply(chainContracts.osmosis.bridgedFromAgoric, 6, "Agoric"), - } + agoric: osmosisSupply( + chainContracts.osmosis.bridgedFromAgoric, + 6, + "Agoric" + ), + }, }; export default adapter; diff --git a/src/adapters/peggedAssets/iron-bank-euro/index.ts b/src/adapters/peggedAssets/iron-bank-euro/index.ts index 7948cc58..a612cebb 100644 --- a/src/adapters/peggedAssets/iron-bank-euro/index.ts +++ b/src/adapters/peggedAssets/iron-bank-euro/index.ts @@ -72,7 +72,11 @@ async function chainUnreleased(chain: string, decimals: number, owner: string) { const adapter: PeggedIssuanceAdapter = { ethereum: { minted: chainMinted("ethereum", 18), - unreleased: chainUnreleased("ethereum", 18, chainContracts.ethereum.reserves[0]), + unreleased: chainUnreleased( + "ethereum", + 18, + chainContracts.ethereum.reserves[0] + ), }, }; diff --git a/src/adapters/peggedAssets/iusd/index.ts b/src/adapters/peggedAssets/iusd/index.ts index 7994677a..429df617 100644 --- a/src/adapters/peggedAssets/iusd/index.ts +++ b/src/adapters/peggedAssets/iusd/index.ts @@ -1,14 +1,16 @@ import { PeggedIssuanceAdapter, ChainBlocks, - Balances + Balances, } from "../peggedAsset.type"; import { sumSingleBalance } from "../helper/generalUtil"; import { getTotalSupply } from "../helper/cardano"; const assetIDs = { cardano: { - issued: ["f66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b6988069555344"], + issued: [ + "f66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b6988069555344", + ], }, }; @@ -19,16 +21,10 @@ async function getCardanoSupply() { _chainBlocks: ChainBlocks ) { let balances = {} as Balances; - const supply = await getTotalSupply(assetIDs.cardano.issued[0]) - sumSingleBalance( - balances, - "peggedUSD", - supply, - "issued", - false - ); - return balances - } + const supply = await getTotalSupply(assetIDs.cardano.issued[0]); + sumSingleBalance(balances, "peggedUSD", supply, "issued", false); + return balances; + }; } const adapter: PeggedIssuanceAdapter = { diff --git a/src/adapters/peggedAssets/liquity-usd/index.ts b/src/adapters/peggedAssets/liquity-usd/index.ts index 17648d80..a1e26344 100644 --- a/src/adapters/peggedAssets/liquity-usd/index.ts +++ b/src/adapters/peggedAssets/liquity-usd/index.ts @@ -113,7 +113,11 @@ const adapter: PeggedIssuanceAdapter = { arbitrum: { minted: async () => ({}), unreleased: async () => ({}), - ethereum: bridgedSupply("arbitrum", 18, chainContracts.arbitrum.bridgedFromETH), + ethereum: bridgedSupply( + "arbitrum", + 18, + chainContracts.arbitrum.bridgedFromETH + ), }, /* polygon_zkevm: { diff --git a/src/adapters/peggedAssets/monerium-eur-money/index.ts b/src/adapters/peggedAssets/monerium-eur-money/index.ts index 9245c991..7cde1292 100644 --- a/src/adapters/peggedAssets/monerium-eur-money/index.ts +++ b/src/adapters/peggedAssets/monerium-eur-money/index.ts @@ -23,7 +23,7 @@ const chainContracts: ChainContracts = { }, xdai: { issued: ["0xcB444e90D8198415266c6a2724b7900fb12FC56E"], - } + }, }; async function chainMinted(chain: string, decimals: number) { @@ -55,34 +55,32 @@ async function chainMinted(chain: string, decimals: number) { } async function algorandMinted() { - return async function ( - _timestamp: number, - _ethBlock: number, - _chainBlocks: ChainBlocks - ) { - let balances = {} as Balances; - const supplyRes = await retry( - async (_bail: any) => - await axios.get( - "https://mainnet-idx.algonode.cloud/v2/assets/83209012" - ) - ); - const supply = supplyRes.data.asset.params.total; - const reserveRes = await retry( - async (_bail: any) => - await axios.get( - "https://mainnet-idx.algonode.cloud/v2/accounts/XSAED32VYAQK42TQHKCRHYK7P6LBBPQ2237PALQZAGL2XJTNNOPD523CNA" - ) - ); - const reserveAccount = reserveRes.data.account.assets.filter( - (asset: any) => asset["asset-id"] === 83209012 - ); - const reserves = reserveAccount[0].amount; - const balance = (supply - reserves) / 10 ** 8; - sumSingleBalance(balances, "peggedEUR", balance, "issued", false); - return balances; - }; - } + return async function ( + _timestamp: number, + _ethBlock: number, + _chainBlocks: ChainBlocks + ) { + let balances = {} as Balances; + const supplyRes = await retry( + async (_bail: any) => + await axios.get("https://mainnet-idx.algonode.cloud/v2/assets/83209012") + ); + const supply = supplyRes.data.asset.params.total; + const reserveRes = await retry( + async (_bail: any) => + await axios.get( + "https://mainnet-idx.algonode.cloud/v2/accounts/XSAED32VYAQK42TQHKCRHYK7P6LBBPQ2237PALQZAGL2XJTNNOPD523CNA" + ) + ); + const reserveAccount = reserveRes.data.account.assets.filter( + (asset: any) => asset["asset-id"] === 83209012 + ); + const reserves = reserveAccount[0].amount; + const balance = (supply - reserves) / 10 ** 8; + sumSingleBalance(balances, "peggedEUR", balance, "issued", false); + return balances; + }; +} const adapter: PeggedIssuanceAdapter = { ethereum: { diff --git a/src/adapters/peggedAssets/nars/index.ts b/src/adapters/peggedAssets/nars/index.ts index f8f8fa86..03e9fa18 100644 --- a/src/adapters/peggedAssets/nars/index.ts +++ b/src/adapters/peggedAssets/nars/index.ts @@ -16,9 +16,7 @@ type ChainContracts = { const chainContracts: ChainContracts = { polygon: { issued: "0x65517425ac3ce259a34400bb67ceb39ff3ddc0bd", - unreleased: [ - "0x8388A0f91875e74Dc4705Abf2C9bBDD1bD40C585" - ], + unreleased: ["0x8388A0f91875e74Dc4705Abf2C9bBDD1bD40C585"], }, }; @@ -78,10 +76,10 @@ async function chainUnreleased(chain: string, decimals: number) { } const adapter: PeggedIssuanceAdapter = { - polygon: { - minted: chainMinted("polygon", 18), - unreleased: chainUnreleased("polygon", 18), - }, - }; - -export default adapter; \ No newline at end of file + polygon: { + minted: chainMinted("polygon", 18), + unreleased: chainUnreleased("polygon", 18), + }, +}; + +export default adapter; diff --git a/src/adapters/peggedAssets/nexus-usd/index.ts b/src/adapters/peggedAssets/nexus-usd/index.ts index f37be5e9..084ae20b 100644 --- a/src/adapters/peggedAssets/nexus-usd/index.ts +++ b/src/adapters/peggedAssets/nexus-usd/index.ts @@ -52,7 +52,7 @@ const chainContracts: ChainContracts = { }, aurora: { bridgedFromETH: ["0x07379565cD8B0CaE7c60Dc78e7f601b34AF2A21c"], - } + }, }; async function chainMinted(chain: string, decimals: number) { diff --git a/src/adapters/peggedAssets/nexus/index.ts b/src/adapters/peggedAssets/nexus/index.ts index 4e4a1c00..2604c84c 100644 --- a/src/adapters/peggedAssets/nexus/index.ts +++ b/src/adapters/peggedAssets/nexus/index.ts @@ -3,16 +3,15 @@ import { sumSingleBalance } from "../helper/generalUtil"; import { ChainBlocks, PeggedIssuanceAdapter, - Balances + Balances, } from "../peggedAsset.type"; - -async function minted(chain:string,address: string) { -return async function ( +async function minted(chain: string, address: string) { + return async function ( _timestamp: number, _ethBlock: number, _chainBlocks: ChainBlocks -) { + ) { let balances = {} as Balances; const totalSupply = ( await sdk.api.abi.call({ @@ -23,27 +22,25 @@ return async function ( }) ).output; sumSingleBalance( - balances, - "peggedUSD", - totalSupply / 10 ** 6, - "issued", - false + balances, + "peggedUSD", + totalSupply / 10 ** 6, + "issued", + false ); return balances; }; } - - const adapter: PeggedIssuanceAdapter = { ethereum: { - minted: minted('ethereum','0x92211b6B68a39F4f68E722f3A3A4810A2Ebc8383'), + minted: minted("ethereum", "0x92211b6B68a39F4f68E722f3A3A4810A2Ebc8383"), unreleased: async () => ({}), }, arbitrum: { - minted: minted('arbitrum','0x773fAf6B9424abFc199cc28A5320C3C2d151E3bF'), - unreleased: async () => ({}) + minted: minted("arbitrum", "0x773fAf6B9424abFc199cc28A5320C3C2d151E3bF"), + unreleased: async () => ({}), }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/note/index.ts b/src/adapters/peggedAssets/note/index.ts index a1fa90bb..719e531c 100644 --- a/src/adapters/peggedAssets/note/index.ts +++ b/src/adapters/peggedAssets/note/index.ts @@ -37,7 +37,7 @@ async function cantoCirculating(chain: string, decimals: number) { sumSingleBalance( balances, "peggedUSD", - (totalSupply) / 10 ** decimals, + totalSupply / 10 ** decimals, "issued", false ); diff --git a/src/adapters/peggedAssets/nxusd/index.ts b/src/adapters/peggedAssets/nxusd/index.ts index 56ce879d..2f3605fa 100644 --- a/src/adapters/peggedAssets/nxusd/index.ts +++ b/src/adapters/peggedAssets/nxusd/index.ts @@ -16,12 +16,12 @@ type ChainContracts = { const chainContracts: ChainContracts = { avax: { issued: ["0xf14f4ce569cb3679e99d5059909e23b07bd2f387"], - unreleased: ["0x0b1f9c2211f77ec3fa2719671c5646cf6e59b775"] + unreleased: ["0x0b1f9c2211f77ec3fa2719671c5646cf6e59b775"], }, polygon: { issued: ["0xf955a6694C6F5629f5Ecd514094B3bd450b59000"], - unreleased: ["0x7195d3A344106b877F8D5f62CA570Fd25D43D180"] - } + unreleased: ["0x7195d3A344106b877F8D5f62CA570Fd25D43D180"], + }, }; async function chainMinted(chain: string, decimals: number) { @@ -40,51 +40,53 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; } async function chainUnreleased(chain: string, decimals: number, owner: string) { - return async function ( - _timestamp: number, - _ethBlock: number, - _chainBlocks: ChainBlocks - ) { - let balances = {} as Balances; - for (let issued of chainContracts[chain].issued) { - const reserve = ( - await sdk.api.erc20.balanceOf({ - target: issued, - owner: owner, - block: _chainBlocks?.[chain], - chain: chain, - }) - ).output; - sumSingleBalance(balances, "peggedUSD", reserve / 10 ** decimals); - } - return balances; - }; - } + return async function ( + _timestamp: number, + _ethBlock: number, + _chainBlocks: ChainBlocks + ) { + let balances = {} as Balances; + for (let issued of chainContracts[chain].issued) { + const reserve = ( + await sdk.api.erc20.balanceOf({ + target: issued, + owner: owner, + block: _chainBlocks?.[chain], + chain: chain, + }) + ).output; + sumSingleBalance(balances, "peggedUSD", reserve / 10 ** decimals); + } + return balances; + }; +} const adapter: PeggedIssuanceAdapter = { avalanche: { minted: chainMinted("avax", 18), - unreleased: chainUnreleased( - "avax", - 18, - chainContracts.avax.unreleased[0] - ), + unreleased: chainUnreleased("avax", 18, chainContracts.avax.unreleased[0]), }, polygon: { minted: chainMinted("polygon", 18), unreleased: chainUnreleased( - "polygon", - 18, - chainContracts.polygon.unreleased[0] - ), - } + "polygon", + 18, + chainContracts.polygon.unreleased[0] + ), + }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/offshift-anonusd/index.ts b/src/adapters/peggedAssets/offshift-anonusd/index.ts index 1dcb997a..cfde7509 100644 --- a/src/adapters/peggedAssets/offshift-anonusd/index.ts +++ b/src/adapters/peggedAssets/offshift-anonusd/index.ts @@ -16,7 +16,7 @@ type ChainContracts = { const chainContracts: ChainContracts = { ethereum: { issued: ["0x5a7E6C8204A1359DB9AAcab7bA5Fc309B7981eFd"], - } + }, }; async function chainMinted(chain: string, decimals: number) { @@ -35,17 +35,23 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; } const adapter: PeggedIssuanceAdapter = { - ethereum: { + ethereum: { minted: chainMinted("ethereum", 18), unreleased: async () => ({}), - } + }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/ondo-us-dollar-yield/index.ts b/src/adapters/peggedAssets/ondo-us-dollar-yield/index.ts index 61f1bf82..f26b5042 100644 --- a/src/adapters/peggedAssets/ondo-us-dollar-yield/index.ts +++ b/src/adapters/peggedAssets/ondo-us-dollar-yield/index.ts @@ -7,7 +7,6 @@ import { Balances, } from "../peggedAsset.type"; - type ChainContracts = { [chain: string]: { issued: string; @@ -18,15 +17,15 @@ type ChainContracts = { const chainContracts: ChainContracts = { ethereum: { issued: "0x96F6eF951840721AdBF46Ac996b59E0235CB985C", - unreleased: [] + unreleased: [], }, polygon: { issued: "0x96F6eF951840721AdBF46Ac996b59E0235CB985C", - unreleased: [] + unreleased: [], }, mantle: { issued: "0x5bE26527e817998A7206475496fDE1E68957c5A6", - unreleased: ["0x94FEC56BBEcEaCC71c9e61623ACE9F8e1B1cf473"] + unreleased: ["0x94FEC56BBEcEaCC71c9e61623ACE9F8e1B1cf473"], }, }; @@ -85,7 +84,6 @@ async function chainUnreleased(chain: string, decimals: number) { }; } - const adapter: PeggedIssuanceAdapter = { ethereum: { minted: chainMinted("ethereum", 18), @@ -101,4 +99,4 @@ const adapter: PeggedIssuanceAdapter = { }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/origin-dollar/index.ts b/src/adapters/peggedAssets/origin-dollar/index.ts index 255c4e5c..3eadd2e3 100644 --- a/src/adapters/peggedAssets/origin-dollar/index.ts +++ b/src/adapters/peggedAssets/origin-dollar/index.ts @@ -15,7 +15,7 @@ type ChainContracts = { const chainContracts: ChainContracts = { ethereum: { issued: ["0x2a8e1e676ec238d8a992307b495b45b3feaa5e86"], - } + }, }; async function chainMinted(chain: string, decimals: number) { @@ -34,7 +34,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; diff --git a/src/adapters/peggedAssets/overnight-dai/index.ts b/src/adapters/peggedAssets/overnight-dai/index.ts index fdc7eef4..b837d063 100644 --- a/src/adapters/peggedAssets/overnight-dai/index.ts +++ b/src/adapters/peggedAssets/overnight-dai/index.ts @@ -20,32 +20,32 @@ const chainContracts: ChainContracts = { issued: ["0x970D50d09F3a656b43E11B0D45241a84e3a6e011"], }, base: { - issued: ["0x65a2508C429a6078a7BC2f7dF81aB575BD9D9275"] - } + issued: ["0x65a2508C429a6078a7BC2f7dF81aB575BD9D9275"], + }, }; async function chainMinted(chain: string, decimals: number) { return async function ( - _timestamp: number, - _ethBlock: number, - _chainBlocks: ChainBlocks + _timestamp: number, + _ethBlock: number, + _chainBlocks: ChainBlocks ) { let balances = {} as Balances; for (let issued of chainContracts[chain].issued) { const totalSupply = ( - await sdk.api.abi.call({ - abi: "erc20:totalSupply", - target: issued, - block: _chainBlocks?.[chain], - chain: chain, - }) + await sdk.api.abi.call({ + abi: "erc20:totalSupply", + target: issued, + block: _chainBlocks?.[chain], + chain: chain, + }) ).output; sumSingleBalance( - balances, - "peggedUSD", - totalSupply / 10 ** decimals, - "issued", - false + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false ); } return balances; diff --git a/src/adapters/peggedAssets/pando-usd/index.ts b/src/adapters/peggedAssets/pando-usd/index.ts index 6cb72f12..f3f8ec7f 100644 --- a/src/adapters/peggedAssets/pando-usd/index.ts +++ b/src/adapters/peggedAssets/pando-usd/index.ts @@ -17,11 +17,9 @@ async function pusdMinted() { let balances = {} as Balances; const res = await retry( async (_bail: any) => - await axios.get( - "https://leaf-api.pando.im/api/cats" - ) + await axios.get("https://leaf-api.pando.im/api/cats") ); - const ret = res.data + const ret = res.data; let sum = 0.0; for (let ix = 0; ix < ret.data.collaterals.length; ix++) { const collateral = ret.data.collaterals[ix]; diff --git a/src/adapters/peggedAssets/paxos-standard/index.ts b/src/adapters/peggedAssets/paxos-standard/index.ts index c8d80c95..50780431 100644 --- a/src/adapters/peggedAssets/paxos-standard/index.ts +++ b/src/adapters/peggedAssets/paxos-standard/index.ts @@ -38,7 +38,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; diff --git a/src/adapters/peggedAssets/paypal-usd/index.ts b/src/adapters/peggedAssets/paypal-usd/index.ts index a89d3560..e7697184 100644 --- a/src/adapters/peggedAssets/paypal-usd/index.ts +++ b/src/adapters/peggedAssets/paypal-usd/index.ts @@ -17,7 +17,7 @@ const chainContracts: ChainContracts = { ethereum: { issued: "0x6c3ea9036406852006290770BEdFcAbA0e23A0e8", unreleased: [ - "0x264bd8291fAE1D75DB2c5F573b07faA6715997B5", // + "0x264bd8291fAE1D75DB2c5F573b07faA6715997B5", // "0xE25a329d385f77df5D4eD56265babe2b99A5436e", // paxosTreasury ], }, @@ -79,10 +79,10 @@ async function chainUnreleased(chain: string, decimals: number) { } const adapter: PeggedIssuanceAdapter = { - ethereum: { - minted: chainMinted("ethereum", 6), - unreleased: chainUnreleased("ethereum", 6), - }, - }; - -export default adapter; \ No newline at end of file + ethereum: { + minted: chainMinted("ethereum", 6), + unreleased: chainUnreleased("ethereum", 6), + }, +}; + +export default adapter; diff --git a/src/adapters/peggedAssets/peg-eusd/index.ts b/src/adapters/peggedAssets/peg-eusd/index.ts index a7d34d4b..13c13fed 100644 --- a/src/adapters/peggedAssets/peg-eusd/index.ts +++ b/src/adapters/peggedAssets/peg-eusd/index.ts @@ -61,4 +61,4 @@ const adapter: PeggedIssuanceAdapter = { }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/peggedAsset.type.ts b/src/adapters/peggedAssets/peggedAsset.type.ts index fa161994..10e2f5dc 100644 --- a/src/adapters/peggedAssets/peggedAsset.type.ts +++ b/src/adapters/peggedAssets/peggedAsset.type.ts @@ -14,7 +14,7 @@ export type PeggedAssetType = | "peggedUAH" | "peggedARS" | "peggedGBP" - | "peggedCAD" + | "peggedCAD"; type StringNumber = string; type PeggedBalances = { diff --git a/src/adapters/peggedAssets/platypus-usd/index.ts b/src/adapters/peggedAssets/platypus-usd/index.ts index 64fb7e67..adf278e4 100644 --- a/src/adapters/peggedAssets/platypus-usd/index.ts +++ b/src/adapters/peggedAssets/platypus-usd/index.ts @@ -16,7 +16,7 @@ type ChainContracts = { const chainContracts: ChainContracts = { avax: { issued: ["0xdaCDe03d7Ab4D81fEDdc3a20fAA89aBAc9072CE2"], - } + }, }; async function chainMinted(chain: string, decimals: number) { @@ -35,7 +35,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; @@ -45,7 +51,7 @@ const adapter: PeggedIssuanceAdapter = { avalanche: { minted: chainMinted("avax", 18), unreleased: async () => ({}), - } + }, }; export default adapter; diff --git a/src/adapters/peggedAssets/prisma-mkusd/index.ts b/src/adapters/peggedAssets/prisma-mkusd/index.ts index 530709e9..487d4627 100644 --- a/src/adapters/peggedAssets/prisma-mkusd/index.ts +++ b/src/adapters/peggedAssets/prisma-mkusd/index.ts @@ -53,4 +53,4 @@ const adapter: PeggedIssuanceAdapter = { }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/psy/index.ts b/src/adapters/peggedAssets/psy/index.ts index 7795dc4f..70d36b21 100644 --- a/src/adapters/peggedAssets/psy/index.ts +++ b/src/adapters/peggedAssets/psy/index.ts @@ -3,22 +3,22 @@ import { sumSingleBalance } from "../helper/generalUtil"; import { ChainBlocks, PeggedIssuanceAdapter, - Balances + Balances, } from "../peggedAsset.type"; const chainContracts = { - arbitrum: { - issued: "0x63d4dc5376cfb48a885a165cd97ba208b87881c7", - }, + arbitrum: { + issued: "0x63d4dc5376cfb48a885a165cd97ba208b87881c7", + }, }; async function arbitrumMinted(decimals: number) { -return async function ( + return async function ( _timestamp: number, _bscBlock: number, _chainBlocks: ChainBlocks -) { - let balances = {} as Balances; + ) { + let balances = {} as Balances; const totalSupply = ( await sdk.api.abi.call({ abi: "erc20:totalSupply", @@ -27,7 +27,13 @@ return async function ( chain: "arbitrum", }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); return balances; }; } @@ -39,4 +45,4 @@ const adapter: PeggedIssuanceAdapter = { }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/pusd-2/index.ts b/src/adapters/peggedAssets/pusd-2/index.ts index 0d9f2e39..d02f2caf 100644 --- a/src/adapters/peggedAssets/pusd-2/index.ts +++ b/src/adapters/peggedAssets/pusd-2/index.ts @@ -16,7 +16,7 @@ type ChainContracts = { const chainContracts: ChainContracts = { ethereum: { issued: ["0x466a756e9a7401b5e2444a3fcb3c2c12fbea0a54"], - unreleased: ["0x51c2cef9efa48e08557a361b52db34061c025a1b"] + unreleased: ["0x51c2cef9efa48e08557a361b52db34061c025a1b"], }, }; @@ -73,7 +73,11 @@ async function chainUnreleased(chain: string, decimals: number, owner: string) { const adapter: PeggedIssuanceAdapter = { ethereum: { minted: chainMinted("ethereum", 18), - unreleased: chainUnreleased("ethereum", 18, chainContracts.ethereum.unreleased[0]) + unreleased: chainUnreleased( + "ethereum", + 18, + chainContracts.ethereum.unreleased[0] + ), }, }; diff --git a/src/adapters/peggedAssets/ratio-stable-coin/index.ts b/src/adapters/peggedAssets/ratio-stable-coin/index.ts index b2b216ee..6c0848d1 100644 --- a/src/adapters/peggedAssets/ratio-stable-coin/index.ts +++ b/src/adapters/peggedAssets/ratio-stable-coin/index.ts @@ -1,9 +1,7 @@ const sdk = require("@defillama/sdk"); -import { - PeggedIssuanceAdapter, -} from "../peggedAsset.type"; +import { PeggedIssuanceAdapter } from "../peggedAsset.type"; import { endpoint } from "../llama-helper/solana"; -const { Connection, PublicKey } = require('@solana/web3.js') +const { Connection, PublicKey } = require("@solana/web3.js"); const { Program, Provider, web3, utils } = require("@project-serum/anchor"); const { NodeWallet } = require("@project-serum/anchor/dist/cjs/provider"); const BigNumber = require("bignumber.js"); @@ -17,19 +15,18 @@ const getProvider = async () => { const dummy_keypair = web3.Keypair.generate(); const wallet = new NodeWallet(dummy_keypair); const network = `${endpoint}/`; - const connection = new Connection(network, 'processed'); + const connection = new Connection(network, "processed"); const confirmOptions = { commitment: "processed", preflightCommitment: "processed", }; - const provider = new Provider( - connection, wallet, confirmOptions - ); + const provider = new Provider(connection, wallet, confirmOptions); return provider; -} +}; -const encodeSeedString = (seedString: string) => Buffer.from(utils.bytes.utf8.encode(seedString)); +const encodeSeedString = (seedString: string) => + Buffer.from(utils.bytes.utf8.encode(seedString)); const constructProgram = async (provider: any) => { return new Program(IDL, programId, provider); @@ -45,15 +42,19 @@ const findGlobalStatePDA = async (globalStateSeed: string) => { }; async function totalDebt() { - return async function() { + return async function () { const provider = await getProvider(); const program = await constructProgram(provider); const globalStateKey = await findGlobalStatePDA("GLOBAL_STATE_SEED"); - - const globalStateAccInfo = await program.account.globalState.fetch(globalStateKey); - const mintedUsd = new BigNumber(globalStateAccInfo.totalDebt.toString()).div(1e6).toString(10); - return { peggedUSD: parseFloat(mintedUsd) } - } + + const globalStateAccInfo = await program.account.globalState.fetch( + globalStateKey + ); + const mintedUsd = new BigNumber(globalStateAccInfo.totalDebt.toString()) + .div(1e6) + .toString(10); + return { peggedUSD: parseFloat(mintedUsd) }; + }; } const adapter: PeggedIssuanceAdapter = { diff --git a/src/adapters/peggedAssets/real-usd/index.ts b/src/adapters/peggedAssets/real-usd/index.ts index 901764fc..09ed6c6d 100644 --- a/src/adapters/peggedAssets/real-usd/index.ts +++ b/src/adapters/peggedAssets/real-usd/index.ts @@ -34,7 +34,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; diff --git a/src/adapters/peggedAssets/redeemable/index.ts b/src/adapters/peggedAssets/redeemable/index.ts index 81172a4f..986c1669 100644 --- a/src/adapters/peggedAssets/redeemable/index.ts +++ b/src/adapters/peggedAssets/redeemable/index.ts @@ -1,14 +1,16 @@ import { PeggedIssuanceAdapter, ChainBlocks, - Balances + Balances, } from "../peggedAsset.type"; import { sumSingleBalance } from "../helper/generalUtil"; import { getTotalSupply } from "../helper/cardano"; const assetIDs = { cardano: { - issued: ["cd5b9dd91319edbb19477ad00cbef673a221e70a17ef043951fc678652656465656d61626c65"], + issued: [ + "cd5b9dd91319edbb19477ad00cbef673a221e70a17ef043951fc678652656465656d61626c65", + ], }, }; @@ -19,16 +21,10 @@ async function getCardanoSupply() { _chainBlocks: ChainBlocks ) { let balances = {} as Balances; - const supply = await getTotalSupply(assetIDs.cardano.issued[0]) - sumSingleBalance( - balances, - "peggedUSD", - supply, - "issued", - false - ); - return balances - } + const supply = await getTotalSupply(assetIDs.cardano.issued[0]); + sumSingleBalance(balances, "peggedUSD", supply, "issued", false); + return balances; + }; } const adapter: PeggedIssuanceAdapter = { diff --git a/src/adapters/peggedAssets/reserve/index.ts b/src/adapters/peggedAssets/reserve/index.ts index b4f819ba..3d515df7 100644 --- a/src/adapters/peggedAssets/reserve/index.ts +++ b/src/adapters/peggedAssets/reserve/index.ts @@ -1,8 +1,6 @@ const sdk = require("@defillama/sdk"); import { sumSingleBalance } from "../helper/generalUtil"; -import { - bridgedSupply, -} from "../helper/getSupply"; +import { bridgedSupply } from "../helper/getSupply"; import { ChainBlocks, PeggedIssuanceAdapter, @@ -40,7 +38,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; @@ -54,11 +58,7 @@ const adapter: PeggedIssuanceAdapter = { xdai: { minted: async () => ({}), unreleased: async () => ({}), - ethereum: bridgedSupply( - "xdai", - 18, - chainContracts.xdai.bridgedFromETH - ), + ethereum: bridgedSupply("xdai", 18, chainContracts.xdai.bridgedFromETH), }, }; diff --git a/src/adapters/peggedAssets/savvy-usd/index.ts b/src/adapters/peggedAssets/savvy-usd/index.ts index 1f16e24c..50c2e654 100644 --- a/src/adapters/peggedAssets/savvy-usd/index.ts +++ b/src/adapters/peggedAssets/savvy-usd/index.ts @@ -53,4 +53,4 @@ const adapter: PeggedIssuanceAdapter = { }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/sdai/index.ts b/src/adapters/peggedAssets/sdai/index.ts index 4510c856..c4651e32 100644 --- a/src/adapters/peggedAssets/sdai/index.ts +++ b/src/adapters/peggedAssets/sdai/index.ts @@ -1,8 +1,6 @@ const sdk = require("@defillama/sdk"); import { sumSingleBalance } from "../helper/generalUtil"; -import { - bridgedSupply, -} from "../helper/getSupply"; +import { bridgedSupply } from "../helper/getSupply"; import { ChainBlocks, PeggedIssuanceAdapter, @@ -37,17 +35,23 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; } const adapter: PeggedIssuanceAdapter = { - xdai: { + xdai: { minted: chainMinted("xdai", 18), unreleased: async () => ({}), }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/seur/index.ts b/src/adapters/peggedAssets/seur/index.ts index a9a2ca14..bce5c3e3 100644 --- a/src/adapters/peggedAssets/seur/index.ts +++ b/src/adapters/peggedAssets/seur/index.ts @@ -37,7 +37,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedEUR", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedEUR", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; diff --git a/src/adapters/peggedAssets/sperax-usd/index.ts b/src/adapters/peggedAssets/sperax-usd/index.ts index 953951a2..dd86bb32 100644 --- a/src/adapters/peggedAssets/sperax-usd/index.ts +++ b/src/adapters/peggedAssets/sperax-usd/index.ts @@ -34,7 +34,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; diff --git a/src/adapters/peggedAssets/stabl-fi/index.ts b/src/adapters/peggedAssets/stabl-fi/index.ts index 57e3830c..be67b2dc 100644 --- a/src/adapters/peggedAssets/stabl-fi/index.ts +++ b/src/adapters/peggedAssets/stabl-fi/index.ts @@ -16,8 +16,8 @@ const chainContracts: ChainContracts = { polygon: { issued: [ "0x80487b4f8f70e793a81a42367c225ee0b94315df", - "0x5D066D022EDE10eFa2717eD3D79f22F949F8C175" - ], + "0x5D066D022EDE10eFa2717eD3D79f22F949F8C175", + ], }, }; @@ -37,7 +37,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; @@ -50,4 +56,4 @@ const adapter: PeggedIssuanceAdapter = { }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/stasis-eurs/index.ts b/src/adapters/peggedAssets/stasis-eurs/index.ts index 2c1d3fac..6789382b 100644 --- a/src/adapters/peggedAssets/stasis-eurs/index.ts +++ b/src/adapters/peggedAssets/stasis-eurs/index.ts @@ -3,7 +3,7 @@ import { sumSingleBalance } from "../helper/generalUtil"; import { bridgedSupply, bridgedSupplySubtractReserve, - supplyInEthereumBridge + supplyInEthereumBridge, } from "../helper/getSupply"; import { ChainBlocks, @@ -33,7 +33,7 @@ const chainContracts: ChainContracts = { }, everscale: { bridgeOnETH: ["0x6b9f9cadb11690b2df23c3cfce383a6706f9a5e6"], // octus(?) - } + }, }; async function chainMinted(chain: string, decimals: number) { diff --git a/src/adapters/peggedAssets/stbl/index.ts b/src/adapters/peggedAssets/stbl/index.ts index 7bef43dd..01d1673c 100644 --- a/src/adapters/peggedAssets/stbl/index.ts +++ b/src/adapters/peggedAssets/stbl/index.ts @@ -104,13 +104,7 @@ async function supply() { const balance = collateralSTBL + (supply - reserves) / 10 ** 6; - sumSingleBalance( - balances, - "peggedUSD", - balance, - "issued", - false - ); + sumSingleBalance(balances, "peggedUSD", balance, "issued", false); return balances; }; } diff --git a/src/adapters/peggedAssets/tbill/index.ts b/src/adapters/peggedAssets/tbill/index.ts index 26f97bbf..077ddff6 100644 --- a/src/adapters/peggedAssets/tbill/index.ts +++ b/src/adapters/peggedAssets/tbill/index.ts @@ -53,4 +53,4 @@ const adapter: PeggedIssuanceAdapter = { }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/terrausd/index.ts b/src/adapters/peggedAssets/terrausd/index.ts index 37e85b8a..0c9fedd6 100644 --- a/src/adapters/peggedAssets/terrausd/index.ts +++ b/src/adapters/peggedAssets/terrausd/index.ts @@ -89,7 +89,9 @@ const chainContracts: ChainContracts = { bridgedFromTerra: ["0x360d6dd540e3448371876662fbe7f1acaf08c5ab"], // synapse }, osmosis: { - bridgedFromTerra: ["ibc/BE1BB42D4BE3C30D50B68D7C41DB4DFCE9678E8EF8C539F6E6A9345048894FCC"], + bridgedFromTerra: [ + "ibc/BE1BB42D4BE3C30D50B68D7C41DB4DFCE9678E8EF8C539F6E6A9345048894FCC", + ], }, }; @@ -110,9 +112,11 @@ async function terraMinted() { let balances = {} as Balances; const res = await retry( async (_bail: any) => - await axios.get("https://terra-classic-fcd.publicnode.com/v1/totalsupply/uusd") + await axios.get( + "https://terra-classic-fcd.publicnode.com/v1/totalsupply/uusd" + ) ); - const totalSupply = res.data / 10**6; + const totalSupply = res.data / 10 ** 6; sumSingleBalance(balances, "peggedUSD", totalSupply, "issued", false); return balances; }; @@ -152,7 +156,7 @@ const adapter: PeggedIssuanceAdapter = { ], "peggedUSD" ), - },/* + } /* harmony: { minted: async () => ({}), unreleased: async () => ({}), @@ -161,7 +165,7 @@ const adapter: PeggedIssuanceAdapter = { 18, chainContracts.harmony.bridgedFromTerra ), - },*/ + },*/, polygon: { minted: async () => ({}), unreleased: async () => ({}), diff --git a/src/adapters/peggedAssets/test.ts b/src/adapters/peggedAssets/test.ts index 2d34bdb0..da4779f6 100644 --- a/src/adapters/peggedAssets/test.ts +++ b/src/adapters/peggedAssets/test.ts @@ -41,13 +41,19 @@ async function getPeggedAsset( bridgedFromMapping: BridgeMapping = {} ) { peggedBalances[chain] = peggedBalances[chain] || {}; - const interval = setTimeout(()=>console.log(`Issuance function for chain ${chain} exceeded the timeout limit`), 60e3) + const interval = setTimeout( + () => + console.log( + `Issuance function for chain ${chain} exceeded the timeout limit` + ), + 60e3 + ); const balance = (await issuanceFunction( unixTimestamp, ethBlock, chainBlocks )) as PeggedTokenBalance; - clearTimeout(interval) + clearTimeout(interval); if (balance && Object.keys(balance).length === 0) { peggedBalances[chain][issuanceType] = { [pegType]: 0 }; return; diff --git a/src/adapters/peggedAssets/tether-eurt/index.ts b/src/adapters/peggedAssets/tether-eurt/index.ts index e2fcbdb3..67bb799c 100644 --- a/src/adapters/peggedAssets/tether-eurt/index.ts +++ b/src/adapters/peggedAssets/tether-eurt/index.ts @@ -1,8 +1,6 @@ const sdk = require("@defillama/sdk"); import { sumSingleBalance } from "../helper/generalUtil"; -import { - bridgedSupply, -} from "../helper/getSupply"; +import { bridgedSupply } from "../helper/getSupply"; import { ChainBlocks, PeggedIssuanceAdapter, diff --git a/src/adapters/peggedAssets/tether/index.ts b/src/adapters/peggedAssets/tether/index.ts index 09f0af77..ae00dfe6 100644 --- a/src/adapters/peggedAssets/tether/index.ts +++ b/src/adapters/peggedAssets/tether/index.ts @@ -5,7 +5,7 @@ import { supplyInEthereumBridge, solanaMintedOrBridged, terraSupply, - osmosisSupply + osmosisSupply, } from "../helper/getSupply"; import { getTokenBalance as solanaGetTokenBalance } from "../helper/solana"; import { @@ -337,16 +337,20 @@ const chainContracts: ChainContracts = { thundercore: { bridgeFromETH: [ "0x0dcb0cb0120d355cde1ce56040be57add0185baa", // multichain - "0x4f3C8E20942461e2c3Bdd8311AC57B0c222f2b82" + "0x4f3C8E20942461e2c3Bdd8311AC57B0c222f2b82", ], }, osmosis: { - bridgedFromETH: ["ibc/8242AD24008032E457D2E12D46588FD39FB54FB29680C6C7663D296B383C37C4"], // axelar - bridgedFromKava: ["ibc/4ABBEF4C8926DDDB320AE5188CFD63267ABBCEFC0583E4AE05D6E5AA2401DDAB"], + bridgedFromETH: [ + "ibc/8242AD24008032E457D2E12D46588FD39FB54FB29680C6C7663D296B383C37C4", + ], // axelar + bridgedFromKava: [ + "ibc/4ABBEF4C8926DDDB320AE5188CFD63267ABBCEFC0583E4AE05D6E5AA2401DDAB", + ], }, waves: { bridgeOnETH: ["0x0de7b091A21BD439bdB2DfbB63146D9cEa21Ea83"], // PepeTeam Bridge - } + }, }; /* @@ -525,9 +529,7 @@ async function algorandMinted() { let balances = {} as Balances; const supplyRes = await retry( async (_bail: any) => - await axios.get( - "https://mainnet-idx.algonode.cloud/v2/assets/312769" - ) + await axios.get("https://mainnet-idx.algonode.cloud/v2/assets/312769") ); console.info("algorand 1 success USDT"); const supply = supplyRes.data.asset.params.total; @@ -730,7 +732,7 @@ async function nearBridged(address: string, decimals: number) { ) { let balances = {} as Balances; const supply = await nearCall(address, "ft_total_supply"); - console.info("Near success USDT") + console.info("Near success USDT"); sumSingleBalance( balances, "peggedUSD", @@ -775,7 +777,7 @@ async function kavaBridged() { let balances = {} as Balances; for (const contract of chainContracts.kava.bridgedFromETH) { const totalSupply = await kavaGetTotalSupply(contract); - console.info("Kava success USDT") + console.info("Kava success USDT"); sumSingleBalance(balances, "peggedUSD", totalSupply, contract, true); } return balances; @@ -812,7 +814,7 @@ async function aptosBridged() { contractStargate, typeStargate ); - console.info("Aptos success USDT") + console.info("Aptos success USDT"); sumSingleBalance( balances, "peggedUSD", @@ -1201,11 +1203,7 @@ const adapter: PeggedIssuanceAdapter = { }, kava: { minted: kavaMinted(), - unreleased: chainUnreleased( - "kava", - 6, - chainContracts.kava.unreleased[0] - ), + unreleased: chainUnreleased("kava", 6, chainContracts.kava.unreleased[0]), ethereum: kavaBridged(), }, /* @@ -1322,7 +1320,11 @@ const adapter: PeggedIssuanceAdapter = { thundercore: { minted: async () => ({}), unreleased: async () => ({}), - ethereum: bridgedSupply("thundercore", 6, chainContracts.thundercore.bridgeFromETH), + ethereum: bridgedSupply( + "thundercore", + 6, + chainContracts.thundercore.bridgeFromETH + ), }, osmosis: { minted: async () => ({}), @@ -1338,7 +1340,7 @@ const adapter: PeggedIssuanceAdapter = { chainContracts.waves.bridgeOnETH[0], 6 ), - } + }, }; export default adapter; diff --git a/src/adapters/peggedAssets/token-dforce-usd/index.ts b/src/adapters/peggedAssets/token-dforce-usd/index.ts index 3e759a33..b3ee4ff4 100644 --- a/src/adapters/peggedAssets/token-dforce-usd/index.ts +++ b/src/adapters/peggedAssets/token-dforce-usd/index.ts @@ -30,7 +30,7 @@ const chainContracts: ChainContracts = { issued: ["0xCf66EB3D546F0415b368d98A95EAF56DeD7aA752"], unreleased: [ "0x88DCDC47D2f83a99CF0000FDF667A468bB958a78", // cbridge - //"0xc171EBE1A2873F042F1dDdd9327D00527CA29882", // iUSX + //"0xc171EBE1A2873F042F1dDdd9327D00527CA29882", // iUSX ], }, bsc: { diff --git a/src/adapters/peggedAssets/tor/index.ts b/src/adapters/peggedAssets/tor/index.ts index 2b4f6d42..af362d63 100644 --- a/src/adapters/peggedAssets/tor/index.ts +++ b/src/adapters/peggedAssets/tor/index.ts @@ -1,8 +1,6 @@ const sdk = require("@defillama/sdk"); import { sumSingleBalance } from "../helper/generalUtil"; -import { - bridgedSupply, -} from "../helper/getSupply"; +import { bridgedSupply } from "../helper/getSupply"; import { ChainBlocks, PeggedIssuanceAdapter, @@ -39,7 +37,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; diff --git a/src/adapters/peggedAssets/uaht/index.ts b/src/adapters/peggedAssets/uaht/index.ts index d1febb1a..b61bd58a 100644 --- a/src/adapters/peggedAssets/uaht/index.ts +++ b/src/adapters/peggedAssets/uaht/index.ts @@ -34,7 +34,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUAH", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUAH", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; @@ -47,4 +53,4 @@ const adapter: PeggedIssuanceAdapter = { }, }; -export default adapter; \ No newline at end of file +export default adapter; diff --git a/src/adapters/peggedAssets/usd-balance/index.ts b/src/adapters/peggedAssets/usd-balance/index.ts index 994a2bfd..ae68fca1 100644 --- a/src/adapters/peggedAssets/usd-balance/index.ts +++ b/src/adapters/peggedAssets/usd-balance/index.ts @@ -18,7 +18,7 @@ const chainContracts: ChainContracts = { unreleased: [ "0xa3b52d5a6d2f8932a5cd921e09da840092349d71", // DAO treasury "0x34f93b12ca2e13c6e64f45cfa36eabadd0ba30fc", // DAO multisig - ], + ], }, }; diff --git a/src/adapters/peggedAssets/usd-coin/index.ts b/src/adapters/peggedAssets/usd-coin/index.ts index 7f26c897..c1f6a716 100644 --- a/src/adapters/peggedAssets/usd-coin/index.ts +++ b/src/adapters/peggedAssets/usd-coin/index.ts @@ -172,7 +172,7 @@ const chainContracts: ChainContracts = { fuse: { bridgedFromETH: [ "0x620fd5fa44be6af63715ef4e65ddfa0387ad13f5", - "0x28C3d1cD466Ba22f6cae51b1a4692a831696391A" + "0x28C3d1cD466Ba22f6cae51b1a4692a831696391A", ], }, meter: { @@ -298,8 +298,12 @@ const chainContracts: ChainContracts = { bridgedFromETH: ["0x52A9CEA01c4CBDd669883e41758B8eB8e8E2B34b"], // wan }, near: { - bridgedFromETH: ["a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.factory.bridge.near",], // rainbow bridge - issued: ["17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1"], + bridgedFromETH: [ + "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.factory.bridge.near", + ], // rainbow bridge + issued: [ + "17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1", + ], }, defichain: { bridgeOnETH: ["0x94fa70d079d76279e1815ce403e9b985bccc82ac"], // seems there is no direct bridge from ETH. but users can withdraw to defichain using cake defi? @@ -328,7 +332,7 @@ const chainContracts: ChainContracts = { aptos: { bridgedFromETH: [ "0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa", // stargate - "0x5e156f1207d0ebfa19a9eeff00d62a282278fb8719f4fab3a586a0a2c0fffbea" // wormhole + "0x5e156f1207d0ebfa19a9eeff00d62a282278fb8719f4fab3a586a0a2c0fffbea", // wormhole ], }, mixin: { @@ -339,26 +343,32 @@ const chainContracts: ChainContracts = { thundercore: { bridgedFromETH: [ "0xdc42728b0ea910349ed3c6e1c9dc06b5fb591f98", // multichain - "0x22e89898A04eaf43379BeB70bf4E38b1faf8A31e" + "0x22e89898A04eaf43379BeB70bf4E38b1faf8A31e", ], }, base: { bridgedFromETH: ["0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA"], // }, kujira: { - bridgedFromETH: ["ibc/295548A78785A1007F232DE286149A6FF512F180AF5657780FC89C009E2C348F"], - bridgedFromNoble: ["ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9"], + bridgedFromETH: [ + "ibc/295548A78785A1007F232DE286149A6FF512F180AF5657780FC89C009E2C348F", + ], + bridgedFromNoble: [ + "ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9", + ], }, osmosis: { bridgedFromETH: [ "ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858", // axelar "ibc/9F9B07EF9AD291167CF5700628145DE1DEB777C2CFC7907553B24446515F6D0E", // gravity ], - bridgedFromNoble: ["ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4"], + bridgedFromNoble: [ + "ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4", + ], }, waves: { bridgeOnETH: ["0x0de7b091A21BD439bdB2DfbB63146D9cEa21Ea83"], // PepeTeam Bridge - } + }, }; /* @@ -461,9 +471,7 @@ async function algorandMinted() { let balances = {} as Balances; const supplyRes = await retry( async (_bail: any) => - await axios.get( - "https://mainnet-idx.algonode.cloud/v2/assets/31566704" - ) + await axios.get("https://mainnet-idx.algonode.cloud/v2/assets/31566704") ); console.info("algorand 1 success USDC"); const supply = supplyRes?.data?.asset?.params?.total; @@ -543,7 +551,6 @@ async function circleAPIChainMinted(chain: string) { }; } - async function reinetworkBridged(address: string, decimals: number) { return async function ( _timestamp: number, @@ -669,7 +676,6 @@ async function nearMint(address: string, decimals: number) { }; } - async function elrondBridged(tokenID: string, decimals: number) { return async function ( _timestamp: number, @@ -719,16 +725,36 @@ async function aptosBridged() { _chainBlocks: ChainBlocks ) { let balances = {} as Balances; - const contractStargate = "0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa"; + const contractStargate = + "0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa"; const typeStargate = "0x1::coin::CoinInfo<0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDC>"; - const totalSupplyStargate = await aptosGetTotalSupply(contractStargate, typeStargate); - sumSingleBalance(balances, "peggedUSD", totalSupplyStargate, contractStargate, true); - const contractPortal = "0x5e156f1207d0ebfa19a9eeff00d62a282278fb8719f4fab3a586a0a2c0fffbea"; + const totalSupplyStargate = await aptosGetTotalSupply( + contractStargate, + typeStargate + ); + sumSingleBalance( + balances, + "peggedUSD", + totalSupplyStargate, + contractStargate, + true + ); + const contractPortal = + "0x5e156f1207d0ebfa19a9eeff00d62a282278fb8719f4fab3a586a0a2c0fffbea"; const typePortal = "0x1::coin::CoinInfo<0x5e156f1207d0ebfa19a9eeff00d62a282278fb8719f4fab3a586a0a2c0fffbea::coin::T>"; - const totalSupplyPortal = await aptosGetTotalSupply(contractPortal, typePortal); - sumSingleBalance(balances, "peggedUSD", totalSupplyPortal, contractPortal, true); + const totalSupplyPortal = await aptosGetTotalSupply( + contractPortal, + typePortal + ); + sumSingleBalance( + balances, + "peggedUSD", + totalSupplyPortal, + contractPortal, + true + ); return balances; }; } @@ -818,11 +844,7 @@ const adapter: PeggedIssuanceAdapter = { era: { minted: async () => ({}), unreleased: async () => ({}), - ethereum: bridgedSupply( - "era", - 6, - chainContracts.era.bridgedFromETH - ), + ethereum: bridgedSupply("era", 6, chainContracts.era.bridgedFromETH), }, polygon_zkevm: { minted: async () => ({}), @@ -1079,12 +1101,12 @@ const adapter: PeggedIssuanceAdapter = { minted: async () => ({}), unreleased: async () => ({}), ethereum: karuraMinted(chainContracts.karura.bridgedFromETH[0], 6), - },/* + } /* ontology: { minted: async () => ({}), unreleased: async () => ({}), ethereum: ontologyBridged(), - },*/ + },*/, sx: { minted: async () => ({}), unreleased: async () => ({}), @@ -1189,7 +1211,11 @@ const adapter: PeggedIssuanceAdapter = { thundercore: { minted: async () => ({}), unreleased: async () => ({}), - ethereum: bridgedSupply("thundercore", 6, chainContracts.thundercore.bridgedFromETH), + ethereum: bridgedSupply( + "thundercore", + 6, + chainContracts.thundercore.bridgedFromETH + ), }, base: { minted: async () => ({}), @@ -1210,7 +1236,7 @@ const adapter: PeggedIssuanceAdapter = { chainContracts.waves.bridgeOnETH[0], 6 ), - } + }, }; export default adapter; diff --git a/src/adapters/peggedAssets/usd/index.ts b/src/adapters/peggedAssets/usd/index.ts index 122adbc0..22323420 100644 --- a/src/adapters/peggedAssets/usd/index.ts +++ b/src/adapters/peggedAssets/usd/index.ts @@ -41,26 +41,26 @@ const chainContracts: ChainContracts = { async function chainMinted(chain: string, decimals: number) { return async function ( - _timestamp: number, - _ethBlock: number, - _chainBlocks: ChainBlocks + _timestamp: number, + _ethBlock: number, + _chainBlocks: ChainBlocks ) { let balances = {} as Balances; for (let issued of chainContracts[chain].issued) { const totalSupply = ( - await sdk.api.abi.call({ - abi: "erc20:totalSupply", - target: issued, - block: _chainBlocks?.[chain], - chain: chain, - }) + await sdk.api.abi.call({ + abi: "erc20:totalSupply", + target: issued, + block: _chainBlocks?.[chain], + chain: chain, + }) ).output; sumSingleBalance( - balances, - "peggedUSD", - totalSupply / 10 ** decimals, - "issued", - false + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false ); } return balances; diff --git a/src/adapters/peggedAssets/usd2/index.ts b/src/adapters/peggedAssets/usd2/index.ts index 29b939b0..f3c93280 100644 --- a/src/adapters/peggedAssets/usd2/index.ts +++ b/src/adapters/peggedAssets/usd2/index.ts @@ -1,40 +1,40 @@ -const Pact = require("pact-lang-api"); -const creationTime = () => Math.round(new Date().getTime() / 1000) - 10; -import { sumSingleBalance } from "../helper/generalUtil"; -import { PeggedIssuanceAdapter, Balances } from "../peggedAsset.type"; - -let net = `https://api.chainweb.com/chainweb/0.0/mainnet01/chain/1/pact`; - -async function supplyMinted() { - return async function () { - let balances = {} as Balances; - - let usd2supply: any; - let totalSupply: any; - - let data = await Pact.fetch.local( - { - pactCode: `(lago.USD2-wrapper.return-supply "lago.USD2") `, - meta: Pact.lang.mkMeta("", "1", 0.01, 100000000, 28800, creationTime()), - }, - net - ); - if (data.result.status === "success") { - usd2supply = parseFloat(data.result.data); - } - - totalSupply = usd2supply; - - sumSingleBalance(balances, "peggedUSD", totalSupply, "issued", false); - return balances; - }; -} - -const adapter: PeggedIssuanceAdapter = { - kadena: { - minted: supplyMinted(), - unreleased: async () => ({}), - }, -}; - -export default adapter; +const Pact = require("pact-lang-api"); +const creationTime = () => Math.round(new Date().getTime() / 1000) - 10; +import { sumSingleBalance } from "../helper/generalUtil"; +import { PeggedIssuanceAdapter, Balances } from "../peggedAsset.type"; + +let net = `https://api.chainweb.com/chainweb/0.0/mainnet01/chain/1/pact`; + +async function supplyMinted() { + return async function () { + let balances = {} as Balances; + + let usd2supply: any; + let totalSupply: any; + + let data = await Pact.fetch.local( + { + pactCode: `(lago.USD2-wrapper.return-supply "lago.USD2") `, + meta: Pact.lang.mkMeta("", "1", 0.01, 100000000, 28800, creationTime()), + }, + net + ); + if (data.result.status === "success") { + usd2supply = parseFloat(data.result.data); + } + + totalSupply = usd2supply; + + sumSingleBalance(balances, "peggedUSD", totalSupply, "issued", false); + return balances; + }; +} + +const adapter: PeggedIssuanceAdapter = { + kadena: { + minted: supplyMinted(), + unreleased: async () => ({}), + }, +}; + +export default adapter; diff --git a/src/adapters/peggedAssets/usdh/index.ts b/src/adapters/peggedAssets/usdh/index.ts index 14912341..01b6d7d7 100644 --- a/src/adapters/peggedAssets/usdh/index.ts +++ b/src/adapters/peggedAssets/usdh/index.ts @@ -1,7 +1,5 @@ const sdk = require("@defillama/sdk"); -import { - PeggedIssuanceAdapter, -} from "../peggedAsset.type"; +import { PeggedIssuanceAdapter } from "../peggedAsset.type"; import { solanaMintedOrBridged } from "../helper/getSupply"; const chainContracts = { diff --git a/src/adapters/peggedAssets/usdk/index.ts b/src/adapters/peggedAssets/usdk/index.ts index c3aad836..c53edcf7 100644 --- a/src/adapters/peggedAssets/usdk/index.ts +++ b/src/adapters/peggedAssets/usdk/index.ts @@ -1,8 +1,6 @@ const sdk = require("@defillama/sdk"); import { sumSingleBalance } from "../helper/generalUtil"; -import { - bridgedSupply, solanaMintedOrBridged, -} from "../helper/getSupply"; +import { bridgedSupply, solanaMintedOrBridged } from "../helper/getSupply"; import { ChainBlocks, PeggedIssuanceAdapter, @@ -46,7 +44,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; diff --git a/src/adapters/peggedAssets/usdlemma/index.ts b/src/adapters/peggedAssets/usdlemma/index.ts index d198eb3b..5881ffe0 100644 --- a/src/adapters/peggedAssets/usdlemma/index.ts +++ b/src/adapters/peggedAssets/usdlemma/index.ts @@ -18,7 +18,7 @@ const chainContracts: ChainContracts = { }, optimism: { issued: ["0x96F2539d3684dbde8B3242A51A73B66360a5B541"], - } + }, }; async function chainMinted(chain: string, decimals: number) { diff --git a/src/adapters/peggedAssets/usdm/index.ts b/src/adapters/peggedAssets/usdm/index.ts index 878881bf..8ddcb873 100644 --- a/src/adapters/peggedAssets/usdm/index.ts +++ b/src/adapters/peggedAssets/usdm/index.ts @@ -76,10 +76,10 @@ async function chainUnreleased(chain: string, decimals: number) { } const adapter: PeggedIssuanceAdapter = { - ethereum: { - minted: chainMinted("ethereum", 18), - unreleased: async () => ({}), - }, - }; - -export default adapter; \ No newline at end of file + ethereum: { + minted: chainMinted("ethereum", 18), + unreleased: async () => ({}), + }, +}; + +export default adapter; diff --git a/src/adapters/peggedAssets/usdtplus/index.ts b/src/adapters/peggedAssets/usdtplus/index.ts index 3e76444f..f90dcb88 100644 --- a/src/adapters/peggedAssets/usdtplus/index.ts +++ b/src/adapters/peggedAssets/usdtplus/index.ts @@ -23,26 +23,26 @@ const chainContracts: ChainContracts = { async function chainMinted(chain: string, decimals: number) { return async function ( - _timestamp: number, - _ethBlock: number, - _chainBlocks: ChainBlocks + _timestamp: number, + _ethBlock: number, + _chainBlocks: ChainBlocks ) { let balances = {} as Balances; for (let issued of chainContracts[chain].issued) { const totalSupply = ( - await sdk.api.abi.call({ - abi: "erc20:totalSupply", - target: issued, - block: _chainBlocks?.[chain], - chain: chain, - }) + await sdk.api.abi.call({ + abi: "erc20:totalSupply", + target: issued, + block: _chainBlocks?.[chain], + chain: chain, + }) ).output; sumSingleBalance( - balances, - "peggedUSD", - totalSupply / 10 ** decimals, - "issued", - false + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false ); } return balances; diff --git a/src/adapters/peggedAssets/usdv/index.ts b/src/adapters/peggedAssets/usdv/index.ts index 6c56228a..39e82b52 100644 --- a/src/adapters/peggedAssets/usdv/index.ts +++ b/src/adapters/peggedAssets/usdv/index.ts @@ -1,95 +1,93 @@ -const sdk = require("@defillama/sdk"); -import { sumSingleBalance } from "../helper/generalUtil"; -import { bridgedSupply } from "../helper/getSupply"; -import { - ChainBlocks, - PeggedIssuanceAdapter, - Balances, -} from "../peggedAsset.type"; - -type ChainContracts = { - [chain: string]: { - [contract: string]: string[]; - }; -}; - -const chainContracts: ChainContracts = { - ethereum: { - issued: ["0x0E573Ce2736Dd9637A0b21058352e1667925C7a8"], - }, - bsc: { - bridgedFromETH: ["0x323665443CEf804A3b5206103304BD4872EA4253"], - }, - optimism: { - bridgedFromETH: ["0x323665443CEf804A3b5206103304BD4872EA4253"], - }, - arbitrum: { - bridgedFromETH: ["0x323665443CEf804A3b5206103304BD4872EA4253"], - }, - avax: { - bridgedFromETH: ["0x323665443CEf804A3b5206103304BD4872EA4253"], - }, -}; - -async function chainMinted(chain: string, decimals: number) { - return async function ( - _timestamp: number, - _ethBlock: number, - _chainBlocks: ChainBlocks - ) { - let balances = {} as Balances; - for (let issued of chainContracts[chain].issued) { - const totalSupply = ( - await sdk.api.abi.call({ - abi: "erc20:totalSupply", - target: issued, - block: _chainBlocks?.[chain], - chain: chain, - }) - ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); - } - return balances; - }; -} - -const adapter: PeggedIssuanceAdapter = { - ethereum: { - minted: chainMinted("ethereum", 6), - unreleased: async () => ({}), - }, - bsc: { - minted: bridgedSupply( - "bsc", - 6, - chainContracts.bsc.bridgedFromETH - ), - unreleased: async () => ({}), - }, - optimism: { - minted: bridgedSupply( - "optimism", - 6, - chainContracts.optimism.bridgedFromETH - ), - unreleased: async () => ({}), - }, - arbitrum: { - minted: bridgedSupply( - "arbitrum", - 6, - chainContracts.arbitrum.bridgedFromETH - ), - unreleased: async () => ({}), - }, - avax: { - minted: bridgedSupply( - "avax", - 6, - chainContracts.avax.bridgedFromETH - ), - unreleased: async () => ({}), - }, -}; - -export default adapter; +const sdk = require("@defillama/sdk"); +import { sumSingleBalance } from "../helper/generalUtil"; +import { bridgedSupply } from "../helper/getSupply"; +import { + ChainBlocks, + PeggedIssuanceAdapter, + Balances, +} from "../peggedAsset.type"; + +type ChainContracts = { + [chain: string]: { + [contract: string]: string[]; + }; +}; + +const chainContracts: ChainContracts = { + ethereum: { + issued: ["0x0E573Ce2736Dd9637A0b21058352e1667925C7a8"], + }, + bsc: { + bridgedFromETH: ["0x323665443CEf804A3b5206103304BD4872EA4253"], + }, + optimism: { + bridgedFromETH: ["0x323665443CEf804A3b5206103304BD4872EA4253"], + }, + arbitrum: { + bridgedFromETH: ["0x323665443CEf804A3b5206103304BD4872EA4253"], + }, + avax: { + bridgedFromETH: ["0x323665443CEf804A3b5206103304BD4872EA4253"], + }, +}; + +async function chainMinted(chain: string, decimals: number) { + return async function ( + _timestamp: number, + _ethBlock: number, + _chainBlocks: ChainBlocks + ) { + let balances = {} as Balances; + for (let issued of chainContracts[chain].issued) { + const totalSupply = ( + await sdk.api.abi.call({ + abi: "erc20:totalSupply", + target: issued, + block: _chainBlocks?.[chain], + chain: chain, + }) + ).output; + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); + } + return balances; + }; +} + +const adapter: PeggedIssuanceAdapter = { + ethereum: { + minted: chainMinted("ethereum", 6), + unreleased: async () => ({}), + }, + bsc: { + minted: bridgedSupply("bsc", 6, chainContracts.bsc.bridgedFromETH), + unreleased: async () => ({}), + }, + optimism: { + minted: bridgedSupply( + "optimism", + 6, + chainContracts.optimism.bridgedFromETH + ), + unreleased: async () => ({}), + }, + arbitrum: { + minted: bridgedSupply( + "arbitrum", + 6, + chainContracts.arbitrum.bridgedFromETH + ), + unreleased: async () => ({}), + }, + avax: { + minted: bridgedSupply("avax", 6, chainContracts.avax.bridgedFromETH), + unreleased: async () => ({}), + }, +}; + +export default adapter; diff --git a/src/adapters/peggedAssets/usdx/index.ts b/src/adapters/peggedAssets/usdx/index.ts index aa430554..bccd8d47 100644 --- a/src/adapters/peggedAssets/usdx/index.ts +++ b/src/adapters/peggedAssets/usdx/index.ts @@ -14,8 +14,7 @@ type ChainContracts = { }; }; -const chainContracts: ChainContracts = { -}; +const chainContracts: ChainContracts = {}; // If there is any Mintscan (or other) API that can be used, it should replace this. async function kavaMinted() { @@ -27,11 +26,9 @@ async function kavaMinted() { let balances = {} as Balances; const res = await retry( async (_bail: any) => - await axios.get( - "https://api.kava.io/vesting/circulatingsupplyusdx" - ) + await axios.get("https://api.kava.io/vesting/circulatingsupplyusdx") ); - const supply = res.data + const supply = res.data; sumSingleBalance(balances, "peggedUSD", supply, "issued", false); return balances; }; diff --git a/src/adapters/peggedAssets/usk/index.ts b/src/adapters/peggedAssets/usk/index.ts index b6b924bb..e0bb9d67 100644 --- a/src/adapters/peggedAssets/usk/index.ts +++ b/src/adapters/peggedAssets/usk/index.ts @@ -16,7 +16,9 @@ type ChainContracts = { const chainContracts: ChainContracts = { osmosis: { - bridgedFromKujira: ["ibc/44492EAB24B72E3FB59B9FA619A22337FB74F95D8808FE6BC78CC0E6C18DC2EC"], + bridgedFromKujira: [ + "ibc/44492EAB24B72E3FB59B9FA619A22337FB74F95D8808FE6BC78CC0E6C18DC2EC", + ], }, }; @@ -49,8 +51,12 @@ const adapter: PeggedIssuanceAdapter = { osmosis: { minted: async () => ({}), unreleased: async () => ({}), - kujira: osmosisSupply(chainContracts.osmosis.bridgedFromKujira, 6, "Kujira"), - } + kujira: osmosisSupply( + chainContracts.osmosis.bridgedFromKujira, + 6, + "Kujira" + ), + }, }; export default adapter; diff --git a/src/adapters/peggedAssets/usn/index.ts b/src/adapters/peggedAssets/usn/index.ts index 76098d11..8482459b 100644 --- a/src/adapters/peggedAssets/usn/index.ts +++ b/src/adapters/peggedAssets/usn/index.ts @@ -5,7 +5,7 @@ import { PeggedIssuanceAdapter, Balances, } from "../peggedAsset.type"; -import { call } from '../llama-helper/near'; +import { call } from "../llama-helper/near"; import { bridgedSupply } from "../helper/getSupply"; type ChainContracts = { @@ -32,7 +32,7 @@ async function chainMinted(chain: string, decimals: number) { let balances = {} as Balances; for (let issued of chainContracts[chain].issued) { const totalSupply = await call(issued, "ft_total_supply"); - + sumSingleBalance( balances, "peggedUSD", @@ -53,8 +53,8 @@ const adapter: PeggedIssuanceAdapter = { aurora: { minted: async () => ({}), unreleased: async () => ({}), - near: bridgedSupply("aurora", 18, chainContracts.aurora.bridgedFromNear) - } + near: bridgedSupply("aurora", 18, chainContracts.aurora.bridgedFromNear), + }, }; export default adapter; diff --git a/src/adapters/peggedAssets/uxd-stablecoin/index.ts b/src/adapters/peggedAssets/uxd-stablecoin/index.ts index c793c0ed..0b014f73 100644 --- a/src/adapters/peggedAssets/uxd-stablecoin/index.ts +++ b/src/adapters/peggedAssets/uxd-stablecoin/index.ts @@ -1,7 +1,5 @@ const sdk = require("@defillama/sdk"); -import { - PeggedIssuanceAdapter, -} from "../peggedAsset.type"; +import { PeggedIssuanceAdapter } from "../peggedAsset.type"; import { solanaMintedOrBridged } from "../helper/getSupply"; const chainContracts = { diff --git a/src/adapters/peggedAssets/vai/index.ts b/src/adapters/peggedAssets/vai/index.ts index 4cca33d6..d10b45b4 100644 --- a/src/adapters/peggedAssets/vai/index.ts +++ b/src/adapters/peggedAssets/vai/index.ts @@ -34,7 +34,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; diff --git a/src/adapters/peggedAssets/xsgd/index.ts b/src/adapters/peggedAssets/xsgd/index.ts index c0874d33..7d4b83ea 100644 --- a/src/adapters/peggedAssets/xsgd/index.ts +++ b/src/adapters/peggedAssets/xsgd/index.ts @@ -71,9 +71,9 @@ const adapter: PeggedIssuanceAdapter = { ), }, zilliqa: { - minted: zilliqaMinted(), // can't figure out how to get token supply + minted: zilliqaMinted(), // can't figure out how to get token supply unreleased: async () => ({}), - } + }, }; export default adapter; diff --git a/src/adapters/peggedAssets/yusd-stablecoin/index.ts b/src/adapters/peggedAssets/yusd-stablecoin/index.ts index 0a803805..09b688b6 100644 --- a/src/adapters/peggedAssets/yusd-stablecoin/index.ts +++ b/src/adapters/peggedAssets/yusd-stablecoin/index.ts @@ -16,7 +16,7 @@ type ChainContracts = { const chainContracts: ChainContracts = { avax: { issued: ["0x111111111111ed1d73f860f57b2798b683f2d325"], - } + }, }; async function chainMinted(chain: string, decimals: number) { @@ -45,7 +45,7 @@ const adapter: PeggedIssuanceAdapter = { avalanche: { minted: chainMinted("avax", 18), unreleased: async () => ({}), - } + }, }; export default adapter; diff --git a/src/adapters/peggedAssets/zunami-protocol/index.ts b/src/adapters/peggedAssets/zunami-protocol/index.ts index a1a9910b..b7fa99e5 100644 --- a/src/adapters/peggedAssets/zunami-protocol/index.ts +++ b/src/adapters/peggedAssets/zunami-protocol/index.ts @@ -34,7 +34,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; diff --git a/src/adapters/peggedAssets/zusd/index.ts b/src/adapters/peggedAssets/zusd/index.ts index 7c9df11a..a009be9e 100644 --- a/src/adapters/peggedAssets/zusd/index.ts +++ b/src/adapters/peggedAssets/zusd/index.ts @@ -3,18 +3,15 @@ const sdk = require("@defillama/sdk"); import { sumSingleBalance } from "../helper/generalUtil"; -import { - bridgedSupply, -} from "../helper/getSupply"; +import { bridgedSupply } from "../helper/getSupply"; import { ChainBlocks, PeggedIssuanceAdapter, Balances, } from "../peggedAsset.type"; -const axios = require("axios") +const axios = require("axios"); const retry = require("async-retry"); - type ChainContracts = { [chain: string]: { [contract: string]: string[]; @@ -26,7 +23,7 @@ const chainContracts: ChainContracts = { issued: ["0xc56c2b7e71b54d38aab6d52e94a04cbfa8f604fa"], }, optimism: { - bridgedFromETH: ["0x6e4cc0ab2b4d2edafa6723cfa1582229f1dd1be1"] , + bridgedFromETH: ["0x6e4cc0ab2b4d2edafa6723cfa1582229f1dd1be1"], }, arbitrum: { bridgedFromETH: ["0x6e4cc0ab2b4d2edafa6723cfa1582229f1dd1be1"], @@ -49,7 +46,13 @@ async function chainMinted(chain: string, decimals: number) { chain: chain, }) ).output; - sumSingleBalance(balances, "peggedUSD", totalSupply / 10 ** decimals, "issued", false); + sumSingleBalance( + balances, + "peggedUSD", + totalSupply / 10 ** decimals, + "issued", + false + ); } return balances; }; @@ -79,8 +82,6 @@ async function gmoAPIChainMinted(chain: string) { }; } - - const adapter: PeggedIssuanceAdapter = { ethereum: { minted: chainMinted("ethereum", 6), @@ -96,8 +97,8 @@ const adapter: PeggedIssuanceAdapter = { undefined, undefined, "peggedUSD" - ), - }, + ), + }, arbitrum: { minted: async () => ({}), unreleased: async () => ({}), @@ -108,12 +109,12 @@ const adapter: PeggedIssuanceAdapter = { undefined, undefined, "peggedUSD" - ), - }, - stellar: { - minted: gmoAPIChainMinted("XLM"), - unreleased: async () => ({}), - } - }; - - export default adapter; + ), + }, + stellar: { + minted: gmoAPIChainMinted("XLM"), + unreleased: async () => ({}), + }, +}; + +export default adapter; diff --git a/src/alertOutdated.ts b/src/alertOutdated.ts index 7900b6e5..fe390c4d 100644 --- a/src/alertOutdated.ts +++ b/src/alertOutdated.ts @@ -5,19 +5,28 @@ import { getCurrentUnixTimestamp } from "./utils/date"; import { sendMessage } from "./utils/discord"; const handler = async () => { - const now = getCurrentUnixTimestamp() - const outdated = (await Promise.all(peggedAssets.map(async asset=>{ - const last = await getLastRecord(`hourlyPeggedBalances#${asset.id}`) - if(last?.SK < now - 5*3600){ - return { + const now = getCurrentUnixTimestamp(); + const outdated = ( + await Promise.all( + peggedAssets.map(async (asset) => { + const last = await getLastRecord(`hourlyPeggedBalances#${asset.id}`); + if (last?.SK < now - 5 * 3600) { + return { name: asset.name, - hoursAgo: (now-last?.SK)/3600 + hoursAgo: (now - last?.SK) / 3600, + }; } - } - return null - }))).filter(a=>a!==null) - if(outdated.length>0){ - await sendMessage(outdated.map(a=>`${a!.name} - ${a!.hoursAgo.toFixed(2)} hours ago`).join("\n"), process.env.OUTDATED_WEBHOOK!) + return null; + }) + ) + ).filter((a) => a !== null); + if (outdated.length > 0) { + await sendMessage( + outdated + .map((a) => `${a!.name} - ${a!.hoursAgo.toFixed(2)} hours ago`) + .join("\n"), + process.env.OUTDATED_WEBHOOK! + ); } }; diff --git a/src/getStablecoinPrices.ts b/src/getStablecoinPrices.ts index f41459ba..8d2bb072 100644 --- a/src/getStablecoinPrices.ts +++ b/src/getStablecoinPrices.ts @@ -1,17 +1,26 @@ import { successResponse, wrap, IResponse } from "./utils/shared"; import { getHistoricalValues } from "./utils/shared/dynamodb"; -import { getLastRecord, dailyPeggedPrices, hourlyPeggedPrices } from "./peggedAssets/utils/getLastRecord"; +import { + getLastRecord, + dailyPeggedPrices, + hourlyPeggedPrices, +} from "./peggedAssets/utils/getLastRecord"; import { secondsInHour } from "./utils/date"; export async function craftStablecoinPricesResponse() { const historicalPeggedPrices = await getHistoricalValues(dailyPeggedPrices()); - const lastPrices = await getLastRecord(hourlyPeggedPrices()) + const lastPrices = await getLastRecord(hourlyPeggedPrices()); - const lastDailyItem = historicalPeggedPrices[historicalPeggedPrices.length - 1] - if (lastPrices !== undefined && lastPrices.SK > lastDailyItem.SK && (lastDailyItem.SK + secondsInHour * 25) > lastPrices.SK) { - lastPrices.SK = lastDailyItem.SK - historicalPeggedPrices[historicalPeggedPrices.length - 1] = lastPrices + const lastDailyItem = + historicalPeggedPrices[historicalPeggedPrices.length - 1]; + if ( + lastPrices !== undefined && + lastPrices.SK > lastDailyItem.SK && + lastDailyItem.SK + secondsInHour * 25 > lastPrices.SK + ) { + lastPrices.SK = lastDailyItem.SK; + historicalPeggedPrices[historicalPeggedPrices.length - 1] = lastPrices; } let response = historicalPeggedPrices diff --git a/src/peggedAssets/storePeggedAssets/errorDb.ts b/src/peggedAssets/storePeggedAssets/errorDb.ts index bf8c6cb2..c3ecd231 100644 --- a/src/peggedAssets/storePeggedAssets/errorDb.ts +++ b/src/peggedAssets/storePeggedAssets/errorDb.ts @@ -1,2 +1 @@ -export function executeAndIgnoreErrors(_sql: string, _values: any){ -} \ No newline at end of file +export function executeAndIgnoreErrors(_sql: string, _values: any) {} diff --git a/src/peggedAssets/storePeggedAssets/getAndStorePeggedAssets.ts b/src/peggedAssets/storePeggedAssets/getAndStorePeggedAssets.ts index 012261d0..4e081a4a 100644 --- a/src/peggedAssets/storePeggedAssets/getAndStorePeggedAssets.ts +++ b/src/peggedAssets/storePeggedAssets/getAndStorePeggedAssets.ts @@ -76,7 +76,12 @@ async function getPeggedAsset( `Getting circulating for ${peggedAsset.name} on chain ${chain} failed.`, e ); - executeAndIgnoreErrors('INSERT INTO `errors2` VALUES (?, ?, ?, ?)', [getCurrentUnixTimestamp(), peggedAsset.gecko_id, chain, String(e)]); + executeAndIgnoreErrors("INSERT INTO `errors2` VALUES (?, ?, ?, ?)", [ + getCurrentUnixTimestamp(), + peggedAsset.gecko_id, + chain, + String(e), + ]); peggedBalances[chain][issuanceType] = { [pegType]: null }; } else { console.error(peggedAsset.name, e); @@ -173,14 +178,27 @@ async function calcCirculating( console.error( `Null balance or 0 circulating error on chain ${chain}` ); - executeAndIgnoreErrors('INSERT INTO `errors2` VALUES (?, ?, ?, ?)', [getCurrentUnixTimestamp(), peggedAsset.gecko_id, chain, `Null balance or 0 circulating error`]); + executeAndIgnoreErrors( + "INSERT INTO `errors2` VALUES (?, ?, ?, ?)", + [ + getCurrentUnixTimestamp(), + peggedAsset.gecko_id, + chain, + `Null balance or 0 circulating error`, + ] + ); return; } circulating[pegType]! -= balance; }); } if (circulating[pegType]! < 0) { - executeAndIgnoreErrors('INSERT INTO `errors2` VALUES (?, ?, ?, ?)', [getCurrentUnixTimestamp(), peggedAsset.gecko_id, chain, `Pegged asset has negative circulating amount`]); + executeAndIgnoreErrors("INSERT INTO `errors2` VALUES (?, ?, ?, ?)", [ + getCurrentUnixTimestamp(), + peggedAsset.gecko_id, + chain, + `Pegged asset has negative circulating amount`, + ]); throw new Error( `Pegged asset on chain ${chain} has negative circulating amount` ); @@ -215,7 +233,10 @@ async function calcCirculating( const timeout = (prom: any, time: number, peggedID: string, chain: string) => Promise.race([prom, new Promise((_r, rej) => setTimeout(rej, time))]).catch( async (err) => { - console.error(`Could not store peggedAsset ${peggedID} on chain ${chain}`, err); + console.error( + `Could not store peggedAsset ${peggedID} on chain ${chain}`, + err + ); throw err; } ); @@ -261,11 +282,21 @@ export async function storePeggedAsset( ); } ); - await timeout(Promise.all(peggedChainPromises), 60e3, peggedAsset.name, chain); + await timeout( + Promise.all(peggedChainPromises), + 60e3, + peggedAsset.name, + chain + ); } ); await Promise.all(peggedBalancesPromises); - await calcCirculating(peggedBalances, bridgedFromMapping, peggedAsset, pegType); + await calcCirculating( + peggedBalances, + bridgedFromMapping, + peggedAsset, + pegType + ); if ( typeof peggedBalances.totalCirculating.circulating[pegType] !== "number" diff --git a/src/peggedAssets/storePeggedAssets/storePegged.ts b/src/peggedAssets/storePeggedAssets/storePegged.ts index 96f5d6b3..b87c48a7 100644 --- a/src/peggedAssets/storePeggedAssets/storePegged.ts +++ b/src/peggedAssets/storePeggedAssets/storePegged.ts @@ -43,7 +43,7 @@ async function iteratePeggedAssets(peggedIndexes: number[]) { maxRetries, peggedAsset.delisted ? false : true ), - 5*60*1000, + 5 * 60 * 1000, peggedAsset.gecko_id ); }); diff --git a/src/peggedAssets/storePeggedAssets/testStorePegged.ts b/src/peggedAssets/storePeggedAssets/testStorePegged.ts index 2261ad9b..22314d7a 100644 --- a/src/peggedAssets/storePeggedAssets/testStorePegged.ts +++ b/src/peggedAssets/storePeggedAssets/testStorePegged.ts @@ -1,8 +1,8 @@ -import iterate from "./storePegged" +import iterate from "./storePegged"; const test = async () => { - await iterate([1, 5, 38, 44]) - console.log("finished") - }; - - test(); \ No newline at end of file + await iterate([1, 5, 38, 44]); + console.log("finished"); +}; + +test(); diff --git a/src/peggedData/backfilledChains.ts b/src/peggedData/backfilledChains.ts index 2f32edb1..2e56eac4 100644 --- a/src/peggedData/backfilledChains.ts +++ b/src/peggedData/backfilledChains.ts @@ -1,26 +1,26 @@ const backfilledChains = [ - "ethereum", - 'bsc', - 'avalanche', - 'arbitrum', - 'optimism', - 'fantom', - 'polygon', - 'xdai', - 'celo', - 'harmony', - 'moonriver', - 'aztec', - 'loopring', - 'starknet', - 'zksync', - 'boba', - 'metis', - 'moonbeam', - 'syscoin', - 'okexchain', - 'iotex', - 'heco' -] + "ethereum", + "bsc", + "avalanche", + "arbitrum", + "optimism", + "fantom", + "polygon", + "xdai", + "celo", + "harmony", + "moonriver", + "aztec", + "loopring", + "starknet", + "zksync", + "boba", + "metis", + "moonbeam", + "syscoin", + "okexchain", + "iotex", + "heco", +]; -export default backfilledChains \ No newline at end of file +export default backfilledChains; diff --git a/src/peggedData/bridgeData.ts b/src/peggedData/bridgeData.ts index 7988eb26..75ef2d88 100644 --- a/src/peggedData/bridgeData.ts +++ b/src/peggedData/bridgeData.ts @@ -1902,6 +1902,6 @@ export const bridgeInfo = { }, base: { name: "Base Bridge", - link: "https://bridge.base.org/deposit" + link: "https://bridge.base.org/deposit", }, } as BridgeInfo; diff --git a/src/peggedData/peggedData.ts b/src/peggedData/peggedData.ts index 9e0fcb93..ef4571ca 100644 --- a/src/peggedData/peggedData.ts +++ b/src/peggedData/peggedData.ts @@ -900,7 +900,7 @@ export default [ symbol: "aSEED", url: "https://acala.network/", description: - "aSEED is the native decentralized stablecoin of Polkadot pegged to the US Dollar and backed only by decentralized assets in Collateralized Debt Positions (CDP).", // aUSD will be converted to aSEED 1:1 across all avenues including account balance, and liquidity pools etc. + "aSEED is the native decentralized stablecoin of Polkadot pegged to the US Dollar and backed only by decentralized assets in Collateralized Debt Positions (CDP).", // aUSD will be converted to aSEED 1:1 across all avenues including account balance, and liquidity pools etc. mintRedeemDescription: "Using the Acala app, users mint aSEED by depositing an accepted collateral asset into a vault. When the loan is repaid to retrieve the collateral, the paid back aUSD is burned.", onCoinGecko: "true", @@ -1401,7 +1401,7 @@ export default [ description: "DUSD is a secure, transparent, democratic Digital Dollar on Arbitrum. All DUSD are 1:1 backed by real dollars.", mintRedeemDescription: - "Fluid customers who have undergone a verification process can exchange USD for DUSD and redeem DUSD for USD.", + "Fluid customers who have undergone a verification process can exchange USD for DUSD and redeem DUSD for USD.", onCoinGecko: "true", gecko_id: "digitaldollar", cmcId: "19933", @@ -1423,7 +1423,7 @@ export default [ description: "Vesta is a layer 2-first lending protocol where users can deposit collateral to mint VST (Vesta Stable) - a USD-pegged stablecoin.", mintRedeemDescription: - "Using the Vesta Finance app, users mint VST by depositing an accepted collateral asset into a vault. When the loan is repaid to retrieve the collateral, the paid back VST is burned.", + "Using the Vesta Finance app, users mint VST by depositing an accepted collateral asset into a vault. When the loan is repaid to retrieve the collateral, the paid back VST is burned.", onCoinGecko: "true", gecko_id: "vesta-stable", cmcId: null, @@ -1443,7 +1443,7 @@ export default [ description: "Kolibri is an Tezos based stablecoin built on Collateralized Debt Positions (CDPs).", mintRedeemDescription: - "Using the Kolibri app, users mint KUSD by depositing an accepted collateral asset into an oven. When the loan is repaid to retrieve the collateral, the paid back KUSD is burned.", + "Using the Kolibri app, users mint KUSD by depositing an accepted collateral asset into an oven. When the loan is repaid to retrieve the collateral, the paid back KUSD is burned.", onCoinGecko: "true", gecko_id: "kolibri-usd", cmcId: null, @@ -1483,7 +1483,7 @@ export default [ description: "Moremoney is a lending protocol for opening (over)collateralized debt positions (CDP) using liquidity pool tokens, interest-bearing tokens (ibTKNs) and other major tokens as collateral.", mintRedeemDescription: - "Using the Moremoney app, users mint MONEY by depositing an accepted collateral asset into a vault. When the loan is repaid to retrieve the collateral, the paid back MONEY is burned.", + "Using the Moremoney app, users mint MONEY by depositing an accepted collateral asset into a vault. When the loan is repaid to retrieve the collateral, the paid back MONEY is burned.", onCoinGecko: "true", gecko_id: "moremoney-usd", cmcId: "18758", @@ -1503,7 +1503,7 @@ export default [ description: "uUSD is stablecoin pegged to USD on Tezos. It is fungible by design and backed by tez collateral.", mintRedeemDescription: - "Using the youves app, users mint uUSD by depositing an accepted collateral asset into a vault. When the loan is repaid to retrieve the collateral, the paid back uUSD is burned.", + "Using the youves app, users mint uUSD by depositing an accepted collateral asset into a vault. When the loan is repaid to retrieve the collateral, the paid back uUSD is burned.", onCoinGecko: "true", gecko_id: "youves-uusd", cmcId: "15041", @@ -1523,7 +1523,7 @@ export default [ description: "Interest Protocol (IP) is a fractional reserve banking protocol on the Ethereum blockchain that pays interest to all depositors. Interest Protocol issues a stablecoin, named USDi, that is both over-collateralized and highly scalable.", mintRedeemDescription: - "Using the Interest Protocol app, users mint USDi by depositing an accepted collateral asset into a vault or swapping for USDC. When the loan is repaid to retrieve the collateral, the paid back USDi is burned.", + "Using the Interest Protocol app, users mint USDi by depositing an accepted collateral asset into a vault or swapping for USDC. When the loan is repaid to retrieve the collateral, the paid back USDi is burned.", onCoinGecko: "true", gecko_id: "interest-protocol", cmcId: "20598", @@ -1543,7 +1543,7 @@ export default [ description: "LUGH (EURL) is a euro-pegged stablecoin on Tezos and Ethereum.", mintRedeemDescription: - "Corporates who have undergone a verification process can exchange EUR for EURL and redeem EURL for EUR.", + "Corporates who have undergone a verification process can exchange EUR for EURL and redeem EURL for EUR.", onCoinGecko: "false", gecko_id: "lugh", cmcId: null, @@ -1563,7 +1563,7 @@ export default [ description: "NOTE is the unit of account on Canto. NOTE is an over-collateralized currency with a value perpetually rebalanced toward $1 through an algorithmic interest rate policy.", mintRedeemDescription: - "NOTE is a fully immutable ERC-20 token backed by collateral lent to the Canto Lending Market. It can only be borrowed by users who post select collateral assets such as USDC, USDT, CANTO, ETH, ATOM, or Canto LP tokens.", + "NOTE is a fully immutable ERC-20 token backed by collateral lent to the Canto Lending Market. It can only be borrowed by users who post select collateral assets such as USDC, USDT, CANTO, ETH, ATOM, or Canto LP tokens.", onCoinGecko: "true", gecko_id: "note", cmcId: null, @@ -1583,7 +1583,7 @@ export default [ description: "HAY is a decentralized, unbiased, collateral-backed destablecoin soft-pegged to the US Dollar.", mintRedeemDescription: - "Using the Helio app, users mint HAY by depositing BNB into a vault. When the loan is repaid to retrieve the collateral, the paid back HAY is burned.", + "Using the Helio app, users mint HAY by depositing BNB into a vault. When the loan is repaid to retrieve the collateral, the paid back HAY is burned.", onCoinGecko: "true", gecko_id: "helio-protocol-hay", cmcId: "21330", @@ -1625,7 +1625,7 @@ export default [ description: "USK is an over-collateralized Cosmos stablecoin soft-pegged to the USD and initially backed by ATOM.", mintRedeemDescription: - "Using the Kujira BLUE app, users mint USK by depositing an accepted collateral asset into a vault. When the loan is repaid to retrieve the collateral, the paid back USK is burned.", + "Using the Kujira BLUE app, users mint USK by depositing an accepted collateral asset into a vault. When the loan is repaid to retrieve the collateral, the paid back USK is burned.", onCoinGecko: "true", gecko_id: "usk", cmcId: null, @@ -1645,7 +1645,7 @@ export default [ description: "Arable offers farms for staking with synthetic LP and synthetic cryptocurrencies. arUSD is a token that is pegged to USD. You can swap arUSD for any other synths on the Arable platform.", mintRedeemDescription: - "Using the Arable Finance app, users mint arUSD by depositing an accepted collateral asset into a vault. When the loan is repaid to retrieve the collateral, the paid back arUSD is burned.", + "Using the Arable Finance app, users mint arUSD by depositing an accepted collateral asset into a vault. When the loan is repaid to retrieve the collateral, the paid back arUSD is burned.", onCoinGecko: "false", gecko_id: "arable-usd", cmcId: null, @@ -1665,7 +1665,7 @@ export default [ description: "Real is a decentralized borrowing protocol on the EthereumPoW network that allows you to draw interest-free loans against Ether used as collateral. Loans are paid out in USDW (a USD pegged stablecoin) and need to maintain a minimum collateral ratio of 115%.", mintRedeemDescription: - "Using the Real Protocol app, users mint USDW by depositing Ether into a vault. When the loan is repaid to retrieve the collateral, the paid back USDW is burned.", + "Using the Real Protocol app, users mint USDW by depositing Ether into a vault. When the loan is repaid to retrieve the collateral, the paid back USDW is burned.", onCoinGecko: "false", gecko_id: "usdw", cmcId: null, @@ -1685,7 +1685,7 @@ export default [ description: "BOB is a multi-chain stable token (stablecoin) enhanced with optional privacy features. Once BOB is deposited in the zkBob app, pool participants can transfer any amount of BOB amongst themselves in a private, secure manner.", mintRedeemDescription: - "BOB minting is handled with a multi-sig Safe by a distributed reserve board.", + "BOB minting is handled with a multi-sig Safe by a distributed reserve board.", onCoinGecko: "true", gecko_id: "bob", cmcId: "21882", @@ -1705,7 +1705,7 @@ export default [ description: "Real USD (USDR v3) is a natively rebasing, yield-bearing, overcollateralized stablecoin, pegged to the US dollar. Collateralizing USDR will be yield-generating, tokenized real estate that is inflation-resistant and wealth generating.", mintRedeemDescription: - "Using Tangible, users can swap DAI to mint USDR 1:1. A portion of that DAI is then converted into tokenized real estate through Tangible's existing marketplace. Users receive a daily rebase. USDR can be redeemed for DAI 1:1 at any time.", + "Using Tangible, users can swap DAI to mint USDR 1:1. A portion of that DAI is then converted into tokenized real estate through Tangible's existing marketplace. Users receive a daily rebase. USDR can be redeemed for DAI 1:1 at any time.", onCoinGecko: "true", gecko_id: "real-usd", cmcId: null, @@ -1725,7 +1725,7 @@ export default [ description: "UZD is a dollar-pegged stablecoin with wrapped stable assets (from Curve and Convex through Zunami Protocol) as collateral.", mintRedeemDescription: - "Using the Zunami Protocol app, users can LP in a 3-pool and then deposit the LP tokens to mint UZD. UZD can be redeemed for LP tokens at any time.", + "Using the Zunami Protocol app, users can LP in a 3-pool and then deposit the LP tokens to mint UZD. UZD can be redeemed for LP tokens at any time.", onCoinGecko: "true", gecko_id: "zunami-protocol", cmcId: null, @@ -1745,7 +1745,7 @@ export default [ description: "USDi is the USD-pegged stablecoin of Bank of Chain ('BoC'), a decentralized yield generation protocol.", mintRedeemDescription: - "Using the Bank of Chain app, users can deposit the three major stablecoins (USDT, USDC, DAI) in any desired combination and amount to mint USDi. USDi can be redeemed for its underlying stablecoins 1:1 at any time.", + "Using the Bank of Chain app, users can deposit the three major stablecoins (USDT, USDC, DAI) in any desired combination and amount to mint USDi. USDi can be redeemed for its underlying stablecoins 1:1 at any time.", onCoinGecko: "false", gecko_id: "bank-of-chain", cmcId: null, @@ -1762,10 +1762,9 @@ export default [ address: null, symbol: "IUSD", url: "https://indigoprotocol.io/", - description: - "iUSD is a synthetic CDP stablecoin native to Cardano.", + description: "iUSD is a synthetic CDP stablecoin native to Cardano.", mintRedeemDescription: - "Using the Indigo app, users can mint iUSD by depositing ADA as collateral into a CDP. When the loan is repaid to retrieve the collateral, the paid back iUSD is burned.", + "Using the Indigo app, users can mint iUSD by depositing ADA as collateral into a CDP. When the loan is repaid to retrieve the collateral, the paid back iUSD is burned.", onCoinGecko: "true", gecko_id: "iusd", cmcId: null, @@ -1785,7 +1784,7 @@ export default [ description: "XAI is an over-collateralized stablecoin with a soft peg to the US Dollar in the Silo lending protocol.", mintRedeemDescription: - "Using the Silo Finance app, users can borrow XAI by depositing ETH or USDC as collateral. When the loan is repaid to retrieve the collateral, the paid back XAI is burned.", + "Using the Silo Finance app, users can borrow XAI by depositing ETH or USDC as collateral. When the loan is repaid to retrieve the collateral, the paid back XAI is burned.", onCoinGecko: "true", gecko_id: "xai", cmcId: null, @@ -1805,7 +1804,7 @@ export default [ description: "Redeemable USD is a fiat-backed stablecoin on both the Cardano and Shareslake networks. It is a USD backed stablecoin in a 1:1 basis.", mintRedeemDescription: - "Using the Shareslake Dashboard, users can deposit USD on Shareslake or ADA on Cardano to mint RUSD. RUSD can be redeemed for USD at any time.", + "Using the Shareslake Dashboard, users can deposit USD on Shareslake or ADA on Cardano to mint RUSD. RUSD can be redeemed for USD at any time.", onCoinGecko: "false", gecko_id: "redeemable", cmcId: null, @@ -1845,7 +1844,7 @@ export default [ description: "Pina is also a stable dollar pegged to the value of $1. Using mechanisms inspired by Dynamic Set Dollar (DSD), they have optimized $Pina to better serve the needs of their marketplace.", mintRedeemDescription: - "If the price of PINA is less than 1$, the supply is changed by emitting coupons to reduce the supply. You can stake PINA or LP PINA-USDC in order to get more PINA.", + "If the price of PINA is less than 1$, the supply is changed by emitting coupons to reduce the supply. You can stake PINA or LP PINA-USDC in order to get more PINA.", onCoinGecko: "true", gecko_id: "meme-dollar", cmcId: null, @@ -1859,13 +1858,14 @@ export default [ { id: "93", name: "Djed StableCoin", - address: "cardano:8db269c3ec630e06ae29f74bc39edd1f87c819f1056206e879a1cd61446a65644d6963726f555344", + address: + "cardano:8db269c3ec630e06ae29f74bc39edd1f87c819f1056206e879a1cd61446a65644d6963726f555344", symbol: "DJED", url: "https://djed.xyz/", description: - "Cardano's native overcollateralized stablecoin, developed by IOG and powered by COTI. DJED is backed by ADA and uses SHEN as a reserve coin", + "Cardano's native overcollateralized stablecoin, developed by IOG and powered by COTI. DJED is backed by ADA and uses SHEN as a reserve coin", mintRedeemDescription: - "Using the DJED App (https://djed.xyz/) users supply ADA as collateral to receive DJED. It uses a collateral ratio between 400% and 800% for DJED and SHEN", + "Using the DJED App (https://djed.xyz/) users supply ADA as collateral to receive DJED. It uses a collateral ratio between 400% and 800% for DJED and SHEN", onCoinGecko: "false", gecko_id: "djed", cmcId: "21639", @@ -1883,9 +1883,9 @@ export default [ symbol: "BAOUSD", url: "https://app.bao.finance", description: - "BaoUSD is a CDP stablecoin, its over-collateralized and issued through our Bao Market", + "BaoUSD is a CDP stablecoin, its over-collateralized and issued through our Bao Market", mintRedeemDescription: - "Using the Bao Finance app, users can borrow BAOUSD by depositing ETH, USDC or bSTBL as collateral. When the loan is repaid to retrieve the collateral, the paid back BAOUSD is burned.", + "Using the Bao Finance app, users can borrow BAOUSD by depositing ETH, USDC or bSTBL as collateral. When the loan is repaid to retrieve the collateral, the paid back BAOUSD is burned.", onCoinGecko: "true", gecko_id: "baousd", cmcId: null, @@ -1902,1041 +1902,1064 @@ export default [ address: null, symbol: "CMST", url: "https://harborprotocol.one/home", - description: - "CMST is an over-collateralized stablecoin for the Cosmos.", + description: "CMST is an over-collateralized stablecoin for the Cosmos.", mintRedeemDescription: - "Users can deposit safelisted Interchain assets on Harbor protocol as collateral and mint new $CMST.", + "Users can deposit safelisted Interchain assets on Harbor protocol as collateral and mint new $CMST.", onCoinGecko: "true", gecko_id: "composite", cmcId: null, pegType: "peggedUSD", pegMechanism: "crypto-backed", priceSource: "defillama", - auditLinks: "https://github.com/oak-security/audit-reports/tree/master/Comdex", + auditLinks: + "https://github.com/oak-security/audit-reports/tree/master/Comdex", twitter: "https://twitter.com/Composite_Money", wiki: null, }, { - id: "96", - name: "Coin98 Dollar", - address: "bsc:0xfa4ba88cf97e282c505bea095297786c16070129", - symbol: "CUSD", - url: "https://coin98.com/dollar", - description: - "CUSD is a decentralized stablecoin that is fully collateralized by assets in reserve", - mintRedeemDescription: - "In order to convert to 1 CUSD, a total of $1 worth of the collateralized assets must be sent into the CUSD Reserve smart contract. Specifically, in the initial phase, the collateral ratio to convert to 1 CUSD will be $1 worth of fiat-backed stablecoins - BUSD (on BNB Chain) and USDC (on Solana and Ethereum)", - onCoinGecko: "true", - gecko_id: "coin98-dollar", - cmcId: "21871", - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/coin98_wallet", - wiki: null, -}, -{ - id: "97", - name: "USP Stablecoin", - address: "avax:0xdaCDe03d7Ab4D81fEDdc3a20fAA89aBAc9072CE2", - symbol: "USP", - url: "https://app.platypus.finance/usp", - description: - "An over-collateralized ERC-20 stablecoin built on the Platypus stableswap", - mintRedeemDescription: - "Users can deposits collateral into the Platypus Main Pool and stake their LP tokens into the MasterPlatypus to farm PTP. At the same time, it is possible for users to mint USP based on the the collateral factor", - onCoinGecko: "false", - gecko_id: "platypus-usd", - cmcId: "20962", - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/Platypusdefi", - wiki: null, -}, -{ - id: "98", - name: "EUROe Stablecoin", - address: "0x820802Fa8a99901F52e39acD21177b0BE6EE2974", - symbol: "EUROe", - url: "https://www.euroe.com/", - description: - "EUROe is a fully fiat-backed multichain euro stablecoin. EUROe is issued by Membrane Finance Oy, an electronic money institution registered in Finland. EUROe is a MiCA-compliant stablecoin.", - mintRedeemDescription: - "Anyone with a EUROe Account can redeem and mint EUROe with fiat euros in a 1:1 ratio, either through a UI or using EUROe Account APIs.", - onCoinGecko: "true", - gecko_id: "euroe-stablecoin", - cmcId: null, - pegType: "peggedEUR", - pegMechanism: "fiat-backed", - priceSource: "defillama", - auditLinks: ["https://dev.euroe.com/docs/Stablecoin/audits"], - twitter: "https://twitter.com/EUROemoney", - wiki: null, -}, -{ - id: "99", - name: "Stabl.fi Cash", - address: "polygon:0x80487b4f8f70e793a81a42367c225ee0b94315df", - symbol: "CASH", - url: "https://www.stabl.fi/swap", - description: - "$CASH is a stable indexcoin pegged to the weighted average of a basket of stablecoin collaterals", - mintRedeemDescription: - "Using the Stabl.fi app, users can borrow $CASH by depositing stablecoins as collateral. When the loan is repaid to retrieve the collateral, the paid back $CASH is burned.", - onCoinGecko: "true", - gecko_id: "stabl-fi", - cmcId: "21703", - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/Stabl_Fi", - wiki: null, -}, -{ - id: "100", - name: "Digital Standard Unit", - address: "0x605d26fbd5be761089281d5cec2ce86eea667109", - symbol: "DSU", - url: "https://www.dsu.money/", - description: - "Digital Standard Unit is a wrapper for stablecoins. The protocol consumes a particular collateral, places it into a reserve and issues a stablecoin, known as DSU, against it", - mintRedeemDescription: - "Users are able to mint DSU by providing the specified collateral, currently this is USDC. They are also able to redeem USDC from DSU at a 1-to-1 ratio with DSU", - onCoinGecko: "true", - gecko_id: "digital-standard-unit", - cmcId: null, - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/dsumoney", - wiki: null, -}, -{ - id: "101", - name: "Monerium EUR emoney", - address: "0x3231cb76718cdef2155fc47b5286d82e6eda273f", - symbol: "EURE", - url: "https://monerium.com/tokens/", - description: - "Monerium EUR e-money (EURE) is a digital currency issued by Monerium, an electronic money institution licensed and regulated by the Financial Supervisory Authority of Iceland. EURE is a stablecoin that is pegged to the Euro at a 1:1 ratio", - mintRedeemDescription: - "To mint Monerium EUR e-money (EURE), users need to first create an account with Monerium and complete the required KYC and AML checks. Once the account is approved, users can then fund their account with Euros via bank transfer", - onCoinGecko: "true", - gecko_id: "monerium-eur-money", - cmcId: "20920", - pegType: "peggedEUR", - pegMechanism: "fiat-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/monerium", - wiki: null, -}, -{ - id: "102", - name: "Offshift anonUSD", - address: "0x5a7e6c8204a1359db9aacab7ba5fc309b7981efd", - symbol: "ANONUSD", - url: "https://offshift.io/", - description: - "Offshift anon is an on-chain, non-custodial platform that preserves user privacy while maintaining yield potential. Users can burn XFT to mint on-chain synthetics called anonAssets via Shifting, which makes them anonymous. AnonAssets are standard ERC20 tokens, eliminating yield-related tradeoffs associated with privacy", - mintRedeemDescription: - "To mint synthetics in the Offshift Ecosystem, users select and open a PriFi Application, and connect an ERC20 wallet. If a user possesses a positive XFT balance and sufficient ETH to cover gas fees, he/she may conduct a **Shift** and enter the Offshift Ecosystem’s private (anonymous and/or confidential) side via the Burn-and-Mint Mechanism", - onCoinGecko: "true", - gecko_id: "offshift-anonusd", - cmcId: "23729", - pegType: "peggedUSD", - pegMechanism: "algorithmic", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/OffshiftXFT", - wiki: null, -}, -{ - id: "103", - name: "NXUSD", - address: "0xf14f4ce569cb3679e99d5059909e23b07bd2f387", - symbol: "NXUSD", - url: "https://nxusd.nereus.finance/", - description: - "NXUSD is an over-collateralized USD-pegged stablecoin minted by Nereus Finance", - mintRedeemDescription: - "Collateral tokens are deposited on Nereus Finance.A debt allocation is assigned to the borrower with ZERO INTEREST, plus an origination fee of 0.5% is charged.NXUSD tokens are deposited into the borrower's wallet.", - onCoinGecko: "true", - gecko_id: "nxusd", - cmcId: "19538", - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: ["https://docs.nereus.finance/nereus-protocol/security-audit"], - twitter: "https://twitter.com/nereusfinance", - wiki: null, -}, -{ - id: "104", - name: "Davos Protocol", - address: "0xec38621e72d86775a89c7422746de1f52bba5320", - symbol: "DUSD", - url: "https://davos.xyz/", - description: - "Davos Protocol is an innovative collateralized debt position (CDP) protocol that tackles the limitations of traditional CDPs in the DeFi landscape. It achieves this by implementing an unbiased monetary policy and fair borrowing rates, ensuring user protection and fostering widespread DeFi adoption. Notably, users retain the upside of their collateral, preserving their potential returns.", - mintRedeemDescription: - "Using the Davos Protocol, users have the opportunity to borrow the DAVOS Stable Asset, initially using their staked MATIC assets as collateral. Users can borrow up to 66% of the value of their MATIC collateral", - onCoinGecko: "true", - gecko_id: "davos-protocol", - cmcId: "23515", - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: ["https://github.com/davos-money/new-davos-smart-contracts/tree/main/audits"], - twitter: "https://twitter.com/Davos_Protocol", - wiki: null, -}, -{ - id: "105", - name: "DeFi Franc", - address: "0x045da4bfe02b320f4403674b3b7d121737727a36", - symbol: "DCHF", - url: "https://www.defifranc.com/", - description: - "The DeFi Franc (DCHF) is a decentralized stablecoin, pegged to the Swiss Franc. The DeFi Franc is over-collateralized and is created through loans which are backed by ETH and WBTC", - mintRedeemDescription: - "DCHF can be borrowed using ETH and BTC assets as collateral. Users can borrow up to 90% of the value of their ETH or BTC collateral and every DCHF is 100% redeemable for ETH worth 1 CHF", - onCoinGecko: "true", - gecko_id: "defi-franc", - cmcId: "22249", - pegType: "peggedVAR", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/monetadao", - wiki: null, -}, -{ - id: "106", - name: "Electronic USD", - address: "0xa0d69e286b938e21cbf7e51d71f6a4c8918f482f", - symbol: "EUSD", - url: "https://register.app/#/overview?token=0xA0d69E286B938e21CBf7E51D71F6A4c8918f482F", - description: - "The eUSD RToken is a fully collateralized US-dollar stablecoin built on the Reserve Protocol", - mintRedeemDescription: - "Minting requires a deposit of the defined collateral tokens in equal value amounts to the RToken smart contracts", - onCoinGecko: "true", - gecko_id: "electronic-usd", - cmcId: "22933", - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/reserveprotocol", - wiki: null, -}, -{ - id: "107", - name: "Czodiac USD", - address: "bsc:0xE68b79e51bf826534Ff37AA9CeE71a3842ee9c70", - symbol: "CZUSD", - url: "https://czodiac.com/", - description: - "The CZUSD peg to BUSD is maintained by the innovative ScorchPeg system. The ScorchPeg holds a portion of BUSD in reserve and utilizes it to keep CZUSD at a steady $1 value through trades on Pancakeswap. During normal market conditions, the peg remains strong, however, during periods of stress, the ScorchPeg will temporarily pause, and CZUSD will be allowed to float.", - mintRedeemDescription: - "CZUSD and BUSD swapping.", - onCoinGecko: "true", - gecko_id: "czusd", - cmcId: "19366", - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/zodiacs_c", - wiki: null, -}, -{ - id: "108", - name: "Deuterium", - address: "moonbeam:0xc806B0600cbAfA0B197562a9F7e3B9856866E9bF", - symbol: "d2O", - url: "https://dam.finance", - description: - "d2o is an omnichain native stablecoin with a soft-peg to the United States Dollar", - mintRedeemDescription: - "Add colateral in order to mint d2O.", - onCoinGecko: "true", - gecko_id: "dam-finance", - cmcId: "23529", - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/DAM_Finance", - wiki: null, -}, -{ - id: "109", - name: "eUSD", - address: "0x97de57ec338ab5d51557da3434828c5dbfada371", - symbol: "EUSD", - url: "https://lybra.finance/eusd", - description: - "eUSD is an interest-bearing stablecoin hard-pegged to the US dollar", - mintRedeemDescription: - "Users deposit ETH & stETH as collateral with an excess collateral ratio of 150% to maintain safety and decentralization", - onCoinGecko: "true", - gecko_id: "eusd-27a558b0-8b5b-4225-a614-63539da936f4", - cmcId: "25013", - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/LybraFinanceLSD", - wiki: null, -}, -{ - id: "110", - name: "crvUSD", - address: "0x95ECDC6caAf7E4805FCeF2679A92338351D24297", - symbol: "crvUSD", - url: "https://curve.fi", - description: - "crvUSD is a collateralized-debt-position (CDP) stablecoin pegged to the US Dollar", - mintRedeemDescription: - "Users deposit collateral to borrow crvUSD", - onCoinGecko: "false", - gecko_id: "crvusd", - cmcId: null, - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/CurveFinance", - wiki: null, -}, -{ - id: "111", - name: "DAI+", - address: "optimism:0x970d50d09f3a656b43e11b0d45241a84e3a6e011", - symbol: "DAI+", - url: "https://overnight.fi/", - description: - "DAI+ is DAI that pays yield daily via rebase. The DAI+ stablecoin can be instantly minted and redeemed to DAI 1:1.", - mintRedeemDescription: - "Using the Overnight app, users swap DAI to mint DAI+ 1:1. DAI+ can be redeemed for DAI 1:1 at any time.", - onCoinGecko: "true", - gecko_id: "overnight-dai", - cmcId: null, - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/overnight_fi", - wiki: null, -}, -{ - id: "112", - name: "USDT+", - address: "bsc:0x5335e87930b410b8c5bb4d43c3360aca15ec0c8c", - symbol: "USDT+", - url: "https://overnight.fi/", - description: - "USDT+ is USDT that pays yield daily via rebase. The USDT+ stablecoin can be instantly minted and redeemed to USDT 1:1.", - mintRedeemDescription: - "Using the Overnight app, users swap USDT to mint USDT+ 1:1. USDT+ can be redeemed for USDT 1:1 at any time.", - onCoinGecko: "true", - gecko_id: "usdtplus", - cmcId: null, - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/overnight_fi", - wiki: null, -}, -{ - id: "113", - name: "SILK", - address: null, - symbol: "SILK", - url: "https://app.shadeprotocol.io", - description: - "SILK is a collateralized stablecoin with a variable peg that is derived from a basket of assets including forex, commodities, and cryptocurrencies. The basket is designed to maintain purchasing power.", - mintRedeemDescription: - "Using ShadeLend, users deposit collateral to borrow / mint SILK. When users repay their loan, the SILK is burned", - onCoinGecko: "false", - gecko_id: "silk-bcec1136-561c-4706-a42c-8b67d0d7f7d2", - cmcId: null, - pegType: "peggedVAR", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/Shade_Protocol", - wiki: null, -}, -{ - id: "114", - name: "CLever USD", - address: "0x3C20Ac688410bE8F391bE1fb00AFc5C212972F86", - symbol: "clevUSD", - url: "https://clever.aladdin.club/", - description: - "ClevUSD are synthetic versions of their associated real token, representing the future yield of CLever strategies. Each clevToken is backed by one or more equivalent real Tokens in the system.", - mintRedeemDescription: - "ClevUSD can be farmed in CLever liquidity pools or swapped for more of the original token.", - onCoinGecko: "true", - gecko_id: "clever-usd", - cmcId: null, - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/0xc_lever", - wiki: null, -}, -{ - id: "115", - name: "R", - address: "0x183015a9bA6fF60230fdEaDc3F43b3D788b13e21", - symbol: "R", - url: "https://raft.fi/", - description: - "R is the most capital-efficient USD stablecoin backed by high-quality collateral assets such as stETH (Lido Staked Ether) and rETH (Rocket Pool ETH) and reserve assets such as CHAI, the yield-bearing version of the DAI stablecoin.", - mintRedeemDescription: - "Users can deposit any accepted collateral asset of their choice to generate R, and enjoy capital-efficient borrowing.", - onCoinGecko: "true", - gecko_id: "r", - cmcId: "24404", - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: ["https://github.com/trailofbits/publications/blob/master/reviews/2023-04-tempus-raft-securityreview.pdf"], - twitter: "https://twitter.com/raft_fi", - wiki: null, -}, -{ - id: "116", - name: "GRAI", - address: "0x15f74458aE0bFdAA1a96CA1aa779D715Cc1Eefe4", - symbol: "GRAI", - url: "https://www.gravitaprotocol.com/", - description: - "Gravita Protocol is an ETH-centric Borrowing Protocol for LSTs and Yield-Generating assets. GRAI is the debt token of the platform. Our motto is: fueling decentralization.", - mintRedeemDescription: - "Users deposit LSTs or BLUSD as collateral to generate the debt token GRAI.", - onCoinGecko: "true", - gecko_id: "grai", - cmcId: "25337", - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: ["https://www.gravitaprotocol.com/audits/gravita-audit-report-dedaub-apr-23-2023.pdf","https://www.gravitaprotocol.com/audits/gravita-audit-report-omniscia-may-17-2023.pdf","https://hatsfinance.medium.com/gravita-audit-competition-final-writeup-dfb28463a0dc"], - twitter: "https://twitter.com/gravitaprotocol", - wiki: "https://docs.gravitaprotocol.com/", -}, -{ - id: "117", - name: "Ethos Reserve Note", - address: "optimism:0xc5b001dc33727f8f26880b184090d3e252470d45", - symbol: "ERN", - url: "https://www.ethos.finance/", - description: - "Ethos Reserve is a decentralized lending protocol that allows users to take out interest-free loans against collateral such as BTC and ETH.", - mintRedeemDescription: - "Loans drawn from Ethos Reserve require users to maintain a minimum amount of collateral in the system to cover their debt. These collateral ratios are as low as 108% for ETH, 120% for BTC, and may be lowered over time depending on usage", - onCoinGecko: "true", - gecko_id: "ethos-reserve-note", - cmcId: "24370", - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: [], - twitter: "https://twitter.com/EthosReserve", - wiki: null, -}, -{ - id: "118", - name: "GHO", - address: "0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f", - symbol: "GHO", - url: "https://app.aave.com/", - description: - "GHO is a native decentralized, overcollateralized digital asset pegged to USD.", - mintRedeemDescription: - "It is created by users via borrowing against multiple collateral. When user repays their GHO borrow position, the protocol burns that user's GHO. All the interest payments accrued by minters of GHO would be directly transferred to the AaveDAO treasury.", - onCoinGecko: "true", - gecko_id: "gho", - cmcId: "23508", - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: ["https://github.com/aave/gho-core/tree/main/audits"], - twitter: "https://twitter.com/GHOAave", - wiki: "https://docs.gho.xyz", -}, -{ - id: "119", - name: "First Digital USD", - address: "0xc5f0f7b66764f6ec8c8dff7ba683102295e16409", - symbol: "FDUSD", - url: "https://firstdigitallabs.com", - description: - "Each FDUSD is intended to be fully backed by one US dollar or an asset of equivalent fair value.", - mintRedeemDescription: - "To redeem your FDUSD stablecoin, you must first become a client of First Digital Labs and meet specific requirements, including Anti-Money Laundering (AML) and Counter-Terrorism Financing (CTF) checks. Upon successful completion of these checks, you can exchange your FDUSD for its equivalent in fiat currency, thereby taking it out of circulation. Alternatively, you can sell your FDUSD tokens on the secondary market through a cryptocurrency exchange or an Over-the-Counter (OTC) provider that supports FD121's stablecoins. ", - onCoinGecko: "true", - gecko_id: "first-digital-usd", - cmcId: "26081", - pegType: "peggedUSD", - pegMechanism: "fiat-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/FDLabsHQ", - wiki: null, -}, -{ - id: "120", - name: "PayPal USD", - address: "0x6c3ea9036406852006290770BEdFcAbA0e23A0e8", - symbol: "PYUSD", - url: "https://www.paypal.com/pyusd", - description: - "PayPal USD is designed to maintain a stable $1 USD value. It's backed by dollar deposits, US treasuries, and cash equivalents", - mintRedeemDescription: - "As PayPal USD rolls out, users will be able to buy, sell, hold, and transfer it in the PayPal app or on their site", - onCoinGecko: "true", - gecko_id: "paypal-usd", - cmcId: null, - pegType: "peggedUSD", - pegMechanism: "fiat-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/PayPal", - wiki: null, -}, -{ - id: "121", - name: "PSY", - address: "0x63D4dc5376cfB48a885A165cd97BA208b87881c7", - symbol: "sLSD", - url: "https://www.psy.money/", - description: - "PSY protocol offers a unique borrowing experience that is both interest-free and highly capital efficient. This means that for the same loan, less collateral is required compared to other borrowing systems. Instead of selling your collateral like wstETH or rETH to have liquid funds, you can use the protocol to lock up your collaterals, borrow against the collateral to withdraw SLSD, and then repay your loan at a future date.", - mintRedeemDescription: - "To borrow you must open a Trove and deposit a certain amount of collateral to it. Then you can draw SLSD up to a collateral ratio of 110%. A minimum debt of 2,000 SLSD is required.", - onCoinGecko: "false", - gecko_id: null, - cmcId: null, - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/PSY_stablecoin", - wiki: null, -}, -{ - id: "122", - name: "GYEN", - address: "0xc08512927d12348f6620a698105e1baac6ecd911", - symbol: "GYEN", - url: "https://stablecoin.z.com", - description: - "The First Regulated Digital JPY", - mintRedeemDescription: - "You need to make an account (Institutional or Individual) in order to redeem GYEN for JPY", - onCoinGecko: "true", - gecko_id: "gyen", - cmcId: "8771", - pegType: "peggedJPY", - pegMechanism: "fiat-backed", - priceSource: "coingecko", - auditLinks: null, - twitter: "https://twitter.com/GMOTrust", - wiki: null, -}, -{ - id: "123", - name: "STAR", - address: "0xC19669A405067927865B40Ea045a2baabbbe57f5", - symbol: "STAR", - url: "https://www.preon.finance/", - description: - "Preon is a decentralized, lending protocol that allows you to borrow against your crypto - at 0 interest. Loans are paid out in $STAR (our USD-pegged stablecoin) with a minimum maintained collateral ratio of 110%.", - mintRedeemDescription: - "Users deposit wMatic, weth or wstETH as collateral to generate the debt token STAR.", - onCoinGecko: "true", - gecko_id: "preon-star", - cmcId: null, - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: ["https://docs.preon.finance/information/security"], - twitter: "https://twitter.com/PreonFinance", - wiki: "https://docs.preon.finance/", -}, -{ - id: "124", - name: "peg-eUSD", - address: "0xd585aaafa2b58b1cd75092b51ade9fa4ce52f247", - symbol: "peUSD", - url: "https://lybra.finance/", - description: - "peUSD is an Omnichain, DeFi utility version of eUSD, integrated with the OFT standard of LayerZero.", - mintRedeemDescription: - "It can be converted from eUSD through the protocol or minted directly from non-rebase LSTs.", - onCoinGecko: "true", - gecko_id: "peusd", - cmcId: null, - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/LybraFinanceLSD", - wiki: "https://docs.lybra.finance/lybra-finance-docs/background/stablecoins-on-the-market", -}, -{ - id: "125", - name: "eUSD (V2)", - address: "0xdf3ac4f479375802a821f7b7b46cd7eb5e4262cc", - symbol: "eUSD(v2)", - url: "https://lybra.finance/", - description: - "eUSD is an interest-bearing stablecoin hard-pegged to the US dollar", - mintRedeemDescription: - "Users deposit ETH & stETH as collateral with an excess collateral ratio of 150% to maintain safety and decentralization or exchanged by peg-eusd", - onCoinGecko: "true", - gecko_id: "eusd-v2", - cmcId: null, - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/LybraFinanceLSD", - wiki: "https://docs.lybra.finance/lybra-finance-docs/background/stablecoins-on-the-market", -}, -{ - id: "126", - name: "mkUSD", - address: "0x4591dbff62656e7859afe5e45f6f47d3669fbb28", - symbol: "mkUSD", - url: "https://prismafinance.com", - description: - "A non-custodial and decentralized Ethereum LST-backed stablecoin", - mintRedeemDescription: - "Users mint mkUSD by depositing liquid staking tokens (LSTs) as collateral into a vault. When the loan is repaid to retrieve the collateral, the paid back mkUSD is burned", - onCoinGecko: "true", - gecko_id: "prisma-mkusd", - cmcId: null, - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/PrismaFi", - wiki: "https://docs.prismafinance.com/protocol-concepts/depositing-collateral-and-minting-mkusd", -}, -{ - id: "127", - name: "Alternity CNY", - address: "0x7635b612792e4bfb7f2fa12a3e5d5a3f2e3c34bc", - symbol: "LCNY", - url: "https://alternity.finance", - description: - "Alternity protocol is a fork of the initial code of the Liquity Protocol. Minor amendments have been added to the protocol logic in order to make the stablecoin Yuan-pegged.", - mintRedeemDescription: - "Users can redeem their LCNY for ETH at any time without limitations. However, a redemption fee might be charged on the redeemed amount.", - onCoinGecko: "true", - gecko_id: "alternity-cny", - cmcId: null, - pegType: "peggedCNY", - pegMechanism: "crypto-backed", - priceSource: "coingecko", - auditLinks: null, - twitter: "https://twitter.com/0xAlternity", - wiki: "https://docs.alternity.finance/faq/redemptions-and-lcny-price-stability", -}, -{ - id: "128", - name: "Nexus", - address: "0x92211b6B68a39F4f68E722f3A3A4810A2Ebc8383", - symbol: "NEX", - url: "https://nexus.zdex.tech/", - description: - "Nexus (NEX) is a revolutionary decentralized finance (DeFi) project that introduces a unique combination of security, scalability, and stability to the Ethereum network and Layer 2 solutions.", - mintRedeemDescription: - "Users can trade their NEX token on a uniswap pool.(no redeem process)", - onCoinGecko: "true", - gecko_id: "nexus1", - cmcId: null, - pegType: "peggedUSD", - pegMechanism: "algorithmic", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/Nexus_ZDex", - wiki: "https://docs.zdex.tech/", -}, -{ - id: "129", - name: "Ondo US Dollar Yield", - address: "0x96f6ef951840721adbf46ac996b59e0235cb985c", - symbol: "USDY", - url: "https://ondo.finance", - description: - "USDY is a tokenized note secured by short-term US Treasuries and bank demand deposits, bringing institutional-grade low-risk yield to the global on-chain economy.", - mintRedeemDescription: - "USDY is accessible to non-US individual and institutional investors and is transferable on-chain 40-50 days after purchase. Users request to mint USDY by sending us USDC. After 40 day mint restriction is lifted it will mint USDY tokens", - onCoinGecko: "true", - gecko_id: "ondo-us-dollar-yield", - cmcId: null, - pegType: "peggedUSD", - pegMechanism: "fiat-backed", - priceSource: "coingecko", - auditLinks: null, - twitter: "https://twitter.com/ondofinance", - wiki: "https://docs.ondo.finance/general-access-products/usdy/faq/", -}, -{ - id: "130", - name: "Savvy USD", - address: "0xf202ab403cd7e90197ec0f010ee897e283037706", - symbol: "SVUSD", - url: "https://savvydefi.io", - description: - "Access non-liquidating, auto-repaying, 0% interest loans that give you an immediate advance on your future yield.", - mintRedeemDescription: - "svUSD are created when users deposit accepted Stablescoins like USDC, USDT, DAI, and more into Savvy protocol. Borrowing is capped at 50% of the value of the collateral deposited.", - onCoinGecko: "true", - gecko_id: "savvy-usd", - cmcId: null, - pegType: "peggedUSD", - pegMechanism: "fiat-backed", - priceSource: "coingecko", - auditLinks: null, - twitter: "https://twitter.com/SavvyDefi", - wiki: "https://app.savvydefi.io/dashboard", -}, -{ - id: "131", - name: "UAHT", - address: "0x0D9447E16072b636b4a1E8f2b8C644e58F3eaA6A", - symbol: "UAHT", - url: "https://uaht.io", - description: - "Welcome to the platform where people matter.", - mintRedeemDescription: - "UAHT is pegged to UAH Ukraine Currency", - onCoinGecko: "true", - gecko_id: "uaht", - cmcId: null, - pegType: "peggedUAH", - pegMechanism: "fiat-backed", - priceSource: "coingecko", - auditLinks: null, - twitter: "https://twitter.com/starscrowding", - wiki: "https://github.com/starscrowding/UAHT#readme", -}, -{ - id: "132", - name: "USDM", - address: "0x59d9356e565ab3a36dd77763fc0d87feaf85508c", - symbol: "USDM", - url: "https://mountainprotocol.com", - description: - "The USDM Token is an ERC20 rebasing token, with a redemption value pegged at 1:1 for primary customers. Like other fiat-backed stablecoins, we expect a 1:~1 in secondary market price, driven by arbitrage opportunities.", - mintRedeemDescription: - "Users can purchase USDM with USDC. Balances will be credited in the platform when funds settle (usually in seconds) and are ready to withdraw.", - onCoinGecko: "true", - gecko_id: "mountain-protocol-usdm", - cmcId: null, - pegType: "peggedUSD", - pegMechanism: "fiat-backed", - priceSource: "coingecko", - auditLinks: null, - twitter: "https://twitter.com/MountainUSDM", - wiki: "https://docs.mountainprotocol.com/reference/usdm-token", -}, -{ - id: "133", - name: "NARS", - address: "0x65517425ac3ce259a34400bb67ceb39ff3ddc0bd", - symbol: "NARS", - url: "https://num.finance/stablecoins", - description: - "Seamlessly scale your financial operations globally.On Ramps, Loans and Yields.", - mintRedeemDescription: - "Num-S are collateralized stablecoins, minted and issued by Num Finance.", - onCoinGecko: "true", - gecko_id: "num-ars", - cmcId: null, - pegType: "peggedARS", - pegMechanism: "fiat-backed", - priceSource: "coingecko", - auditLinks: null, - twitter: "https://twitter.com/Num_Finance", - wiki: "https://num.finance/transparency", -}, -{ - id: "134", - name: "Phase Dollar", - address: "base:0xbe92452bb46485AF3308e6d77786bFBE3557808d", - symbol: "CASH", - url: "https://phase.cash", - description: - "Every $CASH token is backed with 1 USD or more worth of assets. Due to protocol fees, $CASH incurs a premium to its price, which is captured by the protocol for backing.", - mintRedeemDescription: - "Minting is done via first depositing collateral into the vaults, and then minting/borrowing the stable. Redeeming/paying back/burning the stable (action burns it under the hood) lets the user pay back their debt to the vault, unlocking their collateral", - onCoinGecko: "true", - gecko_id: "phase-dollar", - cmcId: null, - pegType: "peggedUSD", - pegMechanism: "fiat-backed", - priceSource: "coingecko", - auditLinks: null, - twitter: "https://twitter.com/0xPhase", - wiki: "https://docs.phase.cash/protocol/what-is-phase", -}, -{ - id: "135", - name: "Inter Stable Token", - address: null, - symbol: "IST", - url: "https://inter.trade/", - description: - "IST is the over-collateralized, risk-managed stable token for the interchain.", - mintRedeemDescription: - "Inter Protocol's Vaults let you mint IST against the value of your IBC assets (like ATOM) to unlock liquidity. IST minters actively manage their positions to avoid liquidations if their asset value falls. Anyone can participate in bidding on liquidation auctions to profit from auctioned collateral.", - onCoinGecko: "true", - gecko_id: "inter-stable-token", - cmcId: 22736, - pegType: "peggedUSD", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: "https://assets.ctfassets.net/xm0kp9xt5r54/1pucZFh1QsF1PgL5vhGAtS/054cd042b32f962fce8843758d6f3483/Atredis_Partners_-_Agoric_Vaults_Implementation_Assessment__-_Report_v1.0___1_.pdf", - twitter: "https://twitter.com/inter_protocol", - wiki: "https://docs.inter.trade/", -}, -{ - id: "136", - name: "e-Money Eur", - address: null, - symbol: "EEUR", - url: "https://e-money.com", - description: - "e-Money EUR stablecoin. Audited and backed by fiat EUR deposits and government bonds.", - mintRedeemDescription: - "Unlike most existing stablecoins which aim to maintain a static 1:1 peg with their underlying assets, the value of e-Money's currency-backed tokens continually shifts in line with the interest accrued on the reserve assets. This means that holders benefit from the interest accrued on their assets while they sit securely in your wallet.", - onCoinGecko: "true", - gecko_id: "e-money-eur", - cmcId: 13877, - pegType: "peggedEUR", - pegMechanism: "fiat-backed", - priceSource: "defillama", - auditLinks: null, - twitter: "https://twitter.com/emoney_com", - wiki: null, -}, -{ - id: "137", - name: "Membrane", - address: null, - symbol: "CDT", - url: "https://membrane-ui-mainnet.vercel.app/", - description: - "Membrane is an experimental protocol that uses collateralized debt positions to synthesize credit demand into composable debt tokens that traverse the Cosmos in the form of $CDT.", - mintRedeemDescription: - "The mechanism is roughly analogous to a “Line of Credit”, wherein vault owners can deposit their collateral to receive a line of credit against it. This unique functionality enables a large amount of flexibility in otherwise rigid token positions.", - onCoinGecko: "false", - gecko_id: "membrane", - cmcId: null, - pegType: "peggedVAR", - pegMechanism: "crypto-backed", - priceSource: "defillama", - auditLinks: "https://github.com/oak-security/audit-reports/blob/master/Membrane/2023-06-15%20Audit%20Report%20-%20Membrane%20v1.0.pdf", - twitter: "https://twitter.com/insaneinthembrn", - wiki: "https://membrane-finance.gitbook.io/", -}, -{ - id: "138", - name: "ARYZE eUSD", - address: "0xa4335da338ec4C07C391Fc1A9bF75F306adadc08", - symbol: "eUSD", - url: "https://aryze.io", - description:"Digital Cash by ARYZE is a stablecoin fully backed by government-issued assets such as US T-bills, cash, or European Bonds, providing a stable and secure alternative to traditional fiat currencies.", - mintRedeemDescription:"Minting Digital Cash involves depositing a major currency or equivalent asset with trusted third-party brokers. Upon confirmation of the deposit, the corresponding amount of Digital Cash is minted and credited to the user’s account. Redemption involves converting Digital Cash back into the underlying assets or major currencies through these brokers.", - onCoinGecko: "true", - gecko_id: "aryze-eusd", - cmcId: null, - pegType: "peggedUSD", - pegMechanism: "fiat-backed", - priceSource: "coingecko", - auditLinks: "https://3838260506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTmzl9GX7emUArB9s00Rz%2Fuploads%2FvK1ML7oM7IwFeeR3bHaF%2FARYZE%20-%20eEUR%2C%20eGBP%2C%20eUSD%20and%20RYZE%20Code%20Audit.pdf?alt=media&token=0e1f74c0-0278-42bb-a7cd-c22ea0bf7b5d", - twitter: "https://twitter.com/ARYZEofficial", - wiki: "https://docs.aryze.io/en/products-and-services/aryze-digital-cash", -}, -{ - id: "139", - name: "ARYZE eEUR", - address: "0x735fa792e731a2e8F83F32eb539841b7B72e6d8f", - symbol: "eEUR", - url: "https://aryze.io", - description:"Digital Cash by ARYZE is a stablecoin fully backed by government-issued assets such as US T-bills, cash, or European Bonds, providing a stable and secure alternative to traditional fiat currencies.", - mintRedeemDescription:"Minting Digital Cash involves depositing a major currency or equivalent asset with trusted third-party brokers. Upon confirmation of the deposit, the corresponding amount of Digital Cash is minted and credited to the user’s account. Redemption involves converting Digital Cash back into the underlying assets or major currencies through these brokers.", - onCoinGecko: "true", - gecko_id: "aryze-eeur", - cmcId: null, - pegType: "peggedEUR", - pegMechanism: "fiat-backed", - priceSource: "coingecko", - auditLinks: "https://3838260506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTmzl9GX7emUArB9s00Rz%2Fuploads%2FvK1ML7oM7IwFeeR3bHaF%2FARYZE%20-%20eEUR%2C%20eGBP%2C%20eUSD%20and%20RYZE%20Code%20Audit.pdf?alt=media&token=0e1f74c0-0278-42bb-a7cd-c22ea0bf7b5d", - twitter: "https://twitter.com/ARYZEofficial", - wiki: "https://docs.aryze.io/en/products-and-services/aryze-digital-cash", -}, -{ - id: "140", - name: "ARYZE eGBP", - address: "0xD711D7D893de57dc13Ff465763218770Bd42DB1D", - symbol: "eGBP", - url: "https://aryze.io", - description:"Digital Cash by ARYZE is a stablecoin fully backed by government-issued assets such as US T-bills, cash, or European Bonds, providing a stable and secure alternative to traditional fiat currencies.", - mintRedeemDescription:"Minting Digital Cash involves depositing a major currency or equivalent asset with trusted third-party brokers. Upon confirmation of the deposit, the corresponding amount of Digital Cash is minted and credited to the user’s account. Redemption involves converting Digital Cash back into the underlying assets or major currencies through these brokers.", - onCoinGecko: "true", - gecko_id: "aryze-egbp", - cmcId: null, - pegType: "peggedGBP", - pegMechanism: "fiat-backed", - priceSource: "coingecko", - auditLinks: "https://3838260506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTmzl9GX7emUArB9s00Rz%2Fuploads%2FvK1ML7oM7IwFeeR3bHaF%2FARYZE%20-%20eEUR%2C%20eGBP%2C%20eUSD%20and%20RYZE%20Code%20Audit.pdf?alt=media&token=0e1f74c0-0278-42bb-a7cd-c22ea0bf7b5d", - twitter: "https://twitter.com/ARYZEofficial", - wiki: "https://docs.aryze.io/en/products-and-services/aryze-digital-cash", -}, -// Pending for 100% backing, will be added soon -// { -// id: "141", -// name: "ARYZE eSGD", -// address: "0x58A849E1f3c7044bB317DB4611269c352c53d399", -// symbol: "eSGD", -// url: "https://aryze.io", -// description:"Digital Cash by ARYZE is a stablecoin fully backed by government-issued assets such as US T-bills, cash, or European Bonds, providing a stable and secure alternative to traditional fiat currencies.", -// mintRedeemDescription:"Minting Digital Cash involves depositing a major currency or equivalent asset with trusted third-party brokers. Upon confirmation of the deposit, the corresponding amount of Digital Cash is minted and credited to the user’s account. Redemption involves converting Digital Cash back into the underlying assets or major currencies through these brokers.", -// onCoinGecko: "true", -// gecko_id: "aryze-esgd", -// cmcId: null, -// pegType: "peggedSGD", -// pegMechanism: "government-backed", -// priceSource: "coingecko", -// auditLinks: "https://3838260506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTmzl9GX7emUArB9s00Rz%2Fuploads%2FvK1ML7oM7IwFeeR3bHaF%2FARYZE%20-%20eEUR%2C%20eGBP%2C%20eUSD%20and%20RYZE%20Code%20Audit.pdf?alt=media&token=0e1f74c0-0278-42bb-a7cd-c22ea0bf7b5d", -// twitter: "https://twitter.com/ARYZEofficial", -// wiki: "https://docs.aryze.io/en/products-and-services/aryze-digital-cash", -// }, -{ - id: "142", - name: "HYDT", - address: "0x9810512be701801954449408966c630595d0cd51", - symbol: "HYDT", - url: "https://hydtprotocol.com/", - description:"HYDT Protocol offers industry leading high returns on HYDT Stablecoin Staking, along with decentralization, transparency and sustainability.", - mintRedeemDescription:"HYDT can be exchanged for other USD stablecoins on exchanges, but the protocol does not provide direct 1:1 redemption for users. While the protocol will automatically mint/redeem HYDT to make the HYDT price close to 1 USD, your redemption rate will depend on the HYDT/USD exchange rate at the time.", - onCoinGecko: "true", - gecko_id: "hydt-protocol-hydt", - cmcId: null, - pegType: "peggedUSD", - pegMechanism: "algorithmic", - priceSource: "coingecko", - auditLinks: null, - twitter: "https://twitter.com/HydtProtocol", - wiki: "https://hydtprotocol.com/#faqs", -}, -{ - id: "143", - name: "Verified USD", - address: "0x0e573ce2736dd9637a0b21058352e1667925c7a8", - symbol: "USDV", - url: "https://usdv.money", - description:"Verified USD (USDV) is a tokenized real world asset (RWA) backed stablecoin built for modern finance.", - mintRedeemDescription:"USDV can be minted by approved entities called Minters through agreements with the issuing entity. Once purchased by Minters, USDV can circulate freely to anyone. There are no restrictions on who can hold or use USDV. For example, a user could swap ETH for USDV on a DEX", - onCoinGecko: "true", - gecko_id: "verified-usd-foundation-usdv", - cmcId: "28443", - pegType: "peggedUSD", - pegMechanism: "fiat-backed", - priceSource: "coingecko", - auditLinks: null, - twitter: "https://twitter.com/usdv_money", - wiki: "https://docs.usdv.money/docs/what-is-usdv/faq", -}, -{ - id: "144", - name: "High Yield USD", - address: "0xacdf0dba4b9839b96221a8487e9ca660a48212be", - symbol: "HYUSD", - url: "https://linktr.ee/hyusd", - description:"hyUSD is a secure high yield savings flatcoin with up to 6% rewards outpacing inflation in over 100 countries around the world.", - mintRedeemDescription:"Minting requires a deposit of the defined collateral tokens in equal value amounts to the RToken smart contracts.", - onCoinGecko: "true", - gecko_id: "high-yield-usd", - cmcId: null, - pegType: "peggedUSD", - pegMechanism: "algorithmic", - priceSource: "coingecko", - auditLinks: null, - twitter: "https://twitter.com/HighYieldUSD", - wiki: "https://linktr.ee/hyusd", -}, -{ - id: "145", - name: "CAD Coin", - address: "0xcadc0acd4b445166f12d2c07eac6e2544fbe2eef", - symbol: "CADC", - url: "https://paytrie.com/cadc", - description:"CADC tokens are fully backed 1:1 with Canadian Dollars held in a bank account in Canada.", - mintRedeemDescription:"CADC is issued by PAYTRIE AB Inc., a FINTRAC regulated Money Services Business (M19690633), and backed by fully reserved assets, and redeemable on a 1:1 basis for Canadian dollars", - onCoinGecko: "true", - gecko_id: "cad-coin", - cmcId: "8690", - pegType: "peggedCAD", - pegMechanism: "fiat-backed", - priceSource: "coingecko", - auditLinks: null, - twitter: "https://twitter.com/PayTrie", - wiki: "https://faq.paytrie.com/help/what-is-the-cadc-address", -}, -{ - id: "146", - name: "Ethena USDe", - address: "0x4c9EDD5852cd905f086C759E8383e09bff1E68B3", - symbol: "USDe", - url: "https://www.ethena.fi", - description:"Ethereum enabled crypto-native synthetic dollar which provides an embedded yield to users and achieves price stability through delta-neutral hedging across centralized and decentralized venues", - mintRedeemDescription:"Ethena enables users to deposit either USD, Ethereum or liquid staking tokens as collateral to create USDe. Stability is ensured through delta-neutral hedging process across centralized and decentralized exchanges.", - onCoinGecko: "true", - gecko_id: "ethena-usde", - cmcId: null, - pegType: "peggedUSD", - pegMechanism: "fiat-backed", - priceSource: "coingecko", - auditLinks: null, - twitter: "https://twitter.com/ethena_labs", - wiki: "https://www.ethena.fi", -}, -{ - id: "147", - name: "Anchored Coins AEUR", - address: "0xA40640458FBc27b6EefEdeA1E9C9E17d4ceE7a21", - symbol: "AEUR", - url: "https://anchoredcoins.com", - description: - "AEUR is a Euro-backed stablecoin issued natively on the Ethereum and BNB Blockchain. Each AEUR is backed 1:1 by EUR held in the appointed reserve bank.", - mintRedeemDescription: - "To initiate using AEUR, you can create an account on one of the supported exchanges to purchase or trade. Alternatively, you can verify your identity to become Anchored Coins' client and deposit EUR into the designated bank account provided. To redeem or sell AEUR for EUR, you can effortlessly trade on secondary markets such as centralized/decentralized exchanges or dApps which support AEUR. For sizable redemptions, please get in touch with the team.", - onCoinGecko: "true", - gecko_id: "anchored-coins-eur", - cmcId: "28596", - pegType: "peggedEUR", - pegMechanism: "fiat-backed", - priceSource: "defillama", - auditLinks: null, - twitter: null, - wiki: null, -}, + id: "96", + name: "Coin98 Dollar", + address: "bsc:0xfa4ba88cf97e282c505bea095297786c16070129", + symbol: "CUSD", + url: "https://coin98.com/dollar", + description: + "CUSD is a decentralized stablecoin that is fully collateralized by assets in reserve", + mintRedeemDescription: + "In order to convert to 1 CUSD, a total of $1 worth of the collateralized assets must be sent into the CUSD Reserve smart contract. Specifically, in the initial phase, the collateral ratio to convert to 1 CUSD will be $1 worth of fiat-backed stablecoins - BUSD (on BNB Chain) and USDC (on Solana and Ethereum)", + onCoinGecko: "true", + gecko_id: "coin98-dollar", + cmcId: "21871", + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/coin98_wallet", + wiki: null, + }, + { + id: "97", + name: "USP Stablecoin", + address: "avax:0xdaCDe03d7Ab4D81fEDdc3a20fAA89aBAc9072CE2", + symbol: "USP", + url: "https://app.platypus.finance/usp", + description: + "An over-collateralized ERC-20 stablecoin built on the Platypus stableswap", + mintRedeemDescription: + "Users can deposits collateral into the Platypus Main Pool and stake their LP tokens into the MasterPlatypus to farm PTP. At the same time, it is possible for users to mint USP based on the the collateral factor", + onCoinGecko: "false", + gecko_id: "platypus-usd", + cmcId: "20962", + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/Platypusdefi", + wiki: null, + }, + { + id: "98", + name: "EUROe Stablecoin", + address: "0x820802Fa8a99901F52e39acD21177b0BE6EE2974", + symbol: "EUROe", + url: "https://www.euroe.com/", + description: + "EUROe is a fully fiat-backed multichain euro stablecoin. EUROe is issued by Membrane Finance Oy, an electronic money institution registered in Finland. EUROe is a MiCA-compliant stablecoin.", + mintRedeemDescription: + "Anyone with a EUROe Account can redeem and mint EUROe with fiat euros in a 1:1 ratio, either through a UI or using EUROe Account APIs.", + onCoinGecko: "true", + gecko_id: "euroe-stablecoin", + cmcId: null, + pegType: "peggedEUR", + pegMechanism: "fiat-backed", + priceSource: "defillama", + auditLinks: ["https://dev.euroe.com/docs/Stablecoin/audits"], + twitter: "https://twitter.com/EUROemoney", + wiki: null, + }, + { + id: "99", + name: "Stabl.fi Cash", + address: "polygon:0x80487b4f8f70e793a81a42367c225ee0b94315df", + symbol: "CASH", + url: "https://www.stabl.fi/swap", + description: + "$CASH is a stable indexcoin pegged to the weighted average of a basket of stablecoin collaterals", + mintRedeemDescription: + "Using the Stabl.fi app, users can borrow $CASH by depositing stablecoins as collateral. When the loan is repaid to retrieve the collateral, the paid back $CASH is burned.", + onCoinGecko: "true", + gecko_id: "stabl-fi", + cmcId: "21703", + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/Stabl_Fi", + wiki: null, + }, + { + id: "100", + name: "Digital Standard Unit", + address: "0x605d26fbd5be761089281d5cec2ce86eea667109", + symbol: "DSU", + url: "https://www.dsu.money/", + description: + "Digital Standard Unit is a wrapper for stablecoins. The protocol consumes a particular collateral, places it into a reserve and issues a stablecoin, known as DSU, against it", + mintRedeemDescription: + "Users are able to mint DSU by providing the specified collateral, currently this is USDC. They are also able to redeem USDC from DSU at a 1-to-1 ratio with DSU", + onCoinGecko: "true", + gecko_id: "digital-standard-unit", + cmcId: null, + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/dsumoney", + wiki: null, + }, + { + id: "101", + name: "Monerium EUR emoney", + address: "0x3231cb76718cdef2155fc47b5286d82e6eda273f", + symbol: "EURE", + url: "https://monerium.com/tokens/", + description: + "Monerium EUR e-money (EURE) is a digital currency issued by Monerium, an electronic money institution licensed and regulated by the Financial Supervisory Authority of Iceland. EURE is a stablecoin that is pegged to the Euro at a 1:1 ratio", + mintRedeemDescription: + "To mint Monerium EUR e-money (EURE), users need to first create an account with Monerium and complete the required KYC and AML checks. Once the account is approved, users can then fund their account with Euros via bank transfer", + onCoinGecko: "true", + gecko_id: "monerium-eur-money", + cmcId: "20920", + pegType: "peggedEUR", + pegMechanism: "fiat-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/monerium", + wiki: null, + }, + { + id: "102", + name: "Offshift anonUSD", + address: "0x5a7e6c8204a1359db9aacab7ba5fc309b7981efd", + symbol: "ANONUSD", + url: "https://offshift.io/", + description: + "Offshift anon is an on-chain, non-custodial platform that preserves user privacy while maintaining yield potential. Users can burn XFT to mint on-chain synthetics called anonAssets via Shifting, which makes them anonymous. AnonAssets are standard ERC20 tokens, eliminating yield-related tradeoffs associated with privacy", + mintRedeemDescription: + "To mint synthetics in the Offshift Ecosystem, users select and open a PriFi Application, and connect an ERC20 wallet. If a user possesses a positive XFT balance and sufficient ETH to cover gas fees, he/she may conduct a **Shift** and enter the Offshift Ecosystem’s private (anonymous and/or confidential) side via the Burn-and-Mint Mechanism", + onCoinGecko: "true", + gecko_id: "offshift-anonusd", + cmcId: "23729", + pegType: "peggedUSD", + pegMechanism: "algorithmic", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/OffshiftXFT", + wiki: null, + }, + { + id: "103", + name: "NXUSD", + address: "0xf14f4ce569cb3679e99d5059909e23b07bd2f387", + symbol: "NXUSD", + url: "https://nxusd.nereus.finance/", + description: + "NXUSD is an over-collateralized USD-pegged stablecoin minted by Nereus Finance", + mintRedeemDescription: + "Collateral tokens are deposited on Nereus Finance.A debt allocation is assigned to the borrower with ZERO INTEREST, plus an origination fee of 0.5% is charged.NXUSD tokens are deposited into the borrower's wallet.", + onCoinGecko: "true", + gecko_id: "nxusd", + cmcId: "19538", + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: ["https://docs.nereus.finance/nereus-protocol/security-audit"], + twitter: "https://twitter.com/nereusfinance", + wiki: null, + }, + { + id: "104", + name: "Davos Protocol", + address: "0xec38621e72d86775a89c7422746de1f52bba5320", + symbol: "DUSD", + url: "https://davos.xyz/", + description: + "Davos Protocol is an innovative collateralized debt position (CDP) protocol that tackles the limitations of traditional CDPs in the DeFi landscape. It achieves this by implementing an unbiased monetary policy and fair borrowing rates, ensuring user protection and fostering widespread DeFi adoption. Notably, users retain the upside of their collateral, preserving their potential returns.", + mintRedeemDescription: + "Using the Davos Protocol, users have the opportunity to borrow the DAVOS Stable Asset, initially using their staked MATIC assets as collateral. Users can borrow up to 66% of the value of their MATIC collateral", + onCoinGecko: "true", + gecko_id: "davos-protocol", + cmcId: "23515", + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: [ + "https://github.com/davos-money/new-davos-smart-contracts/tree/main/audits", + ], + twitter: "https://twitter.com/Davos_Protocol", + wiki: null, + }, + { + id: "105", + name: "DeFi Franc", + address: "0x045da4bfe02b320f4403674b3b7d121737727a36", + symbol: "DCHF", + url: "https://www.defifranc.com/", + description: + "The DeFi Franc (DCHF) is a decentralized stablecoin, pegged to the Swiss Franc. The DeFi Franc is over-collateralized and is created through loans which are backed by ETH and WBTC", + mintRedeemDescription: + "DCHF can be borrowed using ETH and BTC assets as collateral. Users can borrow up to 90% of the value of their ETH or BTC collateral and every DCHF is 100% redeemable for ETH worth 1 CHF", + onCoinGecko: "true", + gecko_id: "defi-franc", + cmcId: "22249", + pegType: "peggedVAR", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/monetadao", + wiki: null, + }, + { + id: "106", + name: "Electronic USD", + address: "0xa0d69e286b938e21cbf7e51d71f6a4c8918f482f", + symbol: "EUSD", + url: "https://register.app/#/overview?token=0xA0d69E286B938e21CBf7E51D71F6A4c8918f482F", + description: + "The eUSD RToken is a fully collateralized US-dollar stablecoin built on the Reserve Protocol", + mintRedeemDescription: + "Minting requires a deposit of the defined collateral tokens in equal value amounts to the RToken smart contracts", + onCoinGecko: "true", + gecko_id: "electronic-usd", + cmcId: "22933", + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/reserveprotocol", + wiki: null, + }, + { + id: "107", + name: "Czodiac USD", + address: "bsc:0xE68b79e51bf826534Ff37AA9CeE71a3842ee9c70", + symbol: "CZUSD", + url: "https://czodiac.com/", + description: + "The CZUSD peg to BUSD is maintained by the innovative ScorchPeg system. The ScorchPeg holds a portion of BUSD in reserve and utilizes it to keep CZUSD at a steady $1 value through trades on Pancakeswap. During normal market conditions, the peg remains strong, however, during periods of stress, the ScorchPeg will temporarily pause, and CZUSD will be allowed to float.", + mintRedeemDescription: "CZUSD and BUSD swapping.", + onCoinGecko: "true", + gecko_id: "czusd", + cmcId: "19366", + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/zodiacs_c", + wiki: null, + }, + { + id: "108", + name: "Deuterium", + address: "moonbeam:0xc806B0600cbAfA0B197562a9F7e3B9856866E9bF", + symbol: "d2O", + url: "https://dam.finance", + description: + "d2o is an omnichain native stablecoin with a soft-peg to the United States Dollar", + mintRedeemDescription: "Add colateral in order to mint d2O.", + onCoinGecko: "true", + gecko_id: "dam-finance", + cmcId: "23529", + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/DAM_Finance", + wiki: null, + }, + { + id: "109", + name: "eUSD", + address: "0x97de57ec338ab5d51557da3434828c5dbfada371", + symbol: "EUSD", + url: "https://lybra.finance/eusd", + description: + "eUSD is an interest-bearing stablecoin hard-pegged to the US dollar", + mintRedeemDescription: + "Users deposit ETH & stETH as collateral with an excess collateral ratio of 150% to maintain safety and decentralization", + onCoinGecko: "true", + gecko_id: "eusd-27a558b0-8b5b-4225-a614-63539da936f4", + cmcId: "25013", + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/LybraFinanceLSD", + wiki: null, + }, + { + id: "110", + name: "crvUSD", + address: "0x95ECDC6caAf7E4805FCeF2679A92338351D24297", + symbol: "crvUSD", + url: "https://curve.fi", + description: + "crvUSD is a collateralized-debt-position (CDP) stablecoin pegged to the US Dollar", + mintRedeemDescription: "Users deposit collateral to borrow crvUSD", + onCoinGecko: "false", + gecko_id: "crvusd", + cmcId: null, + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/CurveFinance", + wiki: null, + }, + { + id: "111", + name: "DAI+", + address: "optimism:0x970d50d09f3a656b43e11b0d45241a84e3a6e011", + symbol: "DAI+", + url: "https://overnight.fi/", + description: + "DAI+ is DAI that pays yield daily via rebase. The DAI+ stablecoin can be instantly minted and redeemed to DAI 1:1.", + mintRedeemDescription: + "Using the Overnight app, users swap DAI to mint DAI+ 1:1. DAI+ can be redeemed for DAI 1:1 at any time.", + onCoinGecko: "true", + gecko_id: "overnight-dai", + cmcId: null, + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/overnight_fi", + wiki: null, + }, + { + id: "112", + name: "USDT+", + address: "bsc:0x5335e87930b410b8c5bb4d43c3360aca15ec0c8c", + symbol: "USDT+", + url: "https://overnight.fi/", + description: + "USDT+ is USDT that pays yield daily via rebase. The USDT+ stablecoin can be instantly minted and redeemed to USDT 1:1.", + mintRedeemDescription: + "Using the Overnight app, users swap USDT to mint USDT+ 1:1. USDT+ can be redeemed for USDT 1:1 at any time.", + onCoinGecko: "true", + gecko_id: "usdtplus", + cmcId: null, + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/overnight_fi", + wiki: null, + }, + { + id: "113", + name: "SILK", + address: null, + symbol: "SILK", + url: "https://app.shadeprotocol.io", + description: + "SILK is a collateralized stablecoin with a variable peg that is derived from a basket of assets including forex, commodities, and cryptocurrencies. The basket is designed to maintain purchasing power.", + mintRedeemDescription: + "Using ShadeLend, users deposit collateral to borrow / mint SILK. When users repay their loan, the SILK is burned", + onCoinGecko: "false", + gecko_id: "silk-bcec1136-561c-4706-a42c-8b67d0d7f7d2", + cmcId: null, + pegType: "peggedVAR", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/Shade_Protocol", + wiki: null, + }, + { + id: "114", + name: "CLever USD", + address: "0x3C20Ac688410bE8F391bE1fb00AFc5C212972F86", + symbol: "clevUSD", + url: "https://clever.aladdin.club/", + description: + "ClevUSD are synthetic versions of their associated real token, representing the future yield of CLever strategies. Each clevToken is backed by one or more equivalent real Tokens in the system.", + mintRedeemDescription: + "ClevUSD can be farmed in CLever liquidity pools or swapped for more of the original token.", + onCoinGecko: "true", + gecko_id: "clever-usd", + cmcId: null, + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/0xc_lever", + wiki: null, + }, + { + id: "115", + name: "R", + address: "0x183015a9bA6fF60230fdEaDc3F43b3D788b13e21", + symbol: "R", + url: "https://raft.fi/", + description: + "R is the most capital-efficient USD stablecoin backed by high-quality collateral assets such as stETH (Lido Staked Ether) and rETH (Rocket Pool ETH) and reserve assets such as CHAI, the yield-bearing version of the DAI stablecoin.", + mintRedeemDescription: + "Users can deposit any accepted collateral asset of their choice to generate R, and enjoy capital-efficient borrowing.", + onCoinGecko: "true", + gecko_id: "r", + cmcId: "24404", + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: [ + "https://github.com/trailofbits/publications/blob/master/reviews/2023-04-tempus-raft-securityreview.pdf", + ], + twitter: "https://twitter.com/raft_fi", + wiki: null, + }, + { + id: "116", + name: "GRAI", + address: "0x15f74458aE0bFdAA1a96CA1aa779D715Cc1Eefe4", + symbol: "GRAI", + url: "https://www.gravitaprotocol.com/", + description: + "Gravita Protocol is an ETH-centric Borrowing Protocol for LSTs and Yield-Generating assets. GRAI is the debt token of the platform. Our motto is: fueling decentralization.", + mintRedeemDescription: + "Users deposit LSTs or BLUSD as collateral to generate the debt token GRAI.", + onCoinGecko: "true", + gecko_id: "grai", + cmcId: "25337", + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: [ + "https://www.gravitaprotocol.com/audits/gravita-audit-report-dedaub-apr-23-2023.pdf", + "https://www.gravitaprotocol.com/audits/gravita-audit-report-omniscia-may-17-2023.pdf", + "https://hatsfinance.medium.com/gravita-audit-competition-final-writeup-dfb28463a0dc", + ], + twitter: "https://twitter.com/gravitaprotocol", + wiki: "https://docs.gravitaprotocol.com/", + }, + { + id: "117", + name: "Ethos Reserve Note", + address: "optimism:0xc5b001dc33727f8f26880b184090d3e252470d45", + symbol: "ERN", + url: "https://www.ethos.finance/", + description: + "Ethos Reserve is a decentralized lending protocol that allows users to take out interest-free loans against collateral such as BTC and ETH.", + mintRedeemDescription: + "Loans drawn from Ethos Reserve require users to maintain a minimum amount of collateral in the system to cover their debt. These collateral ratios are as low as 108% for ETH, 120% for BTC, and may be lowered over time depending on usage", + onCoinGecko: "true", + gecko_id: "ethos-reserve-note", + cmcId: "24370", + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: [], + twitter: "https://twitter.com/EthosReserve", + wiki: null, + }, + { + id: "118", + name: "GHO", + address: "0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f", + symbol: "GHO", + url: "https://app.aave.com/", + description: + "GHO is a native decentralized, overcollateralized digital asset pegged to USD.", + mintRedeemDescription: + "It is created by users via borrowing against multiple collateral. When user repays their GHO borrow position, the protocol burns that user's GHO. All the interest payments accrued by minters of GHO would be directly transferred to the AaveDAO treasury.", + onCoinGecko: "true", + gecko_id: "gho", + cmcId: "23508", + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: ["https://github.com/aave/gho-core/tree/main/audits"], + twitter: "https://twitter.com/GHOAave", + wiki: "https://docs.gho.xyz", + }, + { + id: "119", + name: "First Digital USD", + address: "0xc5f0f7b66764f6ec8c8dff7ba683102295e16409", + symbol: "FDUSD", + url: "https://firstdigitallabs.com", + description: + "Each FDUSD is intended to be fully backed by one US dollar or an asset of equivalent fair value.", + mintRedeemDescription: + "To redeem your FDUSD stablecoin, you must first become a client of First Digital Labs and meet specific requirements, including Anti-Money Laundering (AML) and Counter-Terrorism Financing (CTF) checks. Upon successful completion of these checks, you can exchange your FDUSD for its equivalent in fiat currency, thereby taking it out of circulation. Alternatively, you can sell your FDUSD tokens on the secondary market through a cryptocurrency exchange or an Over-the-Counter (OTC) provider that supports FD121's stablecoins. ", + onCoinGecko: "true", + gecko_id: "first-digital-usd", + cmcId: "26081", + pegType: "peggedUSD", + pegMechanism: "fiat-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/FDLabsHQ", + wiki: null, + }, + { + id: "120", + name: "PayPal USD", + address: "0x6c3ea9036406852006290770BEdFcAbA0e23A0e8", + symbol: "PYUSD", + url: "https://www.paypal.com/pyusd", + description: + "PayPal USD is designed to maintain a stable $1 USD value. It's backed by dollar deposits, US treasuries, and cash equivalents", + mintRedeemDescription: + "As PayPal USD rolls out, users will be able to buy, sell, hold, and transfer it in the PayPal app or on their site", + onCoinGecko: "true", + gecko_id: "paypal-usd", + cmcId: null, + pegType: "peggedUSD", + pegMechanism: "fiat-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/PayPal", + wiki: null, + }, + { + id: "121", + name: "PSY", + address: "0x63D4dc5376cfB48a885A165cd97BA208b87881c7", + symbol: "sLSD", + url: "https://www.psy.money/", + description: + "PSY protocol offers a unique borrowing experience that is both interest-free and highly capital efficient. This means that for the same loan, less collateral is required compared to other borrowing systems. Instead of selling your collateral like wstETH or rETH to have liquid funds, you can use the protocol to lock up your collaterals, borrow against the collateral to withdraw SLSD, and then repay your loan at a future date.", + mintRedeemDescription: + "To borrow you must open a Trove and deposit a certain amount of collateral to it. Then you can draw SLSD up to a collateral ratio of 110%. A minimum debt of 2,000 SLSD is required.", + onCoinGecko: "false", + gecko_id: null, + cmcId: null, + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/PSY_stablecoin", + wiki: null, + }, + { + id: "122", + name: "GYEN", + address: "0xc08512927d12348f6620a698105e1baac6ecd911", + symbol: "GYEN", + url: "https://stablecoin.z.com", + description: "The First Regulated Digital JPY", + mintRedeemDescription: + "You need to make an account (Institutional or Individual) in order to redeem GYEN for JPY", + onCoinGecko: "true", + gecko_id: "gyen", + cmcId: "8771", + pegType: "peggedJPY", + pegMechanism: "fiat-backed", + priceSource: "coingecko", + auditLinks: null, + twitter: "https://twitter.com/GMOTrust", + wiki: null, + }, + { + id: "123", + name: "STAR", + address: "0xC19669A405067927865B40Ea045a2baabbbe57f5", + symbol: "STAR", + url: "https://www.preon.finance/", + description: + "Preon is a decentralized, lending protocol that allows you to borrow against your crypto - at 0 interest. Loans are paid out in $STAR (our USD-pegged stablecoin) with a minimum maintained collateral ratio of 110%.", + mintRedeemDescription: + "Users deposit wMatic, weth or wstETH as collateral to generate the debt token STAR.", + onCoinGecko: "true", + gecko_id: "preon-star", + cmcId: null, + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: ["https://docs.preon.finance/information/security"], + twitter: "https://twitter.com/PreonFinance", + wiki: "https://docs.preon.finance/", + }, + { + id: "124", + name: "peg-eUSD", + address: "0xd585aaafa2b58b1cd75092b51ade9fa4ce52f247", + symbol: "peUSD", + url: "https://lybra.finance/", + description: + "peUSD is an Omnichain, DeFi utility version of eUSD, integrated with the OFT standard of LayerZero.", + mintRedeemDescription: + "It can be converted from eUSD through the protocol or minted directly from non-rebase LSTs.", + onCoinGecko: "true", + gecko_id: "peusd", + cmcId: null, + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/LybraFinanceLSD", + wiki: "https://docs.lybra.finance/lybra-finance-docs/background/stablecoins-on-the-market", + }, + { + id: "125", + name: "eUSD (V2)", + address: "0xdf3ac4f479375802a821f7b7b46cd7eb5e4262cc", + symbol: "eUSD(v2)", + url: "https://lybra.finance/", + description: + "eUSD is an interest-bearing stablecoin hard-pegged to the US dollar", + mintRedeemDescription: + "Users deposit ETH & stETH as collateral with an excess collateral ratio of 150% to maintain safety and decentralization or exchanged by peg-eusd", + onCoinGecko: "true", + gecko_id: "eusd-v2", + cmcId: null, + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/LybraFinanceLSD", + wiki: "https://docs.lybra.finance/lybra-finance-docs/background/stablecoins-on-the-market", + }, + { + id: "126", + name: "mkUSD", + address: "0x4591dbff62656e7859afe5e45f6f47d3669fbb28", + symbol: "mkUSD", + url: "https://prismafinance.com", + description: + "A non-custodial and decentralized Ethereum LST-backed stablecoin", + mintRedeemDescription: + "Users mint mkUSD by depositing liquid staking tokens (LSTs) as collateral into a vault. When the loan is repaid to retrieve the collateral, the paid back mkUSD is burned", + onCoinGecko: "true", + gecko_id: "prisma-mkusd", + cmcId: null, + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/PrismaFi", + wiki: "https://docs.prismafinance.com/protocol-concepts/depositing-collateral-and-minting-mkusd", + }, + { + id: "127", + name: "Alternity CNY", + address: "0x7635b612792e4bfb7f2fa12a3e5d5a3f2e3c34bc", + symbol: "LCNY", + url: "https://alternity.finance", + description: + "Alternity protocol is a fork of the initial code of the Liquity Protocol. Minor amendments have been added to the protocol logic in order to make the stablecoin Yuan-pegged.", + mintRedeemDescription: + "Users can redeem their LCNY for ETH at any time without limitations. However, a redemption fee might be charged on the redeemed amount.", + onCoinGecko: "true", + gecko_id: "alternity-cny", + cmcId: null, + pegType: "peggedCNY", + pegMechanism: "crypto-backed", + priceSource: "coingecko", + auditLinks: null, + twitter: "https://twitter.com/0xAlternity", + wiki: "https://docs.alternity.finance/faq/redemptions-and-lcny-price-stability", + }, + { + id: "128", + name: "Nexus", + address: "0x92211b6B68a39F4f68E722f3A3A4810A2Ebc8383", + symbol: "NEX", + url: "https://nexus.zdex.tech/", + description: + "Nexus (NEX) is a revolutionary decentralized finance (DeFi) project that introduces a unique combination of security, scalability, and stability to the Ethereum network and Layer 2 solutions.", + mintRedeemDescription: + "Users can trade their NEX token on a uniswap pool.(no redeem process)", + onCoinGecko: "true", + gecko_id: "nexus1", + cmcId: null, + pegType: "peggedUSD", + pegMechanism: "algorithmic", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/Nexus_ZDex", + wiki: "https://docs.zdex.tech/", + }, + { + id: "129", + name: "Ondo US Dollar Yield", + address: "0x96f6ef951840721adbf46ac996b59e0235cb985c", + symbol: "USDY", + url: "https://ondo.finance", + description: + "USDY is a tokenized note secured by short-term US Treasuries and bank demand deposits, bringing institutional-grade low-risk yield to the global on-chain economy.", + mintRedeemDescription: + "USDY is accessible to non-US individual and institutional investors and is transferable on-chain 40-50 days after purchase. Users request to mint USDY by sending us USDC. After 40 day mint restriction is lifted it will mint USDY tokens", + onCoinGecko: "true", + gecko_id: "ondo-us-dollar-yield", + cmcId: null, + pegType: "peggedUSD", + pegMechanism: "fiat-backed", + priceSource: "coingecko", + auditLinks: null, + twitter: "https://twitter.com/ondofinance", + wiki: "https://docs.ondo.finance/general-access-products/usdy/faq/", + }, + { + id: "130", + name: "Savvy USD", + address: "0xf202ab403cd7e90197ec0f010ee897e283037706", + symbol: "SVUSD", + url: "https://savvydefi.io", + description: + "Access non-liquidating, auto-repaying, 0% interest loans that give you an immediate advance on your future yield.", + mintRedeemDescription: + "svUSD are created when users deposit accepted Stablescoins like USDC, USDT, DAI, and more into Savvy protocol. Borrowing is capped at 50% of the value of the collateral deposited.", + onCoinGecko: "true", + gecko_id: "savvy-usd", + cmcId: null, + pegType: "peggedUSD", + pegMechanism: "fiat-backed", + priceSource: "coingecko", + auditLinks: null, + twitter: "https://twitter.com/SavvyDefi", + wiki: "https://app.savvydefi.io/dashboard", + }, + { + id: "131", + name: "UAHT", + address: "0x0D9447E16072b636b4a1E8f2b8C644e58F3eaA6A", + symbol: "UAHT", + url: "https://uaht.io", + description: "Welcome to the platform where people matter.", + mintRedeemDescription: "UAHT is pegged to UAH Ukraine Currency", + onCoinGecko: "true", + gecko_id: "uaht", + cmcId: null, + pegType: "peggedUAH", + pegMechanism: "fiat-backed", + priceSource: "coingecko", + auditLinks: null, + twitter: "https://twitter.com/starscrowding", + wiki: "https://github.com/starscrowding/UAHT#readme", + }, + { + id: "132", + name: "USDM", + address: "0x59d9356e565ab3a36dd77763fc0d87feaf85508c", + symbol: "USDM", + url: "https://mountainprotocol.com", + description: + "The USDM Token is an ERC20 rebasing token, with a redemption value pegged at 1:1 for primary customers. Like other fiat-backed stablecoins, we expect a 1:~1 in secondary market price, driven by arbitrage opportunities.", + mintRedeemDescription: + "Users can purchase USDM with USDC. Balances will be credited in the platform when funds settle (usually in seconds) and are ready to withdraw.", + onCoinGecko: "true", + gecko_id: "mountain-protocol-usdm", + cmcId: null, + pegType: "peggedUSD", + pegMechanism: "fiat-backed", + priceSource: "coingecko", + auditLinks: null, + twitter: "https://twitter.com/MountainUSDM", + wiki: "https://docs.mountainprotocol.com/reference/usdm-token", + }, + { + id: "133", + name: "NARS", + address: "0x65517425ac3ce259a34400bb67ceb39ff3ddc0bd", + symbol: "NARS", + url: "https://num.finance/stablecoins", + description: + "Seamlessly scale your financial operations globally.On Ramps, Loans and Yields.", + mintRedeemDescription: + "Num-S are collateralized stablecoins, minted and issued by Num Finance.", + onCoinGecko: "true", + gecko_id: "num-ars", + cmcId: null, + pegType: "peggedARS", + pegMechanism: "fiat-backed", + priceSource: "coingecko", + auditLinks: null, + twitter: "https://twitter.com/Num_Finance", + wiki: "https://num.finance/transparency", + }, + { + id: "134", + name: "Phase Dollar", + address: "base:0xbe92452bb46485AF3308e6d77786bFBE3557808d", + symbol: "CASH", + url: "https://phase.cash", + description: + "Every $CASH token is backed with 1 USD or more worth of assets. Due to protocol fees, $CASH incurs a premium to its price, which is captured by the protocol for backing.", + mintRedeemDescription: + "Minting is done via first depositing collateral into the vaults, and then minting/borrowing the stable. Redeeming/paying back/burning the stable (action burns it under the hood) lets the user pay back their debt to the vault, unlocking their collateral", + onCoinGecko: "true", + gecko_id: "phase-dollar", + cmcId: null, + pegType: "peggedUSD", + pegMechanism: "fiat-backed", + priceSource: "coingecko", + auditLinks: null, + twitter: "https://twitter.com/0xPhase", + wiki: "https://docs.phase.cash/protocol/what-is-phase", + }, + { + id: "135", + name: "Inter Stable Token", + address: null, + symbol: "IST", + url: "https://inter.trade/", + description: + "IST is the over-collateralized, risk-managed stable token for the interchain.", + mintRedeemDescription: + "Inter Protocol's Vaults let you mint IST against the value of your IBC assets (like ATOM) to unlock liquidity. IST minters actively manage their positions to avoid liquidations if their asset value falls. Anyone can participate in bidding on liquidation auctions to profit from auctioned collateral.", + onCoinGecko: "true", + gecko_id: "inter-stable-token", + cmcId: 22736, + pegType: "peggedUSD", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: + "https://assets.ctfassets.net/xm0kp9xt5r54/1pucZFh1QsF1PgL5vhGAtS/054cd042b32f962fce8843758d6f3483/Atredis_Partners_-_Agoric_Vaults_Implementation_Assessment__-_Report_v1.0___1_.pdf", + twitter: "https://twitter.com/inter_protocol", + wiki: "https://docs.inter.trade/", + }, + { + id: "136", + name: "e-Money Eur", + address: null, + symbol: "EEUR", + url: "https://e-money.com", + description: + "e-Money EUR stablecoin. Audited and backed by fiat EUR deposits and government bonds.", + mintRedeemDescription: + "Unlike most existing stablecoins which aim to maintain a static 1:1 peg with their underlying assets, the value of e-Money's currency-backed tokens continually shifts in line with the interest accrued on the reserve assets. This means that holders benefit from the interest accrued on their assets while they sit securely in your wallet.", + onCoinGecko: "true", + gecko_id: "e-money-eur", + cmcId: 13877, + pegType: "peggedEUR", + pegMechanism: "fiat-backed", + priceSource: "defillama", + auditLinks: null, + twitter: "https://twitter.com/emoney_com", + wiki: null, + }, + { + id: "137", + name: "Membrane", + address: null, + symbol: "CDT", + url: "https://membrane-ui-mainnet.vercel.app/", + description: + "Membrane is an experimental protocol that uses collateralized debt positions to synthesize credit demand into composable debt tokens that traverse the Cosmos in the form of $CDT.", + mintRedeemDescription: + "The mechanism is roughly analogous to a “Line of Credit”, wherein vault owners can deposit their collateral to receive a line of credit against it. This unique functionality enables a large amount of flexibility in otherwise rigid token positions.", + onCoinGecko: "false", + gecko_id: "membrane", + cmcId: null, + pegType: "peggedVAR", + pegMechanism: "crypto-backed", + priceSource: "defillama", + auditLinks: + "https://github.com/oak-security/audit-reports/blob/master/Membrane/2023-06-15%20Audit%20Report%20-%20Membrane%20v1.0.pdf", + twitter: "https://twitter.com/insaneinthembrn", + wiki: "https://membrane-finance.gitbook.io/", + }, + { + id: "138", + name: "ARYZE eUSD", + address: "0xa4335da338ec4C07C391Fc1A9bF75F306adadc08", + symbol: "eUSD", + url: "https://aryze.io", + description: + "Digital Cash by ARYZE is a stablecoin fully backed by government-issued assets such as US T-bills, cash, or European Bonds, providing a stable and secure alternative to traditional fiat currencies.", + mintRedeemDescription: + "Minting Digital Cash involves depositing a major currency or equivalent asset with trusted third-party brokers. Upon confirmation of the deposit, the corresponding amount of Digital Cash is minted and credited to the user’s account. Redemption involves converting Digital Cash back into the underlying assets or major currencies through these brokers.", + onCoinGecko: "true", + gecko_id: "aryze-eusd", + cmcId: null, + pegType: "peggedUSD", + pegMechanism: "fiat-backed", + priceSource: "coingecko", + auditLinks: + "https://3838260506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTmzl9GX7emUArB9s00Rz%2Fuploads%2FvK1ML7oM7IwFeeR3bHaF%2FARYZE%20-%20eEUR%2C%20eGBP%2C%20eUSD%20and%20RYZE%20Code%20Audit.pdf?alt=media&token=0e1f74c0-0278-42bb-a7cd-c22ea0bf7b5d", + twitter: "https://twitter.com/ARYZEofficial", + wiki: "https://docs.aryze.io/en/products-and-services/aryze-digital-cash", + }, + { + id: "139", + name: "ARYZE eEUR", + address: "0x735fa792e731a2e8F83F32eb539841b7B72e6d8f", + symbol: "eEUR", + url: "https://aryze.io", + description: + "Digital Cash by ARYZE is a stablecoin fully backed by government-issued assets such as US T-bills, cash, or European Bonds, providing a stable and secure alternative to traditional fiat currencies.", + mintRedeemDescription: + "Minting Digital Cash involves depositing a major currency or equivalent asset with trusted third-party brokers. Upon confirmation of the deposit, the corresponding amount of Digital Cash is minted and credited to the user’s account. Redemption involves converting Digital Cash back into the underlying assets or major currencies through these brokers.", + onCoinGecko: "true", + gecko_id: "aryze-eeur", + cmcId: null, + pegType: "peggedEUR", + pegMechanism: "fiat-backed", + priceSource: "coingecko", + auditLinks: + "https://3838260506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTmzl9GX7emUArB9s00Rz%2Fuploads%2FvK1ML7oM7IwFeeR3bHaF%2FARYZE%20-%20eEUR%2C%20eGBP%2C%20eUSD%20and%20RYZE%20Code%20Audit.pdf?alt=media&token=0e1f74c0-0278-42bb-a7cd-c22ea0bf7b5d", + twitter: "https://twitter.com/ARYZEofficial", + wiki: "https://docs.aryze.io/en/products-and-services/aryze-digital-cash", + }, + { + id: "140", + name: "ARYZE eGBP", + address: "0xD711D7D893de57dc13Ff465763218770Bd42DB1D", + symbol: "eGBP", + url: "https://aryze.io", + description: + "Digital Cash by ARYZE is a stablecoin fully backed by government-issued assets such as US T-bills, cash, or European Bonds, providing a stable and secure alternative to traditional fiat currencies.", + mintRedeemDescription: + "Minting Digital Cash involves depositing a major currency or equivalent asset with trusted third-party brokers. Upon confirmation of the deposit, the corresponding amount of Digital Cash is minted and credited to the user’s account. Redemption involves converting Digital Cash back into the underlying assets or major currencies through these brokers.", + onCoinGecko: "true", + gecko_id: "aryze-egbp", + cmcId: null, + pegType: "peggedGBP", + pegMechanism: "fiat-backed", + priceSource: "coingecko", + auditLinks: + "https://3838260506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTmzl9GX7emUArB9s00Rz%2Fuploads%2FvK1ML7oM7IwFeeR3bHaF%2FARYZE%20-%20eEUR%2C%20eGBP%2C%20eUSD%20and%20RYZE%20Code%20Audit.pdf?alt=media&token=0e1f74c0-0278-42bb-a7cd-c22ea0bf7b5d", + twitter: "https://twitter.com/ARYZEofficial", + wiki: "https://docs.aryze.io/en/products-and-services/aryze-digital-cash", + }, + // Pending for 100% backing, will be added soon + // { + // id: "141", + // name: "ARYZE eSGD", + // address: "0x58A849E1f3c7044bB317DB4611269c352c53d399", + // symbol: "eSGD", + // url: "https://aryze.io", + // description:"Digital Cash by ARYZE is a stablecoin fully backed by government-issued assets such as US T-bills, cash, or European Bonds, providing a stable and secure alternative to traditional fiat currencies.", + // mintRedeemDescription:"Minting Digital Cash involves depositing a major currency or equivalent asset with trusted third-party brokers. Upon confirmation of the deposit, the corresponding amount of Digital Cash is minted and credited to the user’s account. Redemption involves converting Digital Cash back into the underlying assets or major currencies through these brokers.", + // onCoinGecko: "true", + // gecko_id: "aryze-esgd", + // cmcId: null, + // pegType: "peggedSGD", + // pegMechanism: "government-backed", + // priceSource: "coingecko", + // auditLinks: "https://3838260506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTmzl9GX7emUArB9s00Rz%2Fuploads%2FvK1ML7oM7IwFeeR3bHaF%2FARYZE%20-%20eEUR%2C%20eGBP%2C%20eUSD%20and%20RYZE%20Code%20Audit.pdf?alt=media&token=0e1f74c0-0278-42bb-a7cd-c22ea0bf7b5d", + // twitter: "https://twitter.com/ARYZEofficial", + // wiki: "https://docs.aryze.io/en/products-and-services/aryze-digital-cash", + // }, + { + id: "142", + name: "HYDT", + address: "0x9810512be701801954449408966c630595d0cd51", + symbol: "HYDT", + url: "https://hydtprotocol.com/", + description: + "HYDT Protocol offers industry leading high returns on HYDT Stablecoin Staking, along with decentralization, transparency and sustainability.", + mintRedeemDescription: + "HYDT can be exchanged for other USD stablecoins on exchanges, but the protocol does not provide direct 1:1 redemption for users. While the protocol will automatically mint/redeem HYDT to make the HYDT price close to 1 USD, your redemption rate will depend on the HYDT/USD exchange rate at the time.", + onCoinGecko: "true", + gecko_id: "hydt-protocol-hydt", + cmcId: null, + pegType: "peggedUSD", + pegMechanism: "algorithmic", + priceSource: "coingecko", + auditLinks: null, + twitter: "https://twitter.com/HydtProtocol", + wiki: "https://hydtprotocol.com/#faqs", + }, + { + id: "143", + name: "Verified USD", + address: "0x0e573ce2736dd9637a0b21058352e1667925c7a8", + symbol: "USDV", + url: "https://usdv.money", + description: + "Verified USD (USDV) is a tokenized real world asset (RWA) backed stablecoin built for modern finance.", + mintRedeemDescription: + "USDV can be minted by approved entities called Minters through agreements with the issuing entity. Once purchased by Minters, USDV can circulate freely to anyone. There are no restrictions on who can hold or use USDV. For example, a user could swap ETH for USDV on a DEX", + onCoinGecko: "true", + gecko_id: "verified-usd-foundation-usdv", + cmcId: "28443", + pegType: "peggedUSD", + pegMechanism: "fiat-backed", + priceSource: "coingecko", + auditLinks: null, + twitter: "https://twitter.com/usdv_money", + wiki: "https://docs.usdv.money/docs/what-is-usdv/faq", + }, + { + id: "144", + name: "High Yield USD", + address: "0xacdf0dba4b9839b96221a8487e9ca660a48212be", + symbol: "HYUSD", + url: "https://linktr.ee/hyusd", + description: + "hyUSD is a secure high yield savings flatcoin with up to 6% rewards outpacing inflation in over 100 countries around the world.", + mintRedeemDescription: + "Minting requires a deposit of the defined collateral tokens in equal value amounts to the RToken smart contracts.", + onCoinGecko: "true", + gecko_id: "high-yield-usd", + cmcId: null, + pegType: "peggedUSD", + pegMechanism: "algorithmic", + priceSource: "coingecko", + auditLinks: null, + twitter: "https://twitter.com/HighYieldUSD", + wiki: "https://linktr.ee/hyusd", + }, + { + id: "145", + name: "CAD Coin", + address: "0xcadc0acd4b445166f12d2c07eac6e2544fbe2eef", + symbol: "CADC", + url: "https://paytrie.com/cadc", + description: + "CADC tokens are fully backed 1:1 with Canadian Dollars held in a bank account in Canada.", + mintRedeemDescription: + "CADC is issued by PAYTRIE AB Inc., a FINTRAC regulated Money Services Business (M19690633), and backed by fully reserved assets, and redeemable on a 1:1 basis for Canadian dollars", + onCoinGecko: "true", + gecko_id: "cad-coin", + cmcId: "8690", + pegType: "peggedCAD", + pegMechanism: "fiat-backed", + priceSource: "coingecko", + auditLinks: null, + twitter: "https://twitter.com/PayTrie", + wiki: "https://faq.paytrie.com/help/what-is-the-cadc-address", + }, + { + id: "146", + name: "Ethena USDe", + address: "0x4c9EDD5852cd905f086C759E8383e09bff1E68B3", + symbol: "USDe", + url: "https://www.ethena.fi", + description: + "Ethereum enabled crypto-native synthetic dollar which provides an embedded yield to users and achieves price stability through delta-neutral hedging across centralized and decentralized venues", + mintRedeemDescription: + "Ethena enables users to deposit either USD, Ethereum or liquid staking tokens as collateral to create USDe. Stability is ensured through delta-neutral hedging process across centralized and decentralized exchanges.", + onCoinGecko: "true", + gecko_id: "ethena-usde", + cmcId: null, + pegType: "peggedUSD", + pegMechanism: "fiat-backed", + priceSource: "coingecko", + auditLinks: null, + twitter: "https://twitter.com/ethena_labs", + wiki: "https://www.ethena.fi", + }, + { + id: "147", + name: "Anchored Coins AEUR", + address: "0xA40640458FBc27b6EefEdeA1E9C9E17d4ceE7a21", + symbol: "AEUR", + url: "https://anchoredcoins.com", + description: + "AEUR is a Euro-backed stablecoin issued natively on the Ethereum and BNB Blockchain. Each AEUR is backed 1:1 by EUR held in the appointed reserve bank.", + mintRedeemDescription: + "To initiate using AEUR, you can create an account on one of the supported exchanges to purchase or trade. Alternatively, you can verify your identity to become Anchored Coins' client and deposit EUR into the designated bank account provided. To redeem or sell AEUR for EUR, you can effortlessly trade on secondary markets such as centralized/decentralized exchanges or dApps which support AEUR. For sizable redemptions, please get in touch with the team.", + onCoinGecko: "true", + gecko_id: "anchored-coins-eur", + cmcId: "28596", + pegType: "peggedEUR", + pegMechanism: "fiat-backed", + priceSource: "defillama", + auditLinks: null, + twitter: null, + wiki: null, + }, ] as PeggedAsset[]; diff --git a/src/peggedData/types.ts b/src/peggedData/types.ts index 78d73741..ebe3357d 100644 --- a/src/peggedData/types.ts +++ b/src/peggedData/types.ts @@ -7,14 +7,11 @@ type PegType = | "peggedCNY" //china | "peggedUAH" //ukraine | "peggedARS" //ARGENTINE - | "peggedGBP" //GB - "peggedCAD" //canadian dollar + | "peggedGBP"; //GB +("peggedCAD"); //canadian dollar + +type PegMechanism = "algorithmic" | "fiat-backed" | "crypto-backed"; -type PegMechanism = - | "algorithmic" - | "fiat-backed" - | "crypto-backed" - export type PriceSource = | "chainlink" | "uniswap" diff --git a/src/storeGetStablecoinChart.ts b/src/storeGetStablecoinChart.ts index 440b0459..0fd9de13 100644 --- a/src/storeGetStablecoinChart.ts +++ b/src/storeGetStablecoinChart.ts @@ -7,7 +7,7 @@ import { normalizedChainReplacements, normalizeChain, } from "./utils/normalizeChain"; -import PromisePool from "@supercharge/promise-pool" +import PromisePool from "@supercharge/promise-pool"; const handler = async (_event: any) => { // store "all" chains charts for each stablecoin @@ -33,7 +33,9 @@ const handler = async (_event: any) => { await PromisePool.for([ ...Object.keys(chainCoingeckoIds), ...Object.values(normalizedChainReplacements), - ]).withConcurrency(40).process(async (chain) => { + ]) + .withConcurrency(40) + .process(async (chain) => { const normalizedChain = normalizeChain(chain); const chart = await craftChartsResponse( normalizedChain, @@ -45,7 +47,7 @@ const handler = async (_event: any) => { const filename = `charts/${normalizedChain}`; await store(filename, JSON.stringify(chart), true, false); } - }) + }); }; export default wrapScheduledLambda(handler); diff --git a/src/storePeggedPrices.ts b/src/storePeggedPrices.ts index 03d04c28..47d0e32d 100644 --- a/src/storePeggedPrices.ts +++ b/src/storePeggedPrices.ts @@ -27,7 +27,7 @@ const timeout = (prom: any, time: number) => "prices-getBlocks", String(err), ]); - }, + } ); const handler = async (_event: any) => { @@ -39,7 +39,7 @@ const handler = async (_event: any) => { let pricePromises = peggedAssets.map(async (pegged) => { const price = await getCurrentPeggedPrice( pegged.gecko_id, - pegged.priceSource, + pegged.priceSource ); if (typeof price !== "number") { if (price) { @@ -79,7 +79,7 @@ const handler = async (_event: any) => { const closestDailyRecord = await getTVLOfRecordClosestToTimestamp( dailyPeggedPrices(), timestamp, - secondsInDay * 1.5, + secondsInDay * 1.5 ); if (getDay(closestDailyRecord?.SK) !== getDay(timestamp)) { // First write of the day diff --git a/src/storeRates.ts b/src/storeRates.ts index 2c925f35..c8b682a7 100644 --- a/src/storeRates.ts +++ b/src/storeRates.ts @@ -60,17 +60,17 @@ const handler = async (_event: any) => { const filename2Mo = `rates/2mo`; await store(filename2Mo, JSON.stringify(filteredRates2Mo), true, false); const filteredRatesFull = historicalPeggedRates - ?.map((item) => - typeof item === "object" - ? { - date: item.SK, - rates: item.rates, - } - : { rates: undefined } - ) - .filter((item) => item.rates !== undefined); -const filenameFull = `rates/full`; -await store(filenameFull, JSON.stringify(filteredRatesFull), true, false); + ?.map((item) => + typeof item === "object" + ? { + date: item.SK, + rates: item.rates, + } + : { rates: undefined } + ) + .filter((item) => item.rates !== undefined); + const filenameFull = `rates/full`; + await store(filenameFull, JSON.stringify(filteredRatesFull), true, false); }; export default wrapScheduledLambda(handler); diff --git a/src/testGetPeggedChart.ts b/src/testGetPeggedChart.ts index 71c1ed6d..40dfd215 100644 --- a/src/testGetPeggedChart.ts +++ b/src/testGetPeggedChart.ts @@ -1,3 +1,3 @@ import { craftChartsResponse } from "./getStablecoinChart"; -const response = craftChartsResponse("ethereum", undefined) +const response = craftChartsResponse("ethereum", undefined); diff --git a/src/triggerStorePegged.ts b/src/triggerStorePegged.ts index 7e3b9179..8eab3812 100644 --- a/src/triggerStorePegged.ts +++ b/src/triggerStorePegged.ts @@ -3,7 +3,7 @@ import peggedAssets from "./peggedData/peggedData"; import invokeLambda from "./utils/shared/invokeLambda"; function timeout(ms: number) { - return new Promise(resolve => setTimeout(resolve, ms)); + return new Promise((resolve) => setTimeout(resolve, ms)); } function shuffleArray(array: number[]) { @@ -21,7 +21,10 @@ const handler = async () => { const event = { peggedIndexes: peggedIndexes.slice(i, i + step), }; - await Promise.all([invokeLambda(`llama-stablecoins-dev-storePeggedAssets`, event), timeout(1000)]); + await Promise.all([ + invokeLambda(`llama-stablecoins-dev-storePeggedAssets`, event), + timeout(1000), + ]); } }; diff --git a/src/types.ts b/src/types.ts index dbc27d34..b0141e4e 100644 --- a/src/types.ts +++ b/src/types.ts @@ -12,8 +12,8 @@ type PeggedBalances = { export type BridgeBalances = { [bridgeID in BridgeID]: { [source: string]: { - amount: number; - } + amount: number; + }; }; }; export type PeggedTokenBalance = PeggedBalances & { @@ -35,7 +35,10 @@ export type PeggedAssetIssuance = { }; export type StoredPeggedAssetIssuance = { - [chain: string]: { - [issuanceType: string]: PeggedTokenBalance; - } | string | number; + [chain: string]: + | { + [issuanceType: string]: PeggedTokenBalance; + } + | string + | number; }; diff --git a/src/utils/normalizeChain.ts b/src/utils/normalizeChain.ts index a9f64b19..b887052a 100644 --- a/src/utils/normalizeChain.ts +++ b/src/utils/normalizeChain.ts @@ -5,13 +5,13 @@ export const normalizedChainReplacements = { gnosis: "xdai", "terra%20classic": "terra", sxnetwork: "sx", - "arbitrum%20nova":"arbitrum_nova", + "arbitrum%20nova": "arbitrum_nova", ethereumpow: "ethpow", "milkomeda%20c1": "milkomeda", "zksync%20lite": "zksync", "zksync%20era": "era", "polygon%20zkevm": "polygon_zkevm", - multiversx: "elrond" + multiversx: "elrond", } as { [chain: string]: string; }; @@ -467,7 +467,7 @@ export const chainCoingeckoIds = { categories: ["EVM"], chainId: 55, }, - "MultiversX": { + MultiversX: { geckoId: "elrond-erd-2", symbol: "EGLD", cmcId: "6892", @@ -888,7 +888,7 @@ export const chainCoingeckoIds = { categories: ["EVM", "Rollup"], parent: { chain: "Ethereum", - types: ["L2", "gas"] + types: ["L2", "gas"], }, chainId: 324, }, @@ -899,9 +899,9 @@ export const chainCoingeckoIds = { categories: ["EVM", "Rollup"], parent: { chain: "Ethereum", - types: ["L2", "gas"] + types: ["L2", "gas"], }, - chainId: 1101 + chainId: 1101, }, Base: { geckoId: null, @@ -922,7 +922,7 @@ export const chainCoingeckoIds = { categories: ["EVM", "Rollup"], parent: { chain: "Ethereum", - types: ["L2", "gas"] + types: ["L2", "gas"], }, }, Agoric: { @@ -1003,7 +1003,7 @@ export function getChainDisplayName( case "cosmos": return useNewChainNames ? "CosmosHub" : "Cosmos"; case "elrond": - return useNewChainNames ? "MultiversX" : "Elrond" + return useNewChainNames ? "MultiversX" : "Elrond"; case "avax": return "Avalanche"; case "xdaiarb": @@ -1163,11 +1163,11 @@ export function getChainDisplayName( case "aptos": return "Aptos"; case "zksync": - return "zkSync Lite" + return "zkSync Lite"; case "era": return "zkSync Era"; case "polygon_zkevm": - return "Polygon zkEVM" + return "Polygon zkEVM"; case "base": return "Base"; case "mantle": diff --git a/src/utils/s3.ts b/src/utils/s3.ts index c7be8bf6..20dc4322 100644 --- a/src/utils/s3.ts +++ b/src/utils/s3.ts @@ -33,7 +33,11 @@ export async function store( .promise(); } -export async function storeDataset(filename: string, body: string, ContentType = "text/csv") { +export async function storeDataset( + filename: string, + body: string, + ContentType = "text/csv" +) { await new aws.S3() .upload({ Bucket: datasetBucket, diff --git a/src/utils/wrapOrRedirect.ts b/src/utils/wrapOrRedirect.ts index a2cfe5fa..7aef421a 100644 --- a/src/utils/wrapOrRedirect.ts +++ b/src/utils/wrapOrRedirect.ts @@ -2,31 +2,31 @@ import { datasetBucket, storeDataset } from "./s3"; import { successResponse } from "./shared"; function buildRedirect(filename: string, cache?: number) { - return { - statusCode: 307, - body: "", - headers: { - Location: `https://${datasetBucket}.s3.eu-central-1.amazonaws.com/temp/${filename}`, - ...(cache !== undefined - ? { - "Cache-Control": `max-age=${cache}`, - } - : {}), - }, - }; + return { + statusCode: 307, + body: "", + headers: { + Location: `https://${datasetBucket}.s3.eu-central-1.amazonaws.com/temp/${filename}`, + ...(cache !== undefined + ? { + "Cache-Control": `max-age=${cache}`, + } + : {}), + }, + }; } export async function wrapResponseOrRedirect(response: any, cache: number) { - const jsonData = JSON.stringify(response); - const dataLength = Buffer.byteLength(jsonData, "utf8"); + const jsonData = JSON.stringify(response); + const dataLength = Buffer.byteLength(jsonData, "utf8"); - if (dataLength < 5.5e6) { - return successResponse(response, cache); - } else { - const filename = `stablecoin-${response.name}.json`; + if (dataLength < 5.5e6) { + return successResponse(response, cache); + } else { + const filename = `stablecoin-${response.name}.json`; - await storeDataset(filename, jsonData, "application/json"); + await storeDataset(filename, jsonData, "application/json"); - return buildRedirect(filename, 10 * 60); - } -} \ No newline at end of file + return buildRedirect(filename, 10 * 60); + } +}