Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions active-users/nest.ts

This file was deleted.

365 changes: 365 additions & 0 deletions users/alliumUsers.ts

Large diffs are not rendered by default.

9 changes: 0 additions & 9 deletions users/compound-v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,6 @@ const comptrollers = [
]
}
},
{
id:"467",
name:"Benqi Lending",
comptrollers:{
"avax":[
"0x486Af39519B4Dc9a7fCcd318217352830E8AD9b4",
]
}
},
{
id:"parent#trader-joe",
name:"Trader Joe",
Expand Down
46 changes: 46 additions & 0 deletions users/duneUsers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { CHAIN } from "../helpers/chains";
import { duneDexUsersExport, duneLendingUsersExport } from "./utils/duneUsers";

const dexUsers: { id: string; projects: string[]; chains: Record<string, string> }[] = [
{
id: "parent#hybra",
projects: ["hybra"],
chains: { [CHAIN.HYPERLIQUID]: "2025-06-23" },
},
{
id: "parent#ramses-exchange-hl",
projects: ["ramses", "ramsesxyz"],
chains: {
[CHAIN.ARBITRUM]: "2023-03-16",
[CHAIN.HYPERLIQUID]: "2025-06-30",
},
},
{
id: "parent#nest",
projects: ["nest"],
chains: { [CHAIN.HYPERLIQUID]: "2025-11-06" },
},
];

const lendingUsers: { id: string; project: string; version: number; chains: Record<string, string> }[] = [
{
id: "2088", // Compound V3
project: "compound",
version: 3,
chains: {
[CHAIN.ETHEREUM]: "2022-08-26",
[CHAIN.POLYGON]: "2023-03-07",
[CHAIN.ARBITRUM]: "2023-05-14",
[CHAIN.BASE]: "2023-08-12",
[CHAIN.UNICHAIN]: "2025-03-08",
},
},
];

export default dexUsers.map((config) => ({
id: config.id,
adapter: duneDexUsersExport(config),
})).concat(lendingUsers.map(({ id, ...config }) => ({
id,
adapter: duneLendingUsersExport(config),
})));
14 changes: 12 additions & 2 deletions users/list.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import chains from "./chains"
import routers from "./routers/index"
import compoundV2 from "./compound-v2";
import alliumUsers from "./alliumUsers";
import duneUsers from "./duneUsers";
import tokenUsers from "./tokenUsers";
import { Adapter, FetchOptions, ProtocolType, SimpleAdapter } from "../adapters/types";
import { CHAIN } from "../helpers/chains";
import { parseNewUserResponse, parseUserResponse } from "./utils/countUsers";
Expand All @@ -22,10 +25,17 @@ const activeUserProtocols: Record<string, SimpleAdapter> = {};
const newUserProtocols: Record<string, SimpleAdapter> = {};

routers.concat(chains as any[]).concat(compoundV2 as any[]).forEach((item: any) => {
if (item.activeUsersAdapter) activeUserProtocols[item.id ?? item.name] = item.activeUsersAdapter;
if (item.newUsersAdapter) newUserProtocols[item.id ?? item.name] = item.newUsersAdapter;
const id = item.id ?? item.name;
if (item.activeUsersAdapter) activeUserProtocols[id] = item.activeUsersAdapter;
if (item.newUsersAdapter) newUserProtocols[id] = item.newUsersAdapter;
})

alliumUsers.concat(duneUsers).concat(tokenUsers)
.forEach(({ id, adapter }) => {
if (activeUserProtocols[id]) throw new Error(`${id} has both a query-engine config and an address list, remove the address list entry`);
activeUserProtocols[id] = adapter;
})

export const { protocolList, getAdapter } = createFactoryExports(activeUserProtocols);
export const newUsers = createFactoryExports(newUserProtocols);

Expand Down
74 changes: 2 additions & 72 deletions users/routers/routerAddresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,50 +27,6 @@ export default (
],
},
},
{
id: "parent#uniswap",
name: "Uniswap",
addresses: {
ethereum: [
// v2
"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
"0xf164fc0ec4e93095b804a4795bbe1e041497b92a",
//v3
"0xE592427A0AEce92De3Edee1F18E0157C05861564",
"0x075B36dE1Bd11cb361c5B3B1E80A9ab0e7aa8a60",
"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
"0x4C60051384bd2d3C01bfc845Cf5F4b44bcbE9de5", //universalrouter
"0xEf1c6E67703c7BD7107eed8303Fbe6EC2554BF6B", //universalrouter
],
bsc: ["0x5Dc88340E1c5c6366864Ee415d6034cadd1A9897"],
celo: [
"0xC73d61d192FB994157168Fb56730FdEc64C9Cb8F",
// v3
"0x5615CDAb10dc425a742d643d949a7F474C01abc4",
],
polygon: [
"0x4C60051384bd2d3C01bfc845Cf5F4b44bcbE9de5", //universalrouter
"0xE592427A0AEce92De3Edee1F18E0157C05861564", //v3
"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", //v3
"0xEf1c6E67703c7BD7107eed8303Fbe6EC2554BF6B", //universalrouter2
],
arbitrum: [
"0xE592427A0AEce92De3Edee1F18E0157C05861564", //v3
"0x075B36dE1Bd11cb361c5B3B1E80A9ab0e7aa8a60", //v3
"0x4C60051384bd2d3C01bfc845Cf5F4b44bcbE9de5",
"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", //v3
"0xEf1c6E67703c7BD7107eed8303Fbe6EC2554BF6B", //universalrouter
],
optimism: [
"0xE592427A0AEce92De3Edee1F18E0157C05861564", //v3
"0x075B36dE1Bd11cb361c5B3B1E80A9ab0e7aa8a60", //v3
"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", //v3
"0xb555edF5dcF85f42cEeF1f3630a52A108E55A654", //universalrouter
"0xEf1c6E67703c7BD7107eed8303Fbe6EC2554BF6B", //universalrouter
"0x560DA69Ef841e1272C65eF9ebA538870F8C0c484", //universalrouter
],
},
},
{
id: "parent#sushi",
name: "Sushiswap",
Expand Down Expand Up @@ -223,26 +179,6 @@ export default (
ethereum: ["0xceb90e4c17d626be0facd78b79c9c87d7ca181b3"],
},
},
{
id: "parent#pancakeswap",
name: "Pancakeswap",
addresses: {
ethereum: [
"0x13f4EA83D0bd40E75C8222255bc855a974568Dd4", // v3
"0xEfF92A263d31888d860bD50809A8D171709b7b1c",
],
bsc: [
"0x13f4EA83D0bd40E75C8222255bc855a974568Dd4", // v3
"0x10ED43C718714eb63d5aA57B78B54704E256024E",
"0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F",
"0x749fc0E64A3680531d31ACC1dAa8dda0bE438B02",
],
aptos: ["0xc7efb4076dbe143cbcd98cfaaa929ecfc8f299203dfff63b95ccb6bfe19850fa"],
base: [
"0x678Aa4bF4E210cf2166753e054d5b7c31cc7fa86", // smartrouter
],
},
},
{
id: "179",
name: "Varen",
Expand Down Expand Up @@ -496,13 +432,7 @@ export default (
],
},
},
{
id: "2675",
name: "Ramses Exchange",
addresses: {
arbitrum: ["0xAAA87963EFeB6f7E0a2711F397663105Acb1805e"],
},
} /*
/*
{
"id":"parent#apeswap",
"name":"ApeSwap",
Expand All @@ -523,7 +453,7 @@ export default (
"0xb9667Cf9A495A123b0C43B924f6c2244f42817BE"
]
}
},*/,
},*/
{
id: "2332",
name: "Equalizer Exchange",
Expand Down
53 changes: 53 additions & 0 deletions users/tokenUsers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { CHAIN } from "../helpers/chains";
import { alliumTokenUsersExport } from "./utils/alliumUsers";

const tokenUsers = [
{
id: "182", // Lido
chain: CHAIN.ETHEREUM,
token: "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84", // stETH
// The protocol burns stETH on finalisation, so the exit is the queue transfer.
exitAddresses: ["0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1"], // unstETH withdrawal queue

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, this excludes stake, wrap and unwraps?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrap/unwrap is neither entry nor exit so i deliberately excluded them

start: "2020-12-18",
},
{
id: "2626", // ether.fi Stake
chain: CHAIN.ETHEREUM,
token: "0x35fA164735182de50811E8e2E824cFb9B6118ac2", // eETH, the stake receipt; weETH only wraps it
// Withdrawals park eETH here and burn later on claim.
exitAddresses: ["0x7d5706f6ef3F89B3951E23e557CDFBC3239D4E2c"], // Withdraw Request NFT
start: "2023-11-16",
},
{
id: "900", // Rocket Pool
chain: CHAIN.ETHEREUM,
token: "0xae78736Cd615f374D3085123A210448E74Fc6393", // rETH, burns straight to zero on redeem
start: "2021-10-07",
},
{
id: "4133", // Ethena USDe
chain: CHAIN.ETHEREUM,
token: "0x9D39A5DE30e57443BfF2A8307A4256c8797A3497",
start: "2023-11-21",
},
{
id: "6790", // Falcon Finance
chain: CHAIN.ETHEREUM,
token: "0xc8CF6D7991f15525488b2A83Df53468D682Ba4B0",
start: "2025-02-12",
},
{
id: "3946", // Kelp
chain: CHAIN.ETHEREUM,
token: "0xA1290d69c65A6Fe4DF752f95823fae25cB99e5A7", // rsETH
// Every rsETH exit goes here and none burns to zero; without it the adapter
// saw 10 users in a week where the protocol saw 50.
exitAddresses: ["0x62De59c08eB5dAE4b7E6F7a8cAd3006d6965ec16"], // LRTWithdrawalManager
start: "2023-12-06",
},
];

export default tokenUsers.map((config) => ({
id: config.id,
adapter: alliumTokenUsersExport(config),
}));
Loading
Loading