Some SAFE questions from a newbie

P { margin-bottom: 0.08in; }A:link {  }

Hi All,

Fevir here, trying to understand how
Safecoins operate in a more in-depth manner. I’ve read the forum, did
read the wiki on vaults, wallets, safecoins and the SAFE network, and
did some Googling, but still have some questions.

  1. Proof of Resource in relation to
    Safecoin – Can we state that proof of resource is not a consensus
    mechanism for safecoins, as proof of work is for bitcoin? Proof of
    resource seems to me a mechanism that determines the resources a node
    offers. The consensus mechanism in the SAFE network has not been
    named yet, but is based on a limited part of the network (32 nodes,
    named a Network Transaction Manager) reaching agreement on a
    transaction.
    Would that be correct?

If there’s only 32 nodes that know the
current owner of a coin, wouldn’t that be a risk (for all nodes to be
off line, thus no one being bale to verify the current owner status
and thus a double spend can occur) on a large (global) network, where
nodes come and go off line regularly?

  1. What happens when a double spend is
    detected?

  2. Farming is the process of providing
    resources (CPU, bandwidth and disk space) to the network. The
    usefullness of a vault is classified between 0 and 1, and part of the
    equation to obtain Safecoins.
    How is each resource being calculated?
    Is there a preference between the
    resources (e.g. CPU is more worth then bandwidth)?
    Who/what determines the classification
    (between 0 and 1) of a vault?
    What is the exact formula that
    determines the usefulness of a vault?
    What is the “mathematically
    verifiable way” on which validation of nodes and their resources
    takes place? (Safecoin : The Decentralised Network Token paper)
    Where is the outcoume of the node’s
    usefullness stored?

How often is this usefulness verified?
(say, I provide 2 Tera byte of data, and after initial verification
change that to 100 MB)

  1. In
    https://safenetwork.wiki/en/Safecoins_(How_it_works)
    the picture reads “third party transaction validator” - what is
    this entity?

  2. Once Alice sends coins (signing with
    her private key, verifying with public key by NTMs) to Bob, how are
    the coins assigned to Bob, so that only Bob can spend these coins?

  3. The word ‘atomic’ is used on some
    sites / papers. Does this refer to the pub/priv key signing of coins
    / data in the SAFE network?

  4. Who or what determines the role of a
    vault? Does this role change over time?
    https://safenetwork.wiki/en/Vaults_(How_it_works)

  5. How does a node initially connect to
    the network? Like Bitcoin, is there a hardcoded set of DNS servers in
    the wallet code?

Apologies for the wall of questions,
just being interested and curious how it works.

Thanks!

Fevir

SAFE dynamically maintain itself, so if a node go off line, another one will be elected to take it place.

So it’s 32 dynamically maintain nodes under high surveillance!

To boot the network there are some hard coded seed nodes, but once a node connects it begins maintaining its own locally stored list so it is no longer reliant on the boot nodes remaining online. I expect that should they disappear the network would continue, and new nodes can be “told” where to connect if the hard coded nodes have disappeared.

“Proof” of Resource is only fulfilled when a Vault successfully responds to a GET request for data it has been holding. Only then does it have the opportunity to request a reward of safecoin. The delivery of properly cared-for data is the “proof” that the resource has been provided. The request is confirmed by consensus of relevant nodes, to ensure that it is a valid request. Then it is luck of the draw as to whether there is a free safecoin to be farmed. So not all valid requests result in a safecoin award, but all requests are validated by consensus.

Hope this helps in part.

First come, first served.

SAFE coin have each his one address in XOR space. They stay at the same location. Even if I transfer the same coin to A and B in the same time. The coin does not move. Only the owner change. Double spend is impossible.

I may be wrong, it happen often. Someone correct me please.

1 Like

I don’t think double spend is impossible, just as in bitcoin it is feasible though the effect is different.

For example, if Bob can control a Safecoin by controlling the group that verifies modifications to it (which is very very hard for reasons I won’t go into - search for “double spend” here or check the wiki), then a coin could be “sent” to Alice, and then immediately somewhere else without Alice authorising it.

I don’t know what would happen in this case (for example would the coin disappear from Alice’s wallet, or wallet balance), except that she might think she has it under control when in fact she no longer does.

EDIT: A simpler more sensible example, but just as hard, is not a double spend, but an unauthorised spend: get control of a random coin and transfer it to yourself.

What I know is that it should be so hard to achieve that I’m not concerned about it.

To be able for him to control the group he have to control almost the whole network. And if that happen, the network is dead.

1 Like

According to my understanding, a double spend would work like this.

I simultaneously would send two request to the network. “Send coin A to user Alice” and “Send coin A to user Bob” those requests would be routed to Coin A’s 32 closest neighbors. They would all know that I am the owner of coin A. They would recognized that my signature is valid, and they would be willing to sign whichever transaction they saw first.

In order for the transaction to succeed however 28/32 of them need to agree to sign the transaction. Those who saw the Alice transaction first wouldn’t see the Bob transaction as being valid, as Alice would need to be the signature, not me. and those who saw the Bob transaction First would not accept the Alice transaction as Bob would need to be the signatory on that, not me. Until 28 of them agree, the transactions would not happen. Because it is Coin A’s neighbors are always the ones needed to approve a transaction, you are always asking the same machines to approve both.

Not sure how they are going to code what to do in a deadlock, but in any case it is manageable, and a double spend could not happen. The whole process would probably normally take less than a few seconds, so if you don’t see a confirmed transaction, you wouldn’t be fooled… (no need to wait for blockchain confirmation)

1 Like

The transaction for both will be rejected.

How long is the threshold? If I submit alice, bob, then alice again with the 2nd alice go through right away?

How long? At the network speed. But I don’t really understand your question even if I translate it to my language.

You submit to Alice and Bob at the same time. It’s 50/50 and both will be rejected. The 2nd Alice will be accepted if it’s alone. You don’t lose your coin if it’s rejected.