Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

premine percentage and supply fields update for rune.html #3748

Merged
merged 24 commits into from
May 24, 2024

Conversation

cryptoni9n
Copy link
Collaborator

@cryptoni9n cryptoni9n commented May 13, 2024

presents options to fix #3630

  • this is my first attempt at making any sort of real changes using Rust. I am still in the very early stages of learning Rust and so I wanted to add a disclaimer that these changes were not done with much proficiency - there are probably smarter and better ways to have made them. I am eager to learn so please provide feedback on what I can do better. I don't think that all of these fields are necessary for the rune page, but I wanted to display them all so that they could be reviewed and a final decision as to which to keep can be made while considering all possibilities.

changes made:

  • added mint progress field
  • renamed supply to current supply
  • added maximum supply field
  • added supply progress field
  • renamed premine percentage topremine percentage of current supply
  • added premine percentage of maximum supply formula

presents options to fix ordinals#3630
@cryptoni9n cryptoni9n requested a review from raphjaph May 13, 2024 12:58
@HubertusVIE
Copy link

Thanks for this intiative! Do you think your'd be able to add #3677? It goes well with this one.

@cryptoni9n
Copy link
Collaborator Author

Thanks for this intiative! Do you think your'd be able to add #3677? It goes well with this one.

Hi HubertusVIE - the changes required for 3677 would be much, much more involved and I wouldn't even know where to begin. That change will need to be implemented by Casey and Raph because it involves upgrades to the protocol. This change that I've made only involves small updates to the rune webpage. They may seem like they go together nicely, but from a coding perspective, they are opposite ends of the spectrum.

@cryptoni9n
Copy link
Collaborator Author

I've reverted these changes in order to better understand the test failures they're triggering. Still working on this, just need to reevaluate the best way to move forward. Renaming the supply field in the .html page causes over 90 tests to fail.

@casey
Copy link
Collaborator

casey commented May 20, 2024

I think doing these one at a time would be a good idea. So, for example, start with supply progress, which I would actually call mint progress in a single PR. It's usually a good idea to make PRs simple and focused, so they can be reviewed easily, and then follow up with additional small PRs.

adding new field `mint progress` to rune.html to show the current supply of max supply ratio.
update batch function to account for new `mint_progress` field
added mint_progress to runes_are_displayed_on_rune_page test
added `mint_progress` to display test
@cryptoni9n
Copy link
Collaborator Author

I think doing these one at a time would be a good idea. So, for example, start with supply progress, which I would actually call mint progress in a single PR. It's usually a good idea to make PRs simple and focused, so they can be reviewed easily, and then follow up with additional small PRs.

Thank you, Casey - I appreciate your guidance and patience. I've taken your advice and just added the mint progress field to begin with. Please let me know what you think and what the next best step would be.

@casey
Copy link
Collaborator

casey commented May 22, 2024

Nice! I think mint progress should be expressed as a percentage with two digits after the decimal point. So it would be something like format!("{}%", minted as f64 / total_supply as f64}.

changing mint progress to percentage
changing `mint progress` to percentage
changing `mint progress` to percentage
changing `mint progress` to percentage
reverting previous changes; this file was accidentally included in this change.
changing `mint progress` to percentage
@cryptoni9n
Copy link
Collaborator Author

Nice! I think mint progress should be expressed as a percentage with two digits after the decimal point. So it would be something like format!("{}%", minted as f64 / total_supply as f64}.

how's this look to you?

Copy link
Collaborator

@raphjaph raphjaph left a comment

Choose a reason for hiding this comment

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

Thanks for simplifying this PR, this is much easier to review!

LGTM

@raphjaph
Copy link
Collaborator

Another tip for follow-up PRs:

It's always best to work on feature branches. Assuming you're on your master branch, this is what I recommend:

First pull in the latest changes from the ord (origin) repo by doing:

git pull origin master

Then create a local branch:

git checkout -b show-current-supply

Then make you changes and do git add, git commit, etc. Try to do a git push. You'll probably be prompted to something like this:

 git push --set-upstream cryptoni9n show-current-supply

Open a PR from that local branch which would have the name cryptoni9n/show-current-supply. After the PR has been reviewed and successfully merged you can delete the local branch by doing.

git checkout master
git branch -D show-current-supply

Repeat this for every feature/PR and you'll have a good work flow :)

@raphjaph raphjaph merged commit aba1d7a into ordinals:master May 24, 2024
5 checks passed
@cryptoni9n
Copy link
Collaborator Author

Thanks for the tip, @raphjaph - I've been really struggling with figuring out that process and so that is immensely helpful for me. I was already able to use this process once successfully on a new PR I just submitted.

@casey thank you again for your help on this. what would you recommend for the first additional follow up PR? I feel like the Premine Percentage isn't very intuitive in many cases. I would like to see it change or replace it with a different metric expressing the percentage as (premine/max_supply). In my previous attempts, I had renamed the supply field to current supply and renamed the premine percentage field to premine percentage of current supply. I also added new fields for maximum supply and premine percentage of maximum supply but I'm not sure all of that is necessary.

I hope memeing is supported on this platform.

7bfb1cc0245d6aefa017517d0e7e29a3361805c9787afb7e52686a82473820b9

@casey
Copy link
Collaborator

casey commented May 25, 2024

You bet!

I'm not actually sure I would want to expose "premine percentage of maximum supply", because it might not correspond to anything meaningful. The maximum supply can be very high, but if it never actually mints out, then that percentage is a bit misleading.

@cryptoni9n
Copy link
Collaborator Author

You bet!

I'm not actually sure I would want to expose "premine percentage of maximum supply", because it might not correspond to anything meaningful. The maximum supply can be very high, but if it never actually mints out, then that percentage is a bit misleading.

I see that point and agree. I feel the heart of the issue is when people would go to this mintable example rune page and see that the premine percentage is 99.83%, it seems to convey two incorrect ideas: 1) there is less than 1% left to mint and, 2) the etcher premined almost 100% of the rune. I understand that both of these are misconceptions based off of an incorrect understanding of the metric, but a lot of people don't get it visually.

At the same time, going to an unmintable example rune page and seeing the premine percentage of 100% makes perfect sense because it isn't mintable anymore and the same assumptions above are now correct, 1) there is 0% left to mint and 2) the etcher premined 100% of the rune.

I'm sure this is over complicating things, but it's almost as if there should be different stats for mintable vs unmintable/expired mint runes. Mintable runes could show current and maximum possible supply stats and percentages, to showcase the growth capability. Unmintable could have percent premined and other hard locked statistics, (supply instead of current or max supply, etc.). Also, I feel like showing the terms for an unmintable rune is largely unnecessary and should be de-emphasized somehow.

I'm sorry I'm not presenting any great solution suggestions, but this is the crux of what I think needs to be addressed. If there are no good ideas right now, we can park it for awhile and I will continue to noodle it.

@casey
Copy link
Collaborator

casey commented May 26, 2024

I do think it would be a good idea, once a rune is unmintable, to display the premine percentage as a percentage of the final supply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Premine percentage formula should use the total supply
4 participants