diff --git a/dbt_subprojects/tokens/models/tokens/_schema.yml b/dbt_subprojects/tokens/models/tokens/_schema.yml index 24973d74253..24cd5d15d6c 100644 --- a/dbt_subprojects/tokens/models/tokens/_schema.yml +++ b/dbt_subprojects/tokens/models/tokens/_schema.yml @@ -63,3 +63,31 @@ models: description: "NFT collection symbol" - name: standard description: "NFT collection standard" + + - name: tokens_erc20_stablecoins + meta: + blockchain: arbitrum, avalanche_c, bnb, ethereum, fantom, gnosis, optimism, polygon, base + sector: tokens + contributors: hildobby, synthquest + config: + tags: ['tokens','stablecoin', 'arbitrum','avalanche_c','bnb','ethereum','fantom','gnosis','optimism','polygon','base'] + description: > + Stablecoin (ERC20) tokens + tests: + - dbt_utils.unique_combination_of_columns: + combination_of_columns: + - blockchain + - contract_address + columns: + - name: blockchain + description: blockchain name + - name: contract_address + description: token contract address + - name: name + description: token backing + - name: symbol + description: token symbol + - name: decimal + description: token decimals + - name: backing + description: token backing diff --git a/dbt_subprojects/tokens/models/tokens/arbitrum/tokens_arbitrum_erc20_stablecoins.sql b/dbt_subprojects/tokens/models/tokens/arbitrum/tokens_arbitrum_erc20_stablecoins.sql new file mode 100644 index 00000000000..335216bcd6b --- /dev/null +++ b/dbt_subprojects/tokens/models/tokens/arbitrum/tokens_arbitrum_erc20_stablecoins.sql @@ -0,0 +1,34 @@ +{{ config( + schema = 'tokens_arbitrum' + , alias = 'erc20_stablecoins' + , tags=['static'] + , post_hook='{{ expose_spells(\'["arbitrum"]\', + "sector", + "tokens_arbitrum", + \'["synthquest"]\') }}' + , unique_key = ['contract_address'] + ) +}} + +SELECT blockchain, contract_address, backing, symbol, decimals, name +FROM (VALUES + + ('arbitrum', 0x641441c631e2f909700d2f41fd87f0aa6a6b4edb, 'Crypto-backed stablecoin', 'USX', 18, ''), + ('arbitrum', 0x680447595e8b7b3aa1b43beb9f6098c79ac2ab3f, 'Algorithmic stablecoin', 'USDD', 18, ''), + ('arbitrum', 0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9, 'Fiat-backed stablecoin', 'USDT', 6, ''), + ('arbitrum', 0xaf88d065e77c8cc2239327c5edb3a432268e5831, 'Fiat-backed stablecoin', 'USDC', 6, ''), + ('arbitrum', 0xfea7a6a0b346362bf88a9e4a88416b77a57d6c2a, 'Crypto-backed stablecoin', 'MIM', 18, ''), + ('arbitrum', 0xa970af1a584579b618be4d69ad6f73459d112f95, 'Crypto-backed stablecoin', 'sUSD', 18, ''), + ('arbitrum', 0xddc0385169797937066bbd8ef409b5b3c0dfeb52, 'RWA-backed stablecoin', 'wUSDR', 9, ''), + ('arbitrum', 0xe80772eaf6e2e18b651f160bc9158b2a5cafca65, 'Crypto-backed stablecoin', 'USD+', 6, ''), + ('arbitrum', 0x17fc002b466eec40dae837fc4be5c67993ddbd6f, 'Hybrid stablecoin', 'FRAX', 18, ''), + ('arbitrum', 0xda10009cbd5d07dd0cecc66161fc93d7c9000da1, 'Hybrid stablecoin', 'DAI', 18, ''), + ('arbitrum', 0x64343594ab9b56e99087bfa6f2335db24c2d1f17, 'Crypto-backed stablecoin', 'VST', 18, ''), + ('arbitrum', 0xd74f5255d557944cf7dd0e45ff521520002d5748, 'Crypto-backed stablecoin', 'USDs', 18, ''), + ('arbitrum', 0x3f56e0c36d275367b8c502090edf38289b3dea0d, 'Crypto-backed stablecoin', 'MAI', 18, ''), + ('arbitrum', 0xb1084db8d3c05cebd5fa9335df95ee4b8a0edc30, 'Crypto-backed stablecoin', 'USDT+', 6, ''), + ('arbitrum', 0x3509f19581afedeff07c53592bc0ca84e4855475, 'Crypto-backed stablecoin', 'xUSD', 18, ''), + ('arbitrum', 0x59d9356e565ab3a36dd77763fc0d87feaf85508c, 'Fiat-backed stablecoin', 'USDM', 18, ''), + ('arbitrum', 0xff970a61a04b1ca14834a43f5de4533ebddb5cc8, 'Fiat-backed stablecoin', 'USDC', 6, ''), + ('arbitrum', 0x4d15a3a2286d883af0aa1b3f21367843fac63e07, 'Fiat-backed stablecoin', 'TUSD', 18, '') + ) AS temp_table (blockchain, contract_address, backing, symbol, decimals, name) diff --git a/dbt_subprojects/tokens/models/tokens/arbitrum/tokens_arbitrum_schema.yml b/dbt_subprojects/tokens/models/tokens/arbitrum/tokens_arbitrum_schema.yml index e875305d821..07338881a44 100644 --- a/dbt_subprojects/tokens/models/tokens/arbitrum/tokens_arbitrum_schema.yml +++ b/dbt_subprojects/tokens/models/tokens/arbitrum/tokens_arbitrum_schema.yml @@ -81,3 +81,26 @@ models: - unique - name: standard description: "The NFT standard erc721/erc1155/..." + + - name: tokens_arbitrum_erc20_stablecoins + meta: + blockchain: arbitrum + sector: stablecoins + contributors: synthquest + config: + tags: ['tokens', 'arbitrum', 'erc20', 'stablecoins'] + description: > + Selection of stablecoin token addresses. + columns: + - name: blockchain + description: "Blockchain name" + - name: contract_address + description: "Stablecoin contract address" + - name: backing + description: "Stablecoin backing" + - name: symbol + description: "Stablecoin symbol" + - name: name + description: "Stablecoin project name" + - name: decimals + description: "Number of decimals" diff --git a/dbt_subprojects/tokens/models/tokens/avalanche_c/tokens_avalanche_c_erc20_stablecoins.sql b/dbt_subprojects/tokens/models/tokens/avalanche_c/tokens_avalanche_c_erc20_stablecoins.sql new file mode 100644 index 00000000000..c6d569bd584 --- /dev/null +++ b/dbt_subprojects/tokens/models/tokens/avalanche_c/tokens_avalanche_c_erc20_stablecoins.sql @@ -0,0 +1,32 @@ +{{ config( + schema = 'tokens_avalanche_c' + , alias = 'erc20_stablecoins' + , tags=['static'] + , post_hook='{{ expose_spells(\'["avalanche_c"]\', + "sector", + "tokens_avalanche_c", + \'["synthquest"]\') }}' + , unique_key = ['contract_address'] + ) +}} + +SELECT blockchain, contract_address, backing, symbol, decimals, name +FROM (VALUES + + ('avalanche_c', 0x111111111111ed1d73f860f57b2798b683f2d325, 'Crypto-backed stablecoin', 'YUSD', 18, ''), + ('avalanche_c', 0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7, 'Fiat-backed stablecoin', 'USDt', 6, ''), + ('avalanche_c', 0xab05b04743e0aeaf9d2ca81e5d3b8385e4bf961e, 'Hybrid stablecoin', 'USDS', 18, ''), + ('avalanche_c', 0x00000000efe302beaa2b3e6e1b18d08d69a9012a, 'Fiat-backed stablecoin', 'AUSD', 6, ''), + ('avalanche_c', 0x130966628846bfd36ff31a822705796e8cb8c18d, 'Crypto-backed stablecoin', 'MIM', 18, ''), + ('avalanche_c', 0xd24c2ad096400b6fbcd2ad8b24e7acbc21a1da64, 'Hybrid stablecoin', 'FRAX', 18, ''), + ('avalanche_c', 0xd586e7f844cea2f87f50152665bcbc2c279d8d70, 'Crypto-backed stablecoin', 'DAI.e', 18, ''), + ('avalanche_c', 0x3b55e45fd6bd7d4724f5c47e0d1bcaedd059263e, 'Crypto-backed stablecoin', 'miMatic', 18, ''), + ('avalanche_c', 0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e, 'Fiat-backed stablecoin', 'USDC', 6, ''), + ('avalanche_c', 0x9c9e5fd8bbc25984b178fdce6117defa39d2db39, 'Fiat-backed stablecoin', 'BUSD', 18, ''), + ('avalanche_c', 0xf14f4ce569cb3679e99d5059909e23b07bd2f387, 'Crypto-backed stablecoin', 'NXUSD', 18, ''), + ('avalanche_c', 0x1c20e891bab6b1727d14da358fae2984ed9b59eb, 'Fiat-backed stablecoin', 'TUSD', 18, ''), + ('avalanche_c', 0xdacde03d7ab4d81feddc3a20faa89abac9072ce2, 'Crypto-backed stablecoin', 'USP', 18, ''), + ('avalanche_c', 0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664, 'Crypto-backed stablecoin', 'USDC.e', 6, ''), + ('avalanche_c', 0x8861f5c40a0961579689fdf6cdea2be494f9b25a, 'Hybrid stablecoin', 'iUSDS', 18, '') + + ) AS temp_table (blockchain, contract_address, backing, symbol, decimals, name) diff --git a/dbt_subprojects/tokens/models/tokens/avalanche_c/tokens_avalanche_c_schema.yml b/dbt_subprojects/tokens/models/tokens/avalanche_c/tokens_avalanche_c_schema.yml index 33c7d6a409a..22c9c8c7cec 100644 --- a/dbt_subprojects/tokens/models/tokens/avalanche_c/tokens_avalanche_c_schema.yml +++ b/dbt_subprojects/tokens/models/tokens/avalanche_c/tokens_avalanche_c_schema.yml @@ -85,3 +85,26 @@ models: tests: - accepted_values: values: [ 'erc721', 'erc1155'] + + - name: tokens_avalanche_c_erc20_stablecoins + meta: + blockchain: avalanche_c + sector: stablecoins + contributors: synthquest + config: + tags: ['tokens', 'avalanche_c', 'erc20', 'stablecoins'] + description: > + Selection of stablecoin token addresses. + columns: + - name: blockchain + description: "Blockchain name" + - name: contract_address + description: "Stablecoin contract address" + - name: backing + description: "Stablecoin backing" + - name: symbol + description: "Stablecoin symbol" + - name: name + description: "Stablecoin project name" + - name: decimals + description: "Number of decimals" \ No newline at end of file diff --git a/dbt_subprojects/tokens/models/tokens/base/tokens_base_erc20_stablecoins.sql b/dbt_subprojects/tokens/models/tokens/base/tokens_base_erc20_stablecoins.sql new file mode 100644 index 00000000000..8cbcbdcb911 --- /dev/null +++ b/dbt_subprojects/tokens/models/tokens/base/tokens_base_erc20_stablecoins.sql @@ -0,0 +1,26 @@ +{{ config( + schema = 'tokens_base' + , alias = 'erc20_stablecoins' + , tags=['static'] + , post_hook='{{ expose_spells(\'["base"]\', + "sector", + "tokens_base", + \'["synthquest"]\') }}' + , unique_key = ['contract_address'] + ) +}} + +SELECT blockchain, contract_address, backing, symbol, decimals, name +FROM (VALUES + + ('base', 0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42, 'Fiat-backed stablecoin', 'EURC', 6, ''), + ('base', 0xb79dd08ea68a908a97220c76d19a6aa9cbde4376, 'Crypto-backed stablecoin', 'USD+', 6, ''), + ('base', 0xcc7ff230365bd730ee4b352cc2492cedac49383e, 'Algorithmic stablecoin', 'hyUSD', 18, ''), + ('base', 0xcfa3ef56d303ae4faaba0592388f19d7c3399fb4, 'Crypto-backed stablecoin', 'eUSD', 18, ''), + ('base', 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913, 'Fiat-backed stablecoin', 'USDC', 6, ''), + ('base', 0x04d5ddf5f3a8939889f11e97f8c4bb48317f1938, 'Fiat-backed stablecoin', 'USDz', 18, ''), + ('base', 0x4621b7a9c75199271f773ebd9a499dbd165c3191, 'Crypto-backed stablecoin', 'DOLA', 18, ''), + ('base', 0xca72827a3d211cfd8f6b00ac98824872b72cab49, 'Fiat-backed stablecoin', 'cgUSD', 6, '') + + + ) AS temp_table (blockchain, contract_address, backing, symbol, decimals, name) diff --git a/dbt_subprojects/tokens/models/tokens/base/tokens_base_schema.yml b/dbt_subprojects/tokens/models/tokens/base/tokens_base_schema.yml index 46487efa49d..93114b77850 100644 --- a/dbt_subprojects/tokens/models/tokens/base/tokens_base_schema.yml +++ b/dbt_subprojects/tokens/models/tokens/base/tokens_base_schema.yml @@ -81,3 +81,26 @@ models: tests: - accepted_values: values: [ 'erc721', 'erc1155' ] + + - name: tokens_base_erc20_stablecoins + meta: + blockchain: base + sector: stablecoins + contributors: synthquest + config: + tags: ['tokens', 'base', 'erc20', 'stablecoins'] + description: > + Selection of stablecoin token addresses. + columns: + - name: blockchain + description: "Blockchain name" + - name: contract_address + description: "Stablecoin contract address" + - name: backing + description: "Stablecoin backing" + - name: symbol + description: "Stablecoin symbol" + - name: name + description: "Stablecoin project name" + - name: decimals + description: "Number of decimals" \ No newline at end of file diff --git a/dbt_subprojects/tokens/models/tokens/bnb/tokens_bnb_erc20_stablecoins.sql b/dbt_subprojects/tokens/models/tokens/bnb/tokens_bnb_erc20_stablecoins.sql new file mode 100644 index 00000000000..2d1457e851f --- /dev/null +++ b/dbt_subprojects/tokens/models/tokens/bnb/tokens_bnb_erc20_stablecoins.sql @@ -0,0 +1,43 @@ +{{ config( + schema = 'tokens_bnb' + , alias = 'erc20_stablecoins' + , tags=['static'] + , post_hook='{{ expose_spells(\'["bnb"]\', + "sector", + "tokens_bnb", + \'["synthquest"]\') }}' + , unique_key = ['contract_address'] + ) +}} + +SELECT blockchain, contract_address, backing, symbol, decimals, name +FROM (VALUES + + ('bnb', 0x14016e85a25aeb13065688cafb43044c2ef86784, 'Fiat-backed stablecoin', 'TUSD', 18, ''), + ('bnb', 0x23396cf899ca06c4472205fc903bdb4de249d6fc, 'Algorithmic stablecoin', 'UST', 18, ''), + ('bnb', 0x0782b6d8c4551b9760e74c0545a9bcd90bdc41e5, 'Crypto-backed stablecoin', 'HAY', 18, ''), + ('bnb', 0x90c97f71e18723b0cf0dfa30ee176ab653e89f40, 'Hybrid stablecoin', 'FRAX', 18, ''), + ('bnb', 0x6bf2be9468314281cd28a94c35f967cafd388325, 'Hybrid stablecoin', 'oUSD', 18, ''), + ('bnb', 0x55d398326f99059ff775485246999027b3197955, 'Fiat-backed stablecoin', 'USDT', 18, ''), + ('bnb', 0xde7d1ce109236b12809c45b23d22f30dba0ef424, 'Hybrid stablecoin', 'USDS', 18, ''), + ('bnb', 0xfa4ba88cf97e282c505bea095297786c16070129, 'Fiat-backed stablecoin', 'CUSD', 18, ''), + ('bnb', 0xc5f0f7b66764f6ec8c8dff7ba683102295e16409, 'Fiat-backed stablecoin', 'FDUSD', 18, ''), + ('bnb', 0x2952beb1326accbb5243725bd4da2fc937bca087, 'RWA-backed stablecoin', 'wUSDR', 9, ''), + ('bnb', 0x1d6cbdc6b29c6afbae65444a1f65ba9252b8ca83, 'Crypto-backed stablecoin', 'TOR', 18, ''), + ('bnb', 0xb0b195aefa3650a6908f15cdac7d92f8a5791b0b, 'Crypto-backed stablecoin', 'BOB', 18, ''), + ('bnb', 0x6458df5d764284346c19d88a104fd3d692471499, 'Hybrid stablecoin', 'iUSDS', 18, ''), + ('bnb', 0x2f29bc0ffaf9bff337b31cbe6cb5fb3bf12e5840, 'Crypto-backed stablecoin', 'DOLA', 18, ''), + ('bnb', 0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d, 'Fiat-backed stablecoin', 'USDC', 18, ''), + ('bnb', 0x3f56e0c36d275367b8c502090edf38289b3dea0d, 'Crypto-backed stablecoin', 'MAI', 18, ''), + ('bnb', 0x4bd17003473389a42daf6a0a729f6fdb328bbbd7, 'Crypto-backed stablecoin', 'VAI', 18, ''), + ('bnb', 0xf0186490b18cb74619816cfc7feb51cdbe4ae7b9, 'RWA-backed stablecoin', 'zUSD', 18, ''), + ('bnb', 0xfe19f0b51438fd612f6fd59c1dbb3ea319f433ba, 'Crypto-backed stablecoin', 'MIM', 18, ''), + ('bnb', 0xe9e7cea3dedca5984780bafc599bd69add087d56, 'Fiat-backed stablecoin', 'BUSD', 18, ''), + ('bnb', 0xb5102cee1528ce2c760893034a4603663495fd72, 'Crypto-backed stablecoin', 'USX', 18, ''), + ('bnb', 0xb7f8cd00c5a06c0537e2abff0b58033d02e5e094, 'Crypto-backed stablecoin', 'PAX', 18, ''), + ('bnb', 0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3, 'Hybrid stablecoin', 'DAI', 18, ''), + ('bnb', 0xd17479997f34dd9156deef8f95a52d81d265be9c, 'Algorithmic stablecoin', 'USDD', 18, '') + + + + ) AS temp_table (blockchain, contract_address, backing, symbol, decimals, name) diff --git a/dbt_subprojects/tokens/models/tokens/bnb/tokens_bnb_schema.yml b/dbt_subprojects/tokens/models/tokens/bnb/tokens_bnb_schema.yml index a92c8032276..9ae1c87c12b 100644 --- a/dbt_subprojects/tokens/models/tokens/bnb/tokens_bnb_schema.yml +++ b/dbt_subprojects/tokens/models/tokens/bnb/tokens_bnb_schema.yml @@ -81,3 +81,26 @@ models: tests: - accepted_values: values: [ 'bep721', 'bep1155' ] + + - name: tokens_bnb_erc20_stablecoins + meta: + blockchain: bnb + sector: stablecoins + contributors: synthquest + config: + tags: ['tokens', 'bnb', 'erc20', 'stablecoins'] + description: > + Selection of stablecoin token addresses. + columns: + - name: blockchain + description: "Blockchain name" + - name: contract_address + description: "Stablecoin contract address" + - name: backing + description: "Stablecoin backing" + - name: symbol + description: "Stablecoin symbol" + - name: name + description: "Stablecoin project name" + - name: decimals + description: "Number of decimals" \ No newline at end of file diff --git a/dbt_subprojects/tokens/models/tokens/ethereum/tokens_ethereum_erc20_stablecoins.sql b/dbt_subprojects/tokens/models/tokens/ethereum/tokens_ethereum_erc20_stablecoins.sql index c5e0def8a80..8072f092389 100644 --- a/dbt_subprojects/tokens/models/tokens/ethereum/tokens_ethereum_erc20_stablecoins.sql +++ b/dbt_subprojects/tokens/models/tokens/ethereum/tokens_ethereum_erc20_stablecoins.sql @@ -1,39 +1,66 @@ {{ config( - alias = 'stablecoins' + schema = 'tokens_ethereum' + , alias = 'erc20_stablecoins' , tags=['static'] , post_hook='{{ expose_spells(\'["ethereum"]\', "sector", "tokens_ethereum", - \'["gentrexha", "dot2dotseurat"]\') }}' + \'["Henrystats", "synthquest"]\') }}' + , unique_key = ['contract_address'] ) }} -SELECT contract_address, symbol, decimals, name +SELECT blockchain, contract_address, backing, symbol, decimals, name FROM (VALUES - (0xbc6da0fe9ad5f3b0d58160288917aa56653660e9, 'alUSD', 18, 'Alchemix USD'), - (0xd46ba6d942050d489dbd938a2c909a5d5039a161, 'AMPL', 9, 'Ampleforth'), - (0x4fabb145d64652a948d72533023f6e7a623c7c53, 'BUSD', 18, 'Binance USD'), - (0x6b175474e89094c44da98b954eedeac495271d0f, 'DAI', 18, 'Dai'), - (0xdb25f211ab05b1c97d595516f45794528a807ad8, 'EURS', 18, 'STASIS EURS'), - (0x956f47f50a910163d8bf957cf5846d573e7f87ca, 'FEI', 18, 'Fei USD'), - (0x853d955acef822db058eb8505911ed77f175b99e, 'FRAX', 18, 'Frax'), - (0x056fd409e1d7a124bd7017459dfea2f387b6d5cd, 'GUSD', 2, 'Gemini Dollar'), - (0xdf574c24545e5ffecb9a659c229253d4111d87e1, 'HUSD', 8, 'HUSD'), - (0x5f98805A4E8be255a32880FDeC7F6728C6568bA0, 'LUSD', 18, 'Liquity USD'), - (0x99d8a9c45b2eca8864373a26d1459e3dff1e17f3, 'MIM', 18, 'Magic Internet Money'), - (0xe2f2a5c287993345a840db3b0845fbc70f5935a5, 'MUSD', 18, 'mStable USD'), - (0x8e870d67f660d95d5be530380d0ec0bd388289e1, 'PAX', 18, 'Paxos Standard'), - (0x03ab458634910aad20ef5f1c8ee96f1d6ac54919, 'RAI', 18, 'Rai Reflex Index'), - (0x57Ab1ec28D129707052df4dF418D58a2D46d5f51, 'sUSD', 18, 'Synthetix sUSD'), - (0x57Ab1E02fEE23774580C119740129eAC7081e9D3, 'sUSD', 18, 'Synthetix sUSD'), - (0x0000000000085d4780b73119b644ae5ecd22b376, 'TUSD', 18, 'TrueUSD'), - (0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, 'USDC', 6, 'USD Coin'), - (0x674c6ad92fd080e4004b2312b45f796a192d27a0, 'USDN', 18, 'Neutrino USD'), - (0x1456688345527bE1f37E9e627DA0837D6f08C925, 'USDP', 18, 'Pax Dollar'), - (0xdac17f958d2ee523a2206206994597c13d831ec7, 'USDT', 6, 'Tether'), - (0xa47c8bf37f92abed4a126bda807a7b7498661acd, 'UST', 18, 'Wrapped UST Token'), - (0xa693b19d2931d498c5b318df961919bb4aee87a5, 'UST', 6, 'UST (Wormhole)'), - (0xe07F9D810a48ab5c3c914BA3cA53AF14E4491e8A, 'GYD', 18, 'Gyro Dollar'), - (0x73a15fed60bf67631dc6cd7bc5b6e8da8190acf5, 'USD0', 18, 'Usual USD'), - (0x866a2bf4e572cbcf37d5071a7a58503bfb36be1b, 'M', 6, 'M by M^0') - ) AS temp_table (contract_address, symbol, decimals, name) + + ('ethereum', 0x6b175474e89094c44da98b954eedeac495271d0f, 'Hybrid stablecoin', 'DAI', 18, 'Dai'), + ('ethereum', 0x96f6ef951840721adbf46ac996b59e0235cb985c, 'Fiat-backed stablecoin', 'USDY', 18, ''), + ('ethereum', 0xc5f0f7b66764f6ec8c8dff7ba683102295e16409, 'Fiat-backed stablecoin', 'FDUSD', 18, ''), + ('ethereum', 0x8d6cebd76f18e1558d4db88138e2defb3909fad6, 'Crypto-backed stablecoin', 'MAI', 18, ''), + ('ethereum', 0x5f98805a4e8be255a32880fdec7f6728c6568ba0, 'Crypto-backed stablecoin', 'LUSD', 18, 'Liquity USD'), + ('ethereum', 0xf9c2b386ff5df088ac717ab0010587bad3bc1ab1, 'Hybrid stablecoin', 'iUSDS', 18, ''), + ('ethereum', 0x45fdb1b92a649fb6a64ef1511d3ba5bf60044838, 'Hybrid stablecoin', 'USDS', 18, ''), + ('ethereum', 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, 'Fiat-backed stablecoin', 'USDC', 6, 'USD Coin'), + ('ethereum', 0xdac17f958d2ee523a2206206994597c13d831ec7, 'Fiat-backed stablecoin', 'USDT', 6, 'Tether'), + ('ethereum', 0xbea0000029ad1c77d3d5d23ba2d8893db9d1efab, 'Algorithmic stablecoin', 'BEAN', 6, ''), + ('ethereum', 0xe2f2a5c287993345a840db3b0845fbc70f5935a5, 'Crypto-backed stablecoin', 'mUSD', 18, 'mStable USD'), + ('ethereum', 0x7712c34205737192402172409a8f7ccef8aa2aec, 'Fiat-backed stablecoin', 'BUIDL', 6, ''), + ('ethereum', 0x4fabb145d64652a948d72533023f6e7a623c7c53, 'Fiat-backed stablecoin', 'BUSD', 18, 'Binance USD'), + ('ethereum', 0x1456688345527be1f37e9e627da0837d6f08c925, 'Crypto-backed stablecoin', 'USDP', 18, 'Pax Dollar'), + ('ethereum', 0x2a8e1e676ec238d8a992307b495b45b3feaa5e86, 'Crypto-backed stablecoin', 'OUSD', 18, ''), + ('ethereum', 0x0c10bf8fcb7bf5412187a595ab97a3609160b5c6, 'Algorithmic stablecoin', 'USDD', 18, ''), + ('ethereum', 0x8e870d67f660d95d5be530380d0ec0bd388289e1, 'Fiat-backed stablecoin', 'USDP', 18, 'Paxos Standard'), + ('ethereum', 0x853d955acef822db058eb8505911ed77f175b99e, 'Hybrid stablecoin', 'FRAX', 18, 'Frax'), + ('ethereum', 0x6c3ea9036406852006290770bedfcaba0e23a0e8, 'Fiat-backed stablecoin', 'PYUSD', 6, ''), + ('ethereum', 0xdf574c24545e5ffecb9a659c229253d4111d87e1, 'Fiat-backed stablecoin', 'HUSD', 8, 'HUSD'), + ('ethereum', 0xc285b7e09a4584d027e5bc36571785b515898246, 'Fiat-backed stablecoin', 'CUSD', 18, ''), + ('ethereum', 0xdc59ac4fefa32293a95889dc396682858d52e5db, 'Algorithmic stablecoin', 'BEAN', 6, ''), + ('ethereum', 0xa774ffb4af6b0a91331c084e1aebae6ad535e6f3, 'Crypto-backed stablecoin', 'FLEXUSD', 18, ''), + ('ethereum', 0xa47c8bf37f92abed4a126bda807a7b7498661acd, 'Algorithmic stablecoin', 'UST', 18, 'Wrapped UST Token'), + ('ethereum', 0x0000000000085d4780b73119b644ae5ecd22b376, 'Fiat-backed stablecoin', 'TUSD', 18, 'TrueUSD'), + ('ethereum', 0x4c9edd5852cd905f086c759e8383e09bff1e68b3, 'Crypto-backed stablecoin', 'USDe', 18, ''), + ('ethereum', 0xc56c2b7e71b54d38aab6d52e94a04cbfa8f604fa, 'Fiat-backed stablecoin', 'ZUSD', 6, ''), + ('ethereum', 0x0a5e677a6a24b2f1a2bf4f3bffc443231d2fdec8, 'Crypto-backed stablecoin', 'USX', 18, ''), + ('ethereum', 0x196f4727526ea7fb1e17b2071b3d8eaa38486988, 'Crypto-backed stablecoin', 'RSV', 18, ''), + ('ethereum', 0xbc6da0fe9ad5f3b0d58160288917aa56653660e9, 'Crypto-backed stablecoin', 'alUSD', 18, 'Alchemix USD'), + ('ethereum', 0x73a15fed60bf67631dc6cd7bc5b6e8da8190acf5, 'Fiat-backed stablecoin', 'USD0', 18, 'Usual USD'), + ('ethereum', 0x99d8a9c45b2eca8864373a26d1459e3dff1e17f3, 'Crypto-backed stablecoin', 'MIM', 18, 'Magic Internet Money'), + ('ethereum', 0xd5a14081a34d256711b02bbef17e567da48e80b5, 'RWA-backed stablecoin', 'wUSDR', 9, ''), + ('ethereum', 0x57ab1ec28d129707052df4df418d58a2d46d5f51, 'Crypto-backed stablecoin', 'sUSD', 18, 'Synthetix sUSD'), + ('ethereum', 0x056fd409e1d7a124bd7017459dfea2f387b6d5cd, 'Fiat-backed stablecoin', 'GUSD', 2, 'Gemini Dollar'), + ('ethereum', 0x1c48f86ae57291f7686349f12601910bd8d470bb, 'Fiat-backed stablecoin', 'USDK', 18, ''), + ('ethereum', 0x865377367054516e17014ccded1e7d814edc9ce4, 'Crypto-backed stablecoin', 'DOLA', 18, ''), + ('ethereum', 0xb0b195aefa3650a6908f15cdac7d92f8a5791b0b, 'Crypto-backed stablecoin', 'BOB', 18, ''), + ('ethereum', 0x956f47f50a910163d8bf957cf5846d573e7f87ca, 'Algorithmic stablecoin', 'FEI', 18, 'Fei USD'), + ('ethereum', 0x9a1997c130f4b2997166975d9aff92797d5134c2, 'RWA-backed stablecoin', 'USDap', 18, ''), + ('ethereum', 0xd46ba6d942050d489dbd938a2c909a5d5039a161, 'Crypto-backed stablecoin', 'AMPL', 9, 'Ampleforth'), + ('ethereum', 0x03ab458634910aad20ef5f1c8ee96f1d6ac54919, 'Crypto-backed stablecoin', 'RAI', 18, 'Rai Reflex Index'), + ('ethereum', 0x674c6ad92fd080e4004b2312b45f796a192d27a0, 'Algorithmic stablecoin', 'USDN', 18, 'Neutrino USD'), + ('ethereum', 0x866a2bf4e572cbcf37d5071a7a58503bfb36be1b, 'Fiat-backed stablecoin', 'M', 6, 'M by M^0'), + ('ethereum', 0x57Ab1E02fEE23774580C119740129eAC7081e9D3, 'Crypto-backed stablecoin', 'sUSD', 18, 'Synthetix sUSD'), + ('ethereum', 0xa693b19d2931d498c5b318df961919bb4aee87a5, 'Crypto-backed stablecoin', 'UST', 6, 'UST (Wormhole)'), + ('ethereum', 0xe07F9D810a48ab5c3c914BA3cA53AF14E4491e8A, 'Crypto-backed stablecoin', 'GYD', 18, 'Gyro Dollar'), + ('ethereum', 0xdb25f211ab05b1c97d595516f45794528a807ad8, 'Fiat-backed stablecoin', 'EURS', 18, 'STASIS EURS') + + + ) AS temp_table (blockchain, contract_address, backing, symbol, decimals, name) diff --git a/dbt_subprojects/tokens/models/tokens/ethereum/tokens_ethereum_schema.yml b/dbt_subprojects/tokens/models/tokens/ethereum/tokens_ethereum_schema.yml index f3d409b6995..bf4f3c73768 100644 --- a/dbt_subprojects/tokens/models/tokens/ethereum/tokens_ethereum_schema.yml +++ b/dbt_subprojects/tokens/models/tokens/ethereum/tokens_ethereum_schema.yml @@ -88,23 +88,25 @@ models: - name: tokens_ethereum_erc20_stablecoins meta: blockchain: ethereum - sector: tokens - project: erc20 - contributors: gentrexha + sector: stablecoins + contributors: synthquest config: - tags: [ 'table', 'erc20', 'stablecoins' ] - description: "ERC20 Stablecoin Token Addresses, Symbols and Decimals" + tags: ['tokens', 'ethereum', 'erc20', 'stablecoins'] + description: > + Selection of stablecoin token addresses. columns: + - name: blockchain + description: "Blockchain name" - name: contract_address - description: "ERC20 stablecoin token contract address" - tests: - - unique + description: "Stablecoin contract address" + - name: backing + description: "Stablecoin backing" - name: symbol - description: "ERC20 stablecoin token symbol" - - name: decimals - description: "Number of decimals, refers to how divisible an ERC20 stablecoin token can be" + description: "Stablecoin symbol" - name: name - description: "ERC20 stablecoin token name" + description: "Stablecoin project name" + - name: decimals + description: "Number of decimals" - name: tokens_ethereum_nft_standards meta: diff --git a/dbt_subprojects/tokens/models/tokens/fantom/tokens_fantom_erc20_stablecoins.sql b/dbt_subprojects/tokens/models/tokens/fantom/tokens_fantom_erc20_stablecoins.sql index 5b58d18f6ff..0fe2a86254d 100644 --- a/dbt_subprojects/tokens/models/tokens/fantom/tokens_fantom_erc20_stablecoins.sql +++ b/dbt_subprojects/tokens/models/tokens/fantom/tokens_fantom_erc20_stablecoins.sql @@ -1,26 +1,38 @@ {{ config( - alias = 'stablecoins' + schema = 'tokens_fantom' + , alias = 'erc20_stablecoins' , tags=['static'] , post_hook='{{ expose_spells(\'["fantom"]\', "sector", "tokens_fantom", - \'["Henrystats"]\') }}' + \'["Henrystats", "synthquest"]\') }}' + , unique_key = ['contract_address'] ) }} -SELECT contract_address, symbol, decimals, name +SELECT blockchain, contract_address, backing, symbol, decimals, name FROM (VALUES - (0xc54A1684fD1bef1f077a336E6be4Bd9a3096a6Ca, '2SHARES', 18, '2SHARE'), - (0x04068DA6C83AFCFA0e13ba15A6696662335D5B75, 'USDC', 6, 'USD Coin'), - (0x049d68029688eAbF473097a2fC38ef61633A3C7A, 'fUSDT', 6, 'Frapped USDT'), - (0x8D11eC38a3EB5E956B052f67Da8Bdc9bef8Abf3E, 'DAI', 18, 'Dai Stablecoin'), - (0xdc301622e621166BD8E82f2cA0A26c13Ad0BE355, 'FRAX', 18, 'Frax'), - (0xAd84341756Bf337f5a0164515b1f6F993D194E1f, 'FUSD', 18, 'Fantom Foundation USD'), - (0x7a6e4E3CC2ac9924605DCa4bA31d1831c84b44aE, '2OMB', 18, '2omb Token'), - (0x846e4D51d7E2043C1a87E0Ab7490B93FB940357b, 'UST', 6, 'UST (Wormhole)'), - (0x87a5C9B60A3aaf1064006FE64285018e50e0d020, 'MAGIK', 18, 'Magik'), - (0x9879aBDea01a879644185341F7aF7d8343556B7a, 'TUSD', 18, 'TrueUSD'), - (0x1D3918043d22de2D799a4d80f72Efd50Db90B5Af, 'sPDO', 18, 'pDollar Share'), - (0x5f0456F728E2D59028b4f5B8Ad8C604100724C6A, 'L3USD', 18, 'L3USD'), - (0xb9D62c829fbF7eAff1EbA4E50F3D0480b66c1748, 'PDO', 18, 'pDollar') - ) AS temp_table (contract_address, symbol, decimals, name) \ No newline at end of file + ('fantom', 0x5f0456f728e2d59028b4f5b8ad8c604100724c6a, 'Hybrid stablecoin', 'L3USD', 18, 'L3USD'), + ('fantom', 0x3129662808bec728a27ab6a6b9afd3cbaca8a43c, 'Crypto-backed stablecoin', 'DOLA', 18, ''), + ('fantom', 0x9879abdea01a879644185341f7af7d8343556b7a, 'Fiat-backed stablecoin', 'TUSD', 18, 'TrueUSD'), + ('fantom', 0x0def844ed26409c5c46dda124ec28fb064d90d27, 'Hybrid stablecoin', 'CoUSD', 18, ''), + ('fantom', 0xb9d62c829fbf7eaff1eba4e50f3d0480b66c1748, 'Hybrid stablecoin', 'PDO', 18, 'pDollar'), + ('fantom', 0x7a6e4e3cc2ac9924605dca4ba31d1831c84b44ae, 'Hybrid stablecoin', '2OMB', 18, '2omb Token'), + ('fantom', 0x87a5c9b60a3aaf1064006fe64285018e50e0d020, 'Hybrid stablecoin', 'MAGIK', 18, 'Magik'), + ('fantom', 0x74e23df9110aa9ea0b6ff2faee01e740ca1c642e, 'Crypto-backed stablecoin', 'TOR', 18, ''), + ('fantom', 0xfb98b335551a418cd0737375a2ea0ded62ea213b, 'Crypto-backed stablecoin', 'miMATIC', 18, ''), + ('fantom', 0x04068da6c83afcfa0e13ba15a6696662335d5b75, 'Fiat-backed stablecoin', 'USDC', 6, 'USD Coin'), + ('fantom', 0x82f0b8b456c1a451378467398982d4834b6829c1, 'Crypto-backed stablecoin', 'MIM', 18, ''), + ('fantom', 0xdc301622e621166bd8e82f2ca0a26c13ad0be355, 'Hybrid stablecoin', 'FRAX', 18, 'Frax'), + ('fantom', 0xb67fa6defce4042070eb1ae1511dcd6dcc6a532e, 'Crypto-backed stablecoin', 'alUSD', 18, ''), + ('fantom', 0x846e4d51d7e2043c1a87e0ab7490b93fb940357b, 'Hybrid stablecoin', 'UST', 6, 'UST (Wormhole)'), + ('fantom', 0xad84341756bf337f5a0164515b1f6f993d194e1f, 'Hybrid stablecoin', 'FUSD', 18, 'Fantom Foundation USD'), + ('fantom', 0x049d68029688eabf473097a2fc38ef61633a3c7a, 'Fiat-backed stablecoin', 'fUSDT', 6, 'Frapped USDT'), + ('fantom', 0xe2d27f06f63d98b8e11b38b5b08a75d0c8dd62b9, 'Algorithmic stablecoin', 'UST', 6, ''), + ('fantom', 0x8d11ec38a3eb5e956b052f67da8bdc9bef8abf3e, 'Crypto-backed stablecoin', 'DAI', 18, 'Dai Stablecoin'), + ('fantom', 0x6fc9383486c163fa48becdec79d6058f984f62ca, 'Hybrid stablecoin', 'USDB', 18, ''), + ('fantom', 0xc54a1684fd1bef1f077a336e6be4bd9a3096a6ca, 'Hybrid stablecoin', '2SHARES', 18, '2SHARE'), + ('fantom', 0x1d3918043d22de2d799a4d80f72efd50db90b5af, 'Hybrid stablecoin', 'sPDO', 18, 'pDollar Share') + + + ) AS temp_table (blockchain, contract_address, backing, symbol, decimals, name) diff --git a/dbt_subprojects/tokens/models/tokens/fantom/tokens_fantom_schema.yml b/dbt_subprojects/tokens/models/tokens/fantom/tokens_fantom_schema.yml index 4d6b5f3eb00..8ddf73fab1c 100644 --- a/dbt_subprojects/tokens/models/tokens/fantom/tokens_fantom_schema.yml +++ b/dbt_subprojects/tokens/models/tokens/fantom/tokens_fantom_schema.yml @@ -89,23 +89,25 @@ models: - name: tokens_fantom_erc20_stablecoins meta: blockchain: fantom - sector: tokens - project: erc20 - contributors: Henrystats + sector: stablecoins + contributors: synthquest config: - tags: [ 'table', 'erc20', 'stablecoins' ] - description: "ERC20 Stablecoin Token Addresses, Symbols and Decimals" + tags: ['tokens', 'fantom', 'erc20', 'stablecoins'] + description: > + Selection of stablecoin token addresses. columns: + - name: blockchain + description: "Blockchain name" - name: contract_address - description: "ERC20 stablecoin token contract address" - tests: - - unique + description: "Stablecoin contract address" + - name: backing + description: "Stablecoin backing" - name: symbol - description: "ERC20 stablecoin token symbol" - - name: decimals - description: "Number of decimals, refers to how divisible an ERC20 stablecoin token can be" + description: "Stablecoin symbol" - name: name - description: "ERC20 stablecoin token name" + description: "Stablecoin project name" + - name: decimals + description: "Number of decimals" - name: tokens_fantom_nft_standards meta: diff --git a/dbt_subprojects/tokens/models/tokens/gnosis/tokens_gnosis_erc20_stablecoins.sql b/dbt_subprojects/tokens/models/tokens/gnosis/tokens_gnosis_erc20_stablecoins.sql new file mode 100644 index 00000000000..e2e816c9eb3 --- /dev/null +++ b/dbt_subprojects/tokens/models/tokens/gnosis/tokens_gnosis_erc20_stablecoins.sql @@ -0,0 +1,21 @@ +{{ config( + schema = 'tokens_gnosis' + , alias = 'erc20_stablecoins' + , tags=['static'] + , post_hook='{{ expose_spells(\'["gnosis"]\', + "sector", + "tokens_gnosis", + \'["synthquest"]\') }}' + , unique_key = ['contract_address'] + ) +}} + +SELECT blockchain, contract_address, backing, symbol, decimals, name +FROM (VALUES + ('gnosis', 0xdd96b45877d0e8361a4ddb732da741e97f3191ff, 'Fiat-backed stablecoin', 'BUSD', 18, ''), + ('gnosis', 0x4ecaba5870353805a9f068101a40e0f32ed605c6, 'Fiat-backed stablecoin', 'USDT', 6, ''), + ('gnosis', 0x3f56e0c36d275367b8c502090edf38289b3dea0d, 'Crypto-backed stablecoin', 'MAI', 18, ''), + ('gnosis', 0x44fa8e6f47987339850636f88629646662444217, 'Hybrid stablecoin', 'DAI', 18, ''), + ('gnosis', 0xddafbb505ad214d7b80b1f830fccc89b60fb7a83, 'Fiat-backed stablecoin', 'USDC', 6, '') + + ) AS temp_table (blockchain, contract_address, backing, symbol, decimals, name) diff --git a/dbt_subprojects/tokens/models/tokens/gnosis/tokens_gnosis_schema.yml b/dbt_subprojects/tokens/models/tokens/gnosis/tokens_gnosis_schema.yml index 30caa673f35..d53675e86d6 100644 --- a/dbt_subprojects/tokens/models/tokens/gnosis/tokens_gnosis_schema.yml +++ b/dbt_subprojects/tokens/models/tokens/gnosis/tokens_gnosis_schema.yml @@ -86,3 +86,26 @@ models: tests: - accepted_values: values: [ 'erc721', 'erc1155'] + + - name: tokens_gnosis_erc20_stablecoins + meta: + blockchain: gnosis + sector: stablecoins + contributors: synthquest + config: + tags: ['tokens', 'gnosis', 'erc20', 'stablecoins'] + description: > + Selection of stablecoin token addresses. + columns: + - name: blockchain + description: "Blockchain name" + - name: contract_address + description: "Stablecoin contract address" + - name: backing + description: "Stablecoin backing" + - name: symbol + description: "Stablecoin symbol" + - name: name + description: "Stablecoin project name" + - name: decimals + description: "Number of decimals" \ No newline at end of file diff --git a/dbt_subprojects/tokens/models/tokens/optimism/tokens_optimism_erc20_stablecoins.sql b/dbt_subprojects/tokens/models/tokens/optimism/tokens_optimism_erc20_stablecoins.sql index 36b166d1761..42837c64d4d 100644 --- a/dbt_subprojects/tokens/models/tokens/optimism/tokens_optimism_erc20_stablecoins.sql +++ b/dbt_subprojects/tokens/models/tokens/optimism/tokens_optimism_erc20_stablecoins.sql @@ -1,66 +1,49 @@ {{ config( - alias='stablecoins' + schema = 'tokens_optimism' + , alias = 'erc20_stablecoins' , tags=['static'] , post_hook='{{ expose_spells(\'["optimism"]\', "sector", "tokens_optimism", - \'["msilb7"]\') }}' + \'["msilb7", "synthquest"]\') }}' + , unique_key = ['contract_address'] ) }} --- In this table we include underlying stablecoin tokens on Optimism. --- LP Tokens (i.e. 3crv) should not be included since these are made up of udnerlying stables. --- This is a lookup tables that's helpful for any analysis that focuses on stablecoins. - -SELECT - tbl.contract_address - , et.symbol,et. decimals - , tbl.name, tbl.currency_peg, tbl.reserve_type - +SELECT blockchain, contract_address, backing, symbol, decimals, name FROM (VALUES - --Type sourced from Defillama's mappings when relevant: https://defillama.com/stablecoins - (0xda10009cbd5d07dd0cecc66161fc93d7c9000da1, 'Dai Stablecoin', 'USD', 'Crypto-Backed') - ,(0x94b008aa00579c1307b0ef2c499ad98a8ce58e58, 'Tether USD', 'USD', 'Fiat-Backed') - ,(0x7f5c764cbc14f9669b88837ca1490cca17c31607, 'USD Coin', 'USD', 'Fiat-Backed') - ,(0xc40f949f8a4e094d1b49a23ea9241d289b7b2819, 'LUSD Stablecoin', 'USD', 'Crypto-Backed') - ,(0xbfd291da8a403daaf7e5e9dc1ec0aceacd4848b9, 'dForce USD', 'USD', 'Crypto-Backed') - ,(0x2e3d870790dc77a83dd1d18184acc7439a53f475, 'FRAX', 'USD', 'Algorithmic') - ,(0xba28feb4b6a6b81e3f26f08b83a19e715c4294fd, 'UST (Wormhole)', 'USD', 'Algorithmic') - ,(0xfb21b70922b9f6e3c6274bcd6cb1aa8a0fe20b80, 'Terra USD', 'USD', 'Algorithmic') - ,(0x7113370218f31764c1b6353bdf6004d86ff6b9cc, 'Decentralized USD','USD','Algorithmic') - ,(0xcb59a0a753fdb7491d5f3d794316f1ade197b21e, 'TrueUSD','USD','Fiat-Backed') - ,(0xcb8fa9a76b8e203d8c3797bf438d8fb81ea3326a, 'Alchemix USD','USD','Algorithmic') - ,(0xb0b195aefa3650a6908f15cdac7d92f8a5791b0b, 'BOB','USD','Crypto-Backed') - ,(0xdfa46478f9e5ea86d57387849598dbfb2e964b02, 'Mai Stablecoin','USD','Crypto-Backed') - ,(0x7fb688ccf682d58f86d7e38e03f9d22e7705448b, 'Rai Reflex Index','None','Crypto-Backed') - ,(0x340fe1d898eccaad394e2ba0fc1f93d27c7b717a, 'Wrapped USDR','USD','Algorithmic') - ,(0x9c9e5fd8bbc25984b178fdce6117defa39d2db39, 'Binance-Peg BUSD Token','USD','Fiat-Backed') - ,(0xb153fb3d196a8eb25522705560ac152eeec57901, 'Magic Internet Money','USD','Crypto-Backed') - ,(0x8ae125e8653821e851f12a49f7765db9a9ce7384, 'Dola USD Stablecoin','USD','Crypto-Backed') - ,(0x73cb180bf0521828d8849bc8CF2B920918e23032, 'USD+', 'USD','Crypto-Backed') - ,(0x9485aca5bbbe1667ad97c7fe7c4531a624c8b1ed, 'agEUR', 'EUR', 'Crypto-Backed') - ,(0x79af5dd14e855823fa3e9ecacdf001d99647d043, 'Jarvis Synthetic Euro','EUR','Crypto-Backed') - ,(0x970d50d09f3a656b43e11b0d45241a84e3a6e011, 'DAI+', 'USD','Crypto-Backed') - - -- --Synthetix Tokens - ,(0x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9, 'Synth sUSD', 'USD', 'Crypto-Backed') - ,(0xfbc4198702e81ae77c06d58f81b629bdf36f0a71, 'Synth sEUR', 'EUR', 'Crypto-Backed') - ,(0xa3a538ea5d5838dc32dde15946ccd74bdd5652ff, 'Synth sINR', 'INR', 'Crypto-Backed') - - - -- --Transfer Tokens (Common Among Bridges) - ,(0x25d8039bb044dc227f741a9e381ca4ceae2e6ae8, 'USD Coin Hop Token', 'USD', 'Bridge-Backed') - ,(0x3666f603cc164936c1b87e207f36beba4ac5f18a, 'USD Coin Hop Token', 'USD', 'Bridge-Backed') - ,(0x2057c8ecb70afd7bee667d76b4cd373a325b1a20, 'Tether USD Hop Token', 'USD', 'Bridge-Backed') - ,(0x56900d66d74cb14e3c86895789901c9135c95b16, 'DAI Hop Token', 'USD', 'Bridge-Backed') - ,(0x67c10c397dd0ba417329543c1a40eb48aaa7cd00, 'Synapse USD', 'USD', 'Bridge-Backed') - - ) AS tbl (contract_address, name, currency_peg, reserve_type) - --- JOIN FOR DATA QUALITY --- -- Enforce that the token is listen in "tokens_optimism_erc20.sql" --- -- Pull symbol and decimals from root table - -INNER JOIN {{source('tokens_optimism', 'erc20')}} et - ON et.contract_address = tbl.contract_address - AND et.is_counted_in_tvl = 1 -- Make sure we don't include any receipt or placeholder tokens + ('optimism', 0xfb21b70922b9f6e3c6274bcd6cb1aa8a0fe20b80, 'Algorithmic stablecoin', 'UST', 6, 'Terra USD'), + ('optimism', 0x970d50d09f3a656b43e11b0d45241a84e3a6e011, 'Crypto-backed stablecoin', 'DAI+', 18, 'DAI+'), + ('optimism', 0xdfa46478f9e5ea86d57387849598dbfb2e964b02, 'Crypto-backed stablecoin', 'MAI', 18, 'Mai Stablecoin'), + ('optimism', 0x3666f603cc164936c1b87e207f36beba4ac5f18a, 'Bridge-backed stablecoin', 'hUSD', 6, 'USD Coin Hop Token'), + ('optimism', 0x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9, 'Crypto-backed stablecoin', 'sUSD', 18, 'Synth sUSD'), + ('optimism', 0xda10009cbd5d07dd0cecc66161fc93d7c9000da1, 'Crypto-backed stablecoin', 'DAI', 18, 'Dai Stablecoin'), + ('optimism', 0xc40f949f8a4e094d1b49a23ea9241d289b7b2819, 'Crypto-backed stablecoin', 'LUSD', 18, 'LUSD Stablecoin'), + ('optimism', 0x25d8039bb044dc227f741a9e381ca4ceae2e6ae8, 'Bridge-backed stablecoin', 'hUSDC', 6, 'USD Coin Hop Token'), + ('optimism', 0x79af5dd14e855823fa3e9ecacdf001d99647d043, 'Crypto-backed stablecoin', 'EUR', 18, 'Jarvis Synthetic Euro'), + ('optimism', 0xfbc4198702e81ae77c06d58f81b629bdf36f0a71, 'Crypto-backed stablecoin', 'sEUR', 18, 'Synth sEUR'), + ('optimism', 0xcb59a0a753fdb7491d5f3d794316f1ade197b21e, 'Fiat-backed stablecoin', 'TUSD', 18, 'TrueUSD'), + ('optimism', 0x7fb688ccf682d58f86d7e38e03f9d22e7705448b, 'Crypto-backed stablecoin', 'RAI', 18, 'Rai Reflex Index'), + ('optimism', 0xcb8fa9a76b8e203d8c3797bf438d8fb81ea3326a, 'Algorithmic stablecoin', 'alUSD', 18, 'Alchemix USD'), + ('optimism', 0x340fe1d898eccaad394e2ba0fc1f93d27c7b717a, 'Algorithmic stablecoin', 'wUSDR', 9, 'Wrapped USDR'), + ('optimism', 0x2e3d870790dc77a83dd1d18184acc7439a53f475, 'Hybrid stablecoin', 'FRAX', 18, 'FRAX'), + ('optimism', 0xb0b195aefa3650a6908f15cdac7d92f8a5791b0b, 'Crypto-backed stablecoin', 'BOB', 18, 'BOB'), + ('optimism', 0x8ae125e8653821e851f12a49f7765db9a9ce7384, 'Crypto-backed stablecoin', 'DOLA', 18, 'Dola USD Stablecoin'), + ('optimism', 0x0b2c639c533813f4aa9d7837caf62653d097ff85, 'Fiat-backed stablecoin', 'USDC', 6, 'Circle USDC'), + ('optimism', 0x67c10c397dd0ba417329543c1a40eb48aaa7cd00, 'Bridge-backed stablecoin', 'nUSD', 18, 'Synapse USD'), + ('optimism', 0x56900d66d74cb14e3c86895789901c9135c95b16, 'Bridge-backed stablecoin', 'hDAI', 18, 'DAI Hop Token'), + ('optimism', 0x73cb180bf0521828d8849bc8cf2b920918e23032, 'Crypto-backed stablecoin', 'USD+', 6, 'USD+'), + ('optimism', 0x59d9356e565ab3a36dd77763fc0d87feaf85508c, 'Fiat-backed stablecoin', 'USDM', 18, ''), + ('optimism', 0xb153fb3d196a8eb25522705560ac152eeec57901, 'Crypto-backed stablecoin', 'MIM', 18, 'Magic Internet Money'), + ('optimism', 0x94b008aa00579c1307b0ef2c499ad98a8ce58e58, 'Fiat-backed stablecoin', 'USDT', 6, 'Tether USD'), + ('optimism', 0x7f5c764cbc14f9669b88837ca1490cca17c31607, 'Fiat-backed stablecoin', 'USDC.e', 6, 'USD Coin'), + ('optimism', 0xa3a538ea5d5838dc32dde15946ccd74bdd5652ff, 'Crypto-backed stablecoin', 'sINR', 18, 'Synth sINR'), + ('optimism', 0x9c9e5fd8bbc25984b178fdce6117defa39d2db39, 'Fiat-backed stablecoin', 'BUSD', 18, 'Binance-Peg BUSD Token'), + ('optimism', 0x7113370218f31764c1b6353bdf6004d86ff6b9cc, 'Algorithmic stablecoin', 'USDD', 18, 'Decentralized USD'), + ('optimism', 0x2057c8ecb70afd7bee667d76b4cd373a325b1a20, 'Bridge-backed stablecoin', 'hUSDT', 6, 'Tether USD Hop Token'), + ('optimism', 0x9485aca5bbbe1667ad97c7fe7c4531a624c8b1ed, 'Crypto-backed stablecoin', 'agEUR', 18, 'agEUR'), + ('optimism', 0xbfd291da8a403daaf7e5e9dc1ec0aceacd4848b9, 'Crypto-backed stablecoin', 'USX', 18, 'dForce USD'), + ('optimism', 0xba28feb4b6a6b81e3f26f08b83a19e715c4294fd, 'Algorithmic stablecoin', 'UST', 6, 'UST (Wormhole)') + + + ) AS temp_table (blockchain, contract_address, backing, symbol, decimals, name) diff --git a/dbt_subprojects/tokens/models/tokens/optimism/tokens_optimism_schema.yml b/dbt_subprojects/tokens/models/tokens/optimism/tokens_optimism_schema.yml index 6e8afb8c534..677b2e88599 100644 --- a/dbt_subprojects/tokens/models/tokens/optimism/tokens_optimism_schema.yml +++ b/dbt_subprojects/tokens/models/tokens/optimism/tokens_optimism_schema.yml @@ -172,32 +172,25 @@ models: - name: tokens_optimism_erc20_stablecoins meta: blockchain: optimism - sector: tokens - project: erc20 - contributors: msilb7 + sector: stablecoins + contributors: synthquest config: - tags: [ 'table', 'erc20', 'stablecoins' ] - description: "Optimism ERC20 Stablecoin Token Addresses, Symbols, Decimals, and Information" + tags: ['tokens', 'optimism', 'erc20', 'stablecoins'] + description: > + Selection of stablecoin token addresses. columns: + - name: blockchain + description: "Blockchain name" - name: contract_address - description: "ERC20 stablecoin token contract address" - tests: - - unique - - not_null + description: "Stablecoin contract address" + - name: backing + description: "Stablecoin backing" - name: symbol - description: "ERC20 stablecoin token symbol" - - name: decimals - description: "Number of decimals, refers to how divisible an ERC20 stablecoin token can be" + description: "Stablecoin symbol" - name: name - description: "ERC20 stablecoin token name" - - name: currency_peg - description: "What currency is the stablecoin pegged to" - - &reserve_type - name: reserve_type - description: "What is the type of backing for the stablecoin" - tests: - - accepted_values: - values: ['Crypto-Backed','Fiat-Backed','Algorithmic','Bridge-Backed'] + description: "Stablecoin project name" + - name: decimals + description: "Number of decimals" - name: tokens_optimism_nft_standards meta: diff --git a/dbt_subprojects/tokens/models/tokens/polygon/tokens_polygon_erc20_stablecoins.sql b/dbt_subprojects/tokens/models/tokens/polygon/tokens_polygon_erc20_stablecoins.sql new file mode 100644 index 00000000000..3e705292284 --- /dev/null +++ b/dbt_subprojects/tokens/models/tokens/polygon/tokens_polygon_erc20_stablecoins.sql @@ -0,0 +1,37 @@ +{{ config( + schema = 'tokens_polygon' + , alias = 'erc20_stablecoins' + , tags=['static'] + , post_hook='{{ expose_spells(\'["polygon"]\', + "sector", + "tokens_polygon", + \'["synthquest"]\') }}' + , unique_key = ['contract_address'] + ) +}} + +SELECT blockchain, contract_address, backing, symbol, decimals, name +FROM (VALUES + ('polygon', 0x2791bca1f2de4661ed88a30c99a7a9449aa84174, 'Fiat-backed stablecoin', 'USDC', 6, ''), + ('polygon', 0x3c499c542cef5e3811e1192ce70d8cc03d5c3359, 'Fiat-backed stablecoin', 'USDC', 6, ''), + ('polygon', 0x692597b009d13c4049a947cab2239b7d6517875f, 'Algorithmic stablecoin', 'UST', 18, ''), + ('polygon', 0xcf66eb3d546f0415b368d98a95eaf56ded7aa752, 'Crypto-backed stablecoin', 'USX', 18, ''), + ('polygon', 0x8f3cf7ad23cd3cadbd9735aff958023239c6a063, 'Hybrid stablecoin', 'DAI', 18, ''), + ('polygon', 0x2e1ad108ff1d8c782fcbbb89aad783ac49586756, 'Fiat-backed stablecoin', 'TUSD', 18, ''), + ('polygon', 0xd86b5923f3ad7b585ed81b448170ae026c65ae9a, 'Hybrid stablecoin', 'IRON', 18, ''), + ('polygon', 0xffa4d863c96e743a2e1513824ea006b8d0353c57, 'Algorithmic stablecoin', 'USDD', 18, ''), + ('polygon', 0x9c9e5fd8bbc25984b178fdce6117defa39d2db39, 'Fiat-backed stablecoin', 'BUSD', 18, ''), + ('polygon', 0x49a0400587a7f65072c87c4910449fdcc5c47242, 'Crypto-backed stablecoin', 'MIM', 18, ''), + ('polygon', 0x2f1b1662a895c6ba01a99dcaf56778e7d77e5609, 'Hybrid stablecoin', 'USDS', 18, ''), + ('polygon', 0xaf0d9d65fc54de245cda37af3d18cbec860a4d4b, 'RWA-backed stablecoin', 'wUSDR', 9, ''), + ('polygon', 0x45c32fa6df82ead1e2ef74d17b76547eddfaff89, 'Hybrid stablecoin', 'FRAX', 18, ''), + ('polygon', 0x66f31345cb9477b427a1036d43f923a557c432a4, 'Hybrid stablecoin', 'iUSDS', 18, ''), + ('polygon', 0xb0b195aefa3650a6908f15cdac7d92f8a5791b0b, 'Crypto-backed stablecoin', 'BOB', 18, ''), + ('polygon', 0xc2132d05d31c914a87c6611c10748aeb04b58e8f, 'Fiat-backed stablecoin', 'USDT', 6, ''), + ('polygon', 0xa3fa99a148fa48d14ed51d610c367c61876997f1, 'Crypto-backed stablecoin', 'miMATIC', 18, ''), + ('polygon', 0xdab529f40e671a1d4bf91361c21bf9f0c9712ab7, 'Fiat-backed stablecoin', 'BUSD', 18, ''), + ('polygon', 0x3a3e7650f8b9f667da98f236010fbf44ee4b2975, 'Crypto-backed stablecoin', 'xUSD', 18, ''), + ('polygon', 0x23001f892c0c82b79303edc9b9033cd190bb21c7, 'Crypto-backed stablecoin', 'LUSD', 18, '') + + + ) AS temp_table (blockchain, contract_address, backing, symbol, decimals, name) diff --git a/dbt_subprojects/tokens/models/tokens/polygon/tokens_polygon_schema.yml b/dbt_subprojects/tokens/models/tokens/polygon/tokens_polygon_schema.yml index 5056c5f769e..69aa6724c74 100644 --- a/dbt_subprojects/tokens/models/tokens/polygon/tokens_polygon_schema.yml +++ b/dbt_subprojects/tokens/models/tokens/polygon/tokens_polygon_schema.yml @@ -81,3 +81,26 @@ models: tests: - accepted_values: values: [ 'erc721', 'erc1155' ] + + - name: tokens_polygon_erc20_stablecoins + meta: + blockchain: polygon + sector: stablecoins + contributors: synthquest + config: + tags: ['tokens', 'polygon', 'erc20', 'stablecoins'] + description: > + Selection of stablecoin token addresses. + columns: + - name: blockchain + description: "Blockchain name" + - name: contract_address + description: "Stablecoin contract address" + - name: backing + description: "Stablecoin backing" + - name: symbol + description: "Stablecoin symbol" + - name: name + description: "Stablecoin project name" + - name: decimals + description: "Number of decimals" \ No newline at end of file diff --git a/dbt_subprojects/tokens/models/tokens/tokens_erc20_stablecoins.sql b/dbt_subprojects/tokens/models/tokens/tokens_erc20_stablecoins.sql new file mode 100644 index 00000000000..a51741e0877 --- /dev/null +++ b/dbt_subprojects/tokens/models/tokens/tokens_erc20_stablecoins.sql @@ -0,0 +1,42 @@ +{{ config( + schema='tokens', + alias = 'erc20_stablecoins', + materialized='table', + tags = ['static'], + post_hook = '{{ expose_spells(\'["ethereum", "arbitrum", "gnosis", "optimism", "bnb", "avalanche_c", "polygon", "fantom", "base"]\', + "sector", + "stablecoins", + \'["synthquest"]\') }}' + ) +}} + +{% set stables_models = [ + ref('tokens_arbitrum_erc20_stablecoins') +, ref('tokens_avalanche_c_erc20_stablecoins') +, ref('tokens_bnb_erc20_stablecoins') +, ref('tokens_ethereum_erc20_stablecoins') +, ref('tokens_fantom_erc20_stablecoins') +, ref('tokens_gnosis_erc20_stablecoins') +, ref('tokens_optimism_erc20_stablecoins') +, ref('tokens_polygon_erc20_stablecoins') +, ref('tokens_base_erc20_stablecoins') +] %} + + +SELECT * +FROM +( + {% for model in stables_models %} + SELECT + blockchain + , contract_address + , backing + , symbol + , decimals + , name + FROM {{ model }} + {% if not loop.last %} + UNION ALL + {% endif %} + {% endfor %} +)