grants-program icon indicating copy to clipboard operation
grants-program copied to clipboard

stxmempool.space

Open jakob-btc opened this issue 1 year ago • 15 comments

APPLICANT

Type:                                                                                Direct Application

Email:                                                                            [email protected]

Discord:                                                    

Twitter:                                                        

Stacks Forum:           

GRANT BASICS

Grant Name:                                            stxmempool.space

Total Budget:                                     25,000

Total Duration:                          720

Grant Type:                                                   Open Source Dev 1st time Grantees

Grant Track:                                              Stacks Interface

Grant Goal:                                                   Integrate Between Technologies

Grant Audience:                    End Users (Consumer)

Specific Audience:            Any person or entity looking to optimize their confirmation times and fee rates.

Grant Team:                                             gandalf77, anch09

Previous Grants:                      

Ecosystem Programs:      

GRANT MISSION, IMPACT, RISKS & REFERENCE

Grant Mission:

The project aims to build stxmempool.space - an open source implementation of mempool.space for Stacks.

https://mempool.space is one of the most widely used mempool analysis tools and block explorers for the Bitcoin mainchain, with over 1 million monthly active users. The site’s intuitive user interface allows users to easily gauge the state of the mempool and fine tune their fee rate for optimal confirmation times.

The Stacks community has experienced several episodes of network congestion (i.e. https://forum.stacks.org/t/mempool-congestion-on-stacks-observations-and-next-steps-from-hiro/12325). We believe that bringing this powerful tool to the Stacks ecosystem will allow users to save transaction fees and effectively manage their transactions during times of mempool congestion, all while interacting with an UI that Bitcoiners know and love.

Additionally, in the case that the upstream project merges our PR, we see the potential for stxmempool.space to drive user growth for the Stacks ecosystem as it would be integrated into a tool that many (1M+) Bitcoiners use regularly.

(Side note: This project was one of the main items of Jasper’s wishlist. As a team, we want to thank Jasper for helping us better understand the needs of the Stacks ecosystem and refine the idea for stxmempool.space)

Grant Impact:

Our goal is to reach 5,000 MAUs within 6 months of the website going live (this represents 10% of the MAUs of https://explorer.stacks.co/)

Grant Risks:

One risk that we have identified is the need to make significant changes to the frontend in order to accommodate data format differences between Bitcoin and Stacks (UTXOs vs. accounts).

We have started analyzing the data requirements (see supporting links) in an effort to scope the ideal solution.

Support Links:

Video of pitch: https://drive.google.com/file/d/1KVlqlz9AxfQUC3CGZN5Pl0b01s-M6ZCp/view Pitch deck: https://docs.google.com/presentation/d/1Ju6pW_rwbXV5R7awL8aoaNgW_VrwR03ceJzqBjAzaEA/edit Data requirements visual analysis: https://drive.google.com/file/d/1vL-8QzaxfN79OUob4NXJzFnMi9lFMxuY/view Data requirements spreadsheet: https://docs.google.com/spreadsheets/d/1arBUyJ_AbYNeduz-8XTmj9fN9ZcPv4allBr3Qer6miM/edit

Google drive folder with all the supporting material: https://drive.google.com/drive/folders/1IHEot3mk5zHIwmCb7hwG9z0bymXM1nHJ

GRANT ROADMAP & DELIVERABLES

MILESTONE 1:

Deliverable:                   Working implementation of / endpoint (home page)

MILESTONE 2:

Deliverable:                   Working /mempool-block, /block endpoints

FINAL DELIVERABLE

Deliverable:                    Live website (stxmempool.space) with /, /mempool-block, /block, /tx, /address endpoints + PR into upstream repo

jakob-btc avatar Aug 31 '22 02:08 jakob-btc

👋 @gandalf77 Thanks for your application! We will do a pre-review and let you know if we have any immediate questions. In the mean time please refer to our review schedule here for a detailed timeline and response dates. Best, Will

stacks-foundation avatar Aug 31 '22 02:08 stacks-foundation

How do you plan to represent the 5 dimensional block size in stx vs 1 dimension in btc?

friedger avatar Aug 31 '22 05:08 friedger

@gandalf77 love this initiative to better support existing and new builders through a better gateway to the stacks ecosystem. Having a really easy to use/read interface similar to mempool as a dedicated stacks explorer would be sweet - especially when we can start to segment & display activity on 3rd party sites.

Alisammour avatar Aug 31 '22 17:08 Alisammour

Interesting @friedger would you mind elaborating. What do you mean with the 5 dimensions?

314159265359879 avatar Aug 31 '22 18:08 314159265359879

I like this initiative too. Here are some mempool dashboards that have been built thus far: https://stacksdata.info/#mempool (here you can see that some of the data is not filtered, because the protocol doesn't consider transactions if they haven't been mined after 256 blocks, the the average age is a bit weird here).

This one is great for exploring transactions that are in the mempool: https://haystack.tools/mempool

mempool.space is very well known and looks great. Having something that looks similar and thus familiar - to mempool.space users - for Stacks seems like a great idea to me.

314159265359879 avatar Aug 31 '22 19:08 314159265359879

Ooo, this is an absolute must have for STX. I am definitely in favor. Good luck Team! :)

mikebear1 avatar Aug 31 '22 19:08 mikebear1

I believe @friedger is referring to the fact that block limits have multiple cost dimensions on Stacks, including:

Limit Max
Runtime (units) 5000000000
Read Count 15000
Read Length (bytes) 100000000
Write Count 15000
Write Length (bytes) 15000000

One quick idea is to have each represented by the color, then color the block darker based on the proximity to the limits, and overall could see it useful to know "block is full because of X".

whoabuddy avatar Aug 31 '22 19:08 whoabuddy

@friedger - thanks for your comment. If you can provide some more context and/or point us to the relevant documentation that would be helpful and appreciated!

@Alisammour @mikebear1 - thanks for your support!

@314159265359879 - thank you for the mempool dashboard links.

@whoabuddy - that's a very interesting suggestion. We have to do more research into the 5 dimensions of block size (as referred to by @friedger) in order to understand the relevance of end users knowing "block is full because of X".

Our current design philosophy is that any change to the original UI should bring fundamentally important information to the user. If we can represent Stacks data cohesively without making changes to the current UI, then that is preferred. We think that the main value driver for making a Stacks version of mempool.space is to bring a familiar UI to Bitcoiners/Stacks users.

I'm interested in hearing your thoughts on this approach. Given this context, do you still think that "block is full because of X" data point is fundamentally necessary?

jakob-btc avatar Sep 02 '22 23:09 jakob-btc

How do you determine whether a block is full? What does it mean if a block is 90% full in a 5 dimensional room? If the block is 90% in computational dimension, then I still can get txs in that are data heavy.

friedger avatar Sep 03 '22 10:09 friedger

You're welcome 🙂 I'm keeping my fingers crossed 🤞 Good luck 👍

Greetings mike

sob., 3 wrz 2022, 01:20 użytkownik Gandalf @.***> napisał:

@friedger https://github.com/friedger - thanks for your comment. If you can provide some more context and/or point us to the relevant documentation that would be helpful and appreciated!

@Alisammour https://github.com/Alisammour @mikebear1 https://github.com/mikebear1 - thanks for your support!

@314159265359879 https://github.com/314159265359879 - thank you for the mempool dashboard links.

@whoabuddy https://github.com/whoabuddy - that's a very interesting suggestion. We have to do more research into the 5 dimensions of block size (as referred to by @friedger https://github.com/friedger) in order to understand the relevance of end users knowing "block is full because of X".

Our current design philosophy is that any change to the original UI should bring fundamentally important information to the user. If we can represent Stacks data cohesively without making changes to the current UI, then that is preferred. We think that the main value driver for making a Stacks version of mempool.space is to bring a familiar UI to Bitcoiners/Stacks users.

I'm interested in hearing your thoughts on this approach. Given this context, do you still think that "block is full because of X" data point is fundamentally necessary?

— Reply to this email directly, view it on GitHub https://github.com/stacksgov/Stacks-Grant-Launchpad/issues/662#issuecomment-1235972538, or unsubscribe https://github.com/notifications/unsubscribe-auth/A226BQYS5S2N22LOA3KDVNDV4KDUZANCNFSM6AAAAAAQA6JTFA . You are receiving this because you were mentioned.Message ID: @.***>

mikebear1 avatar Sep 03 '22 14:09 mikebear1

I like the idea and I support this grant.

@friedger @whoabuddy @gandalf77 I think the grant team should think about the distribution of weight coefficients for each parameter and getting the relative value of the block fullness. In any case, the team will have to work with historical data to form high-quality analytics. Сoefficients should be calculated depending on the data from the start of Mainnet Stacks 2.0.

P.S. Perhaps someday these statistics will be integrated into the mempool product, as has already been done with Liquid Network :)

bogachevanton avatar Sep 04 '22 11:09 bogachevanton

@friedger - thanks for the additional questions. Following additional research, our current understanding is as follows:

  • Stacks nodes apply highest-fee-first ordering to mempool transactions using the fee_rate
  • The fee rate is calculated via fee_rate = fee / cost_scalar
  • The cost_scalar (as per the documentation for this API endpoint) distills the five dimensional resource consumption into a single number in order to facilitate efficient comparison

A question that remains unclear to us is whether nodes only use the fee_rate to order transactions or also use the available space & computational capacity across the five block size dimensions to include transactions into the next block even if they have a lower fee_rate - in other words, do nodes optimize to fill the block limit efficiently or only use the fee_rate as an approximation?

  1. In the case that nodes are only ordering by fee_rate, then what is relevant to the end user is to understand what fee_rate needs to be applied to their transaction in order to achieve the desired confirmation time. In this case, the existing UI of mempool.space is already displaying all the relevant data points. Taking @whoabuddy's suggestion into account, we think it could be helpful to have a modal display "block is full because of X" on hover over a mempool block.

  2. In the case that nodes order transactions via a more complex process, we will have to study that process and design a UI that best informs the end user on how to apply a fee_rate that achieves the desired confirmation time.

Any further input is highly appreciated.

jakob-btc avatar Sep 06 '22 23:09 jakob-btc

Regarding the risk:

One risk that we have identified is the need to make significant changes to the frontend in order to accommodate data format differences between Bitcoin and Stacks (UTXOs vs. accounts).

Would you be able to adapt a mempool from an account-base blockchain such as Ethereum instead of a UTXO-based blockchain such as Bitcoin?

igorsyl avatar Sep 16 '22 15:09 igorsyl

@igorsyl - thanks for your comment.

Our current level of understanding is that there are multiple differences between an account-based smart contracting chain like Stacks and a UTXO based chain like Bitcoin, namely:

  1. The /address endpoint needs to be replaced with an /account endpoint
  2. Stacks accounts (principals) can be standard addresses as well as contracts whereas in Bitcoin all addresses are created equal
  3. Stacks has five transaction types whereas Bitcoin has one transaction type
  4. Stacks has multiple asset types whereas Bitcoin has one asset type

3 & 4 in particular will warrant making changes to the frontend (even if our aim is to keep the changes minimal).

If I understand your question correctly, you're suggesting that we draw inspiration from existing mempool explorers for account based chains like Ethereum. That's a great idea. Extending the simple and clean UI of mempool.space by adding elements of battle-tested ETH mempool explorers could be a great way to approach it. Alternatively, we could fork an ETH mempool explorer and not use mempool.space as our base UI.

We are open to both scenarios but have a preference for the first one as we think that mempool.space is the right base UI as it is well known to Bitcoiners which we assume is the main audience for Stacks.

We will start our research into the existing market offerings for ETH mempool explorers.

jakob-btc avatar Sep 19 '22 22:09 jakob-btc

Hi @gandalf77 -

Congrats! Your grant application has been approved. We just sent you an invite (to the email the application was submitted with) to an onboarding call on Monday. We will use this call to provide an overview of next steps and expectations for proceeding with the grant.

If you are not able to make the call, don't worry, it will be recorded.

Best, Will Stacks Foundation Grants Program Manager.

will-corcoran avatar Sep 29 '22 21:09 will-corcoran

I think you have an interesting project. If you haven't already gone through the Stacks Web3 Startup Lab, I would like to invite you to apply.

Here's a 5-minute read on how we can help you turn your startup idea into an investment-ready startup: www.web3startuplab.io

If you are interested, you can apply through the "Apply Now" button.

Feel free to ping me on email: [email protected]

Scarlett-Web3 avatar Nov 01 '22 18:11 Scarlett-Web3