RavenProject / Ravencoin

Ravencoin Core integration/staging tree
https://www.ravencoin.org
MIT License
1.07k stars 673 forks source link

[GUI] Phase 3 Suggest - random rewards button (lucky money) #474

Closed gzhuji closed 5 years ago

gzhuji commented 5 years ago

Rewards allow payment in RVN to asset holders. If there is a random rewards button, all holders or some holders will get some random rewards in some events like annual draw.

TronBlack commented 5 years ago

Where would these funds come from?

kawww commented 5 years ago

Where would these funds come from?

  • Reduced coinbase?
  • Generous donors?
  • Increased reward (beyond 21B?)

I think "Reduced coinbase", from anyone who wants to send random assets or rvn to some addresses.

If asset holders will get some random lucky rewards someday, this is good for holding assets.

^^

I created some bat files for cli to do this.


address.txt from listaddressesbyasset.

"R9HtPsUp3wL2AWbG3tiNpYJ7jdGrj11YEK": 1.00000000, "R9JRaJYG35n95awTnwYoCXtUz4dVjapkzC": 50.00000000, "R9RdizLrGEKQWhjPZnhA6Ea2TQGr8PfdHJ": 1000.00000000, "R9TNoS9RUJLqJJfvmTah3tgeKAGH2VB2zA": 100.00000000, "R9VndG5bZ6RunomQw3pFFKcGqS4kScZMpd": 50.00000000, "R9XmJmKnR9h8ozLfhPY4aY72aAiYJpJSXc": 50.00000000, "R9YNV175NLS4shh8H3XX7D8QUV1cRpxh8p": 100.00000000, "R9YUzBoecagDEDsrDzfnL6GXwJGqvGbssz": 250.00000000, "R9Z2fj3XFKS18uWu9zu6SszbrUXaouimi2": 50.00000000, "R9ZRWH9CRwoE2x4UTt8cmgKATxwnGzdict": 50.00000000,

-------------------------Case A---this will send 1 or N asset to each address-------------------------------------

@echo off&setlocal enabledelayedexpansion for /f "delims=" %%i in (address.txt) do set "website=%%i"&call :s !website! pause :s set s=%1 set s=!s:~0,36! raven-cli.exe transfer "ASSET" 1 !s%! goto :eof

------------------------Case B-----this will send random 1-10 assets to each address ----------------------

@echo off&setlocal enabledelayedexpansion for /f "delims=" %%i in (address.txt) do set "website=%%i"&call :s !website! pause :s set s=%1 set s=!s:~0,36! set min=1 set max=10 set /a mod=!max!-!min!+1 set /a r=!random!%%!mod!+!min! raven-cli.exe transfer "ASSET" !r! !s%! goto :eof

------------------------Case C-----this will send random 1-10 rvn to each address --------------------------

@echo off&setlocal enabledelayedexpansion for /f "delims=" %%i in (address.txt) do set "website=%%i"&call :s !website! pause :s set s=%1 set s=!s:~0,36! set min=1 set max=10 set /a mod=!max!-!min!+1 set /a r=!random!%%!mod!+!min! raven-cli.exe sendtoaddress !s%! !r! goto :eof


More case ideas...

Send random 1-10 rvn or assets to the addresses which are holding more than 10 rvn or assets ... Send total 100 rvn to 1000 addresses, some addresses will get 1-10 rvn, some will get 0.01 rvn...

jeroz1 commented 5 years ago

I was under the impression that @Kin20101 asked for a function similar to dividends but instead of sending out RVN to holders, the feature picks a random holder and pays out X RVN. Something like a lottery, where asset tokens represent lottery tickets. @TronBlack . Personally, I think the use case is too specific and a function that returns addresses with all token holders might be a better solution to built a second layer implementation on (for e.g., the lottery draw).

blondfrogs commented 5 years ago

Closing as this isn't an issue. And can do done by getting all addresses in that own assets and selecting one of the randomly.