Safecoin Lottery System for Farming

Will someone please breakdown, Sesame Street style, how the lottery system for farming works?

Network agrees farming rate FR
users pay safecoin to store SS (calculate from FR)
farmers get farmed safecoin FS

so the farmer gets FS at a rate dependent on his rank (say between 0 and 1)
The global FR is calculated like this (not the equation this is elia5)
Get request satisfied by farmer. A random (but deterministic) number is calculated (this is the hash of several items such as message_id requester ID and the ID of all the close group to the farmer) this number is called NUMBER.

So we calculate if(NUMBER % FR == 0) { do farming request (try and get a safecoin)

the % means modulo division so if NUMBER divided by FR has no remainder then a farming request happens. So this is the lottery.

10 Likes

And, i think, “try to get a Safecoin” means: generate a random Safecoin address, and if it is not owned already, assign it to this farmer. If it’s already owned, the farm attempt fails.

Note: this automatically adjusts the issue rate in proportion to the number of Safecoin available to be issued. The number available is all those coin that have not been issued, plus those returned to the network (recycled) through payments for network services (i.e paid for spring data / PUT requests).

5 Likes

Any way to know how many Safecoins were farmed over the whole network?

1 Like

I would like to thank everyone for giving their time to help explain how this works.

2 Likes

I think a vault, or better closed groups, could maintain an accurate, though approximate, statistical estimate based on the recent ratio of successful to unsuccessful farming attempts.

2 Likes

So if someone wants to GET data, the process becomes a lottery between the 6 copies stored across the network of who will farm the request and thus get paid Safecoin? Is there a way to increase the likelihood that someone will get to farm, or is that not coded in?

Speak about it here:

1 Like

I have a question.

Is there a separate process for generating a random Safecoin address or does the process described by @dirvine above generate an unsigned long integer between 0 and 4294967295, (which is a safecoin address)?

It’s a good questions @kirkion, I’m not sure how this process is handled, but I will find out for you. David is getting a couple of days well earned break, but Prakash or Qi may know so I will ask the question and revert back.

The process described above generates a Safecoin Index (unsigned long integer between 0 and 4294967295), which is NOT a safecoin address.
A safecoin address is 512 bits long (or may be even longer), which is currently defined as a scrambling from the Index using deterministic algorithm (which is not a separate ‘process’ so far).

5 Likes

Might be just me, but calling this process a ‘lottery’ seems ill chosen. Due to associations with the word it makes it sound like it’s a winner-takes-all game, or a real form of gambling. While in practice it will spread out rather evenly. It’s more like a random distribution than a lottery.

5 Likes

I agree, I think that although the process is analogous to a lottery and we may be arguing semantics, “lottery” does have negative associations/connotations in my view…

1 Like

Ok, so the address is deterministically linked to the Index, and the point at which safecoins are differentiated from each other is at the Index level.

Thank you so much @qi_ma.

1 Like

Yeah, it’s actually more like roulette. :wink:

I like the term lottery, actually, and it IS winner take all–for that safecoin address.

I’d be interested in alternate naming proposals, though. Whatcha got?

1 Like

Yup, that’s the problem…can we think of a different/better analogy or fluffier synonym?
Maybe not actually.
Edit: I think the “money growing on trees” concept, maybe worth exploring further, both for explaining the process and maybe in advertising - Safenet, where money grows on trees or something…dunno…just typing as thinking…safecoin would be the fruit of the tree-as originally suggested - just complete the analogy with something other than a lottery…involving fruit farmers - cash crops…maybe another buzz word
Just thinking, when you break down the actual farming process, it’s not exactly a straightforward lottery, or perfect analogy – there are elements of “fitness to farm” and rewards awarded according/relative to “fitness” – there is an element of “Survival of the fittest” in there (not random selection) - maybe something else to consider for inspiration. Your chances of winning are also not purely random, ranking matters, doesn’t it? – Particularly if you are ranked 1.0, or .2 or .1, rather than .3 say – this loads the dice doesn’t it?