Hello there Hivers. An special hello to my new friends: @ecoinstant and @thecrazygm among all my followers and supporters. Much love for all of you guys and girls and binary people....sorry but...yes the rest of you!
Almost what? why? where?
In case you don't know I am coding a data Index related to daily volume transactions of each Liquidity Pool. So it will save data like this one:
{
"_id": 112,
"tokenPair": "AFIT:AFITX",
"baseQuantity": "2545729.37637394",
"baseVolume": "41918385.70998097",
"basePrice": "0.00054708",
"quoteQuantity": "1392.72404526",
"quoteVolume": "11757.03101818",
"quotePrice": "1827.87780898",
"totalShares": "58727.31265509210142249948",
"precision": 8,
"creator": "actifit",
"isoDate": "2025-04-20T00:00:00.000Z"
}
but for each current pool running in the layer 2 of the hive ecosystem. Until the date, there 272 liquidity pools. How do I know that? Because I can see this data in the Hive LP Index: data-json or visually if you prefer
I said almost because if you check the TEST server I have uploaded here you can see one of the routes you can access and check from now on is this one:
After you click on it, you will se the data as json of some calculations:
{
"tokenPair": "DEC:SPS",
"volumeDeltaBaseToken": "34070025.85469818 DEC",
"volumeDeltaQuoteToken": "2433057.8344511986 SPS",
"totalFeesBaseToken": "51105.038782047275 DEC",
"totalFeesQuoteToken": "2433.0578344511987 SPS",
"totalFeesBaseTokenUSD": "49.57189",
"totalFeesQuoteTokenUSD": "31.53243",
"totalFeesPoolUSD": 81.1043171530734,
"baseTokenPrice": "0.00097$",
"quoteTokenPrice": "0.01296$",
"hivePriceGeckoUSD": "0.236199$",
"timeFrameAsTs": "2025-04-20 / 2025-04-19"
}
- tokenPair: The liquidity pool you are querying data. In this case the pair composed by DEC and SPS
- volumeDeltaBaseToken: The 24h trading volume of the base token.
- volumeDeltaQuoteToken: Same 24h trading volume but for the quote token.
Here comes the juicy part which involves why creating this index. Just in case you wonder we are making possible web3 and HIVE so many things are not created until someone like me comes with the idea:
yeah, why not i will code a LP simulator for HIVE? right. But there is no easy way to get data? nor an index...wait I will code that first..Well this is what I am doing here. Step by step like the @keychain guys told me when I used to work with them "CUT THE CHASE AND LET'S CODE" :)
- totalFeesBaseToken: It will present how much the pools has earned in Fees. As right now there is no "source of truth" and there are disparities between what is in the docs when refering to the actual fee, also tribaldex.com shows different numbers. Well I decided to make it easier, so the user of the API will have to provide those values as stated in the swagger docs I did in the beta here.
Please refer to the Swagger to play with it and understand it. For now you will have to "habla espaniol" later on i will update to english :P.
Ok so the almost because?
Because if you compare the data from Hive LP Index here against the one taken from tribaldex specifically at the same time(remember those volume are increasing as we speak, so taken around 20/4/25 11:30 GMT - 4, Venezuela Time) which are below:
In text:
Token Pair | Pair Price (SPS/DEC) | Pair Price (DEC/SPS) | Total Liquidity | Fee Earned | Volume |
---|---|---|---|---|---|
DEC:SPS | 0.07402569 SPS/DEC | 0.05486406 DEC/SPS | 2,018,233.525 DEC 15,694,796.734 SPS | 8451.929.021 DEC 2,380.793 SPS | 534,070,025.771 DEC 2,433,057.834 SPS |
Prices USD:
- DEC: $0.00101
- SPS: $0.01374
So based in my actual data and calculations, which I must thank this developer who helped me in the process providing me code @coininstant the data is almost getting there which makes me happy and let us know that the index in the right path.
Ok what have you done so far?
- Updated the index pages which look more appealing and in ENG/ES:
- Updated the code base using typescript and many multiple checks, making all the app modular so it can be maintained and scalable. Check here
- Created a Simple Frontend to allow admin access, signing the challenge with Keychain and using JWT token in backend. Source not uploaded yet, i will asap.
Added Swagger so you can learn what you can do with the API. Here
Or for the json guys, here the jsonDocs of the swagger
Configured 2 domains:
- prod: https://hivelpindex.sytes.net/ which for now keeps the Old version until the new one is stable and fully tested.
- test/dev: https://testhivelpindex.duckdns.org/
All thanks to the VPS servers of @privex. And thanks to the help of AI which for experienced coders, will make our life much more easy and fast to develop code.
Added a special section in the HIVE LP Index home page as:
Which from now on is a section as a footer in my posts so you guys can send me some love in the form of HIVE/HBD.
- And many more things.
Beta Hive LP Index Live
The beta for testing and keep improving is live at: https://testhivelpindex.duckdns.org/ try it out and send me you comments/suggestions or complains :D.
Next steps for this?
- Keep testing the index.
- Try to automate as mush as possible for backup data, release test or production.
- Improve the code trying to making it resilient to avoid downtimes.
- Wait for experienced devs to give me their feedback if possible and update based on suggestions, ideas and better "ways".
- Asap code the initial idea I have as simulator and make a beta.
- Asap code an onboarding app I have been discussing with @ecoinstant.
- Make myself stronger and reliable for the HIVE community so I can ask for a bigger project and get a DHF proposal done :). This idea will help not just me as a dev but also at least 3 Venezuelan I can hire in the future.
- Teach all the lessons I am learning and share the knowledge as this is the only think we can do while living on earth.
ESP:
Hola Hivers. Un saludo especial a mis nuevos amigos: @ecoinstant y @thecrazygm entre todos mis seguidores y personas que me apoyan. Mucho amor para todos ustedes chicos, chicas y personas no binarias... perdón pero... ¡sí, para el resto también!
¿Casi qué? ¿por qué? ¿dónde?
Por si no lo sabías, estoy programando un índice de datos relacionado con las transacciones diarias de cada Liquidity Pool. Así que guarda datos como este:
{ "_id": 112, "tokenPair": "AFIT:AFITX", "baseQuantity": "2545729.37637394", "baseVolume": "41918385.70998097", "basePrice": "0.00054708", "quoteQuantity": "1392.72404526", "quoteVolume": "11757.03101818", "quotePrice": "1827.87780898", "totalShares": "58727.31265509210142249948", "precision": 8, "creator": "actifit", "isoDate": "2025-04-20T00:00:00.000Z" }
Pero para cada pool activo que existe en la capa 2 del ecosistema Hive. Hasta la fecha, existen 272 liquidity pools. ¿Cómo lo sé? Porque puedo ver esos datos en el Hive LP Index: data-json o visualmente si prefieres
Dije "casi" porque si revisas el servidor de PRUEBA que he subido aquí puedes ver una de las rutas que puedes acceder y consultar desde ahora es esta:
Después de hacer clic en ella, verás los datos como JSON de algunos cálculos:
{ "tokenPair": "DEC:SPS", "volumeDeltaBaseToken": "34070025.85469818 DEC", "volumeDeltaQuoteToken": "2433057.8344511986 SPS", "totalFeesBaseToken": "51105.038782047275 DEC", "totalFeesQuoteToken": "2433.0578344511987 SPS", "totalFeesBaseTokenUSD": "49.57189", "totalFeesQuoteTokenUSD": "31.53243", "totalFeesPoolUSD": 81.1043171530734, "baseTokenPrice": "0.00097$", "quoteTokenPrice": "0.01296$", "hivePriceGeckoUSD": "0.236199$", "timeFrameAsTs": "2025-04-20 / 2025-04-19" }
- tokenPair: El liquidity pool que estás consultando. En este caso el par compuesto por DEC y SPS
- volumeDeltaBaseToken: El volumen de comercio en 24h del token base.
- volumeDeltaQuoteToken: El volumen de comercio en 24h del token quote.
Aquí viene la parte jugosa, que explica por qué estoy creando este índice. Por si te lo preguntabas, estamos haciendo posible web3 y HIVE, así que muchas cosas no existen hasta que alguien como yo aparece con la idea:
"sí, ¿por qué no programar un simulador de LP para HIVE?"... correcto. ¿Pero no hay forma fácil de obtener los datos? ¿ni un índice? espera, voy a programarlo primero... Bueno, esto es lo que estoy haciendo aquí. Paso a paso, como me dijeron los chicos de @keychain cuando trabajaba con ellos: "CORTA EL ROLLO Y A PROGRAMAR" :)
- totalFeesBaseToken: Te mostrará cuánto ha ganado el pool en comisiones. Por ahora no hay una "fuente de verdad" y hay discrepancias entre lo que aparece en los docs al referirse a la comisión actual, además tribaldex.com muestra números distintos. Decidí hacerlo más simple, así que el usuario de la API debe proporcionar esos valores como se indica en la documentación swagger beta aquí.
Por favor revisa el Swagger para jugar con él y entenderlo. Por ahora tendrás que "habla español", más adelante lo traduciré al inglés :P.
¿Entonces por qué el "casi"?
Porque si comparas los datos del Hive LP Index aquí contra los tomados de tribaldex en el mismo momento (recuerda que esos volúmenes cambian constantemente, tomados alrededor del 20/4/25 11:30 GMT -4, hora de Venezuela), que son estos:
En texto:
Token Pair | Precio del Par (SPS/DEC) | Precio del Par (DEC/SPS) | Liquidez Total | Comisiones Ganadas | Volumen |
---|---|---|---|---|---|
DEC:SPS | 0.07402569 SPS/DEC | 0.05486406 DEC/SPS | 2,018,233.525 DEC 15,694,796.734 SPS | 8451.929.021 DEC 2,380.793 SPS | 534,070,025.771 DEC 2,433,057.834 SPS |
Precios USD:
- DEC: $0.00101
- SPS: $0.01374
Así que basado en mis datos actuales y cálculos, que debo agradecer a este desarrollador que me ayudó en el proceso proveyéndome código @coininstant, los datos están casi ahí, lo cual me hace feliz y nos deja saber que el índice va por buen camino.
¿Ok, qué has hecho hasta ahora?
- Actualicé las páginas del índice, que ahora se ven mejor y en ENG/ES:
- Actualicé el código base usando TypeScript y múltiples validaciones, haciendo la app modular, mantenible y escalable. Ver aquí
- Creé un frontend simple para permitir acceso admin, firmando el challenge con Keychain y usando token JWT en el backend. Fuente no subida aún, lo haré pronto.
Añadí Swagger para que puedas aprender qué puedes hacer con la API. Aquí
O para los que les gusta JSON, aquí los jsonDocs del swagger
Configuré 2 dominios:
- prod: https://hivelpindex.sytes.net/ que por ahora mantiene la versión vieja hasta que la nueva esté estable y testeada.
- test/dev: https://testhivelpindex.duckdns.org/
Todo gracias a los servidores VPS de @privex. Y gracias a la ayuda de la IA que para coders con experiencia, hace nuestra vida más fácil y rápida.
Añadí una sección especial en la página de inicio del Hive LP Index como:
Que desde ahora será una sección como pie de página en mis posts para que puedan mandarme algo de amor en forma de HIVE/HBD.
- Y muchas cosas más.
Beta Hive LP Index en Vivo
La beta para pruebas y seguir mejorando está activa en: https://testhivelpindex.duckdns.org/ pruébala y mándame tus comentarios/sugerencias o quejas :D.
¿Próximos pasos?
- Seguir probando el índice.
- Tratar de automatizar lo más posible los backups de datos, lanzamientos de prueba o producción.
- Mejorar el código tratando de hacerlo resiliente y evitar caídas.
- Esperar que devs con experiencia me den feedback si es posible y actualizar basado en ideas y sugerencias.
- Lo más pronto posible codificar la idea original de simulador y lanzar una beta.
- Codificar cuanto antes una app de onboarding que he venido conversando con @ecoinstant.
- Fortalecerme y volverme confiable para la comunidad HIVE y así poder pedir apoyo para un proyecto más grande y lograr una propuesta DHF :). Esta idea no solo me ayudará a mí como dev, sino que también me permitirá contratar al menos 3 venezolanos en el futuro.
- Enseñar todo lo que estoy aprendiendo y compartir el conocimiento, porque es lo único que podemos hacer mientras vivimos en la tierra.
@theghost1980
Send me some love using the link in the image bellow:
Mándame algo de amor usando el enlace en la imagen de abajo: