Visual BTC Generator - JS Client-Side Bitcoin Address ...

FlowCards: A Declarative Framework for Development of Ergo dApps

FlowCards: A Declarative Framework for Development of Ergo dApps
Introduction
ErgoScript is the smart contract language used by the Ergo blockchain. While it has concise syntax adopted from Scala/Kotlin, it still may seem confusing at first because conceptually ErgoScript is quite different compared to conventional languages which we all know and love. This is because Ergo is a UTXO based blockchain, whereas smart contracts are traditionally associated with account based systems like Ethereum. However, Ergo's transaction model has many advantages over the account based model and with the right approach it can even be significantly easier to develop Ergo contracts than to write and debug Solidity code.
Below we will cover the key aspects of the Ergo contract model which makes it different:
Paradigm
The account model of Ethereum is imperative. This means that the typical task of sending coins from Alice to Bob requires changing the balances in storage as a series of operations. Ergo's UTXO based programming model on the other hand is declarative. ErgoScript contracts specify conditions for a transaction to be accepted by the blockchain (not changes to be made in the storage state as result of the contract execution).
Scalability
In the account model of Ethereum both storage changes and validity checks are performed on-chain during code execution. In contrast, Ergo transactions are created off-chain and only validation checks are performed on-chain thus reducing the amount of operations performed by every node on the network. In addition, due to immutability of the transaction graph, various optimization strategies are possible to improve throughput of transactions per second in the network. Light verifying nodes are also possible thus further facilitating scalability and accessibility of the network.
Shared state
The account-based model is reliant on shared mutable state which is known to lead to complex semantics (and subtle million dollar bugs) in the context of concurrent/ distributed computation. Ergo's model is based on an immutable graph of transactions. This approach, inherited from Bitcoin, plays well with the concurrent and distributed nature of blockchains and facilitates light trustless clients.
Expressive Power
Ethereum advocated execution of a turing-complete language on the blockchain. It theoretically promised unlimited potential, however in practice severe limitations came to light from excessive blockchain bloat, subtle multi-million dollar bugs, gas costs which limit contract complexity, and other such problems. Ergo on the flip side extends UTXO to enable turing-completeness while limiting the complexity of the ErgoScript language itself. The same expressive power is achieved in a different and more semantically sound way.
With the all of the above points, it should be clear that there are a lot of benefits to the model Ergo is using. In the rest of this article I will introduce you to the concept of FlowCards - a dApp developer component which allows for designing complex Ergo contracts in a declarative and visual way.
From Imperative to Declarative
In the imperative programming model of Ethereum a transaction is a sequence of operations executed by the Ethereum VM. The following Solidity function implements a transfer of tokens from sender to receiver . The transaction starts when sender calls this function on an instance of a contract and ends when the function returns.
// Sends an amount of existing coins from any caller to an address function send(address receiver, uint amount) public { require(amount <= balances[msg.sender], "Insufficient balance."); balances[msg.sender] -= amount; balances[receiver] += amount; emit Sent(msg.sender, receiver, amount); } 
The function first checks the pre-conditions, then updates the storage (i.e. balances) and finally publishes the post-condition as the Sent event. The gas which is consumed by the transaction is sent to the miner as a reward for executing this transaction.
Unlike Ethereum, a transaction in Ergo is a data structure holding a list of input coins which it spends and a list of output coins which it creates preserving the total balances of ERGs and tokens (in which Ergo is similar to Bitcoin).
Turning back to the example above, since Ergo natively supports tokens, therefore for this specific example of sending tokens we don't need to write any code in ErgoScript. Instead we need to create the ‘send’ transaction shown in the following figure, which describes the same token transfer but declaratively.
https://preview.redd.it/id5kjdgn9tv41.png?width=1348&format=png&auto=webp&s=31b937d7ad0af4afe94f4d023e8c90c97c8aed2e
The picture visually describes the following steps, which the network user needs to perform:
  1. Select unspent sender's boxes, containing in total tB >= amount of tokens and B >= txFee + minErg ERGs.
  2. Create an output target box which is protected by the receiver public key with minErg ERGs and amount of T tokens.
  3. Create one fee output protected by the minerFee contract with txFee ERGs.
  4. Create one change output protected by the sender public key, containing B - minErg - txFee ERGs and tB - amount of T tokens.
  5. Create a new transaction, sign it using the sender's secret key and send to the Ergo network.
What is important to understand here is that all of these steps are preformed off-chain (for example using Appkit Transaction API) by the user's application. Ergo network nodes don't need to repeat this transaction creation process, they only need to validate the already formed transaction. ErgoScript contracts are stored in the inputs of the transaction and check spending conditions. The node executes the contracts on-chain when the transaction is validated. The transaction is valid if all of the conditions are satisfied.
Thus, in Ethereum when we “send amount from sender to recipient” we are literally editing balances and updating the storage with a concrete set of commands. This happens on-chain and thus a new transaction is also created on-chain as the result of this process.
In Ergo (as in Bitcoin) transactions are created off-chain and the network nodes only verify them. The effects of the transaction on the blockchain state is that input coins (or Boxes in Ergo's parlance) are removed and output boxes are added to the UTXO set.
In the example above we don't use an ErgoScript contract but instead assume a signature check is used as the spending pre-condition. However in more complex application scenarios we of course need to use ErgoScript which is what we are going to discuss next.
From Changing State to Checking Context
In the send function example we first checked the pre-condition (require(amount <= balances[msg.sender],...) ) and then changed the state (i.e. update balances balances[msg.sender] -= amount ). This is typical in Ethereum transactions. Before we change anything we need to check if it is valid to do so.
In Ergo, as we discussed previously, the state (i.e. UTXO set of boxes) is changed implicitly when a valid transaction is included in a block. Thus we only need to check the pre-conditions before the transaction can be added to the block. This is what ErgoScript contracts do.
It is not possible to “change the state” in ErgoScript because it is a language to check pre-conditions for spending coins. ErgoScript is a purely functional language without side effects that operates on immutable data values. This means all the inputs, outputs and other transaction parameters available in a script are immutable. This, among other things, makes ErgoScript a very simple language that is easy to learn and safe to use. Similar to Bitcoin, each input box contains a script, which should return the true value in order to 1) allow spending of the box (i.e. removing from the UTXO set) and 2) adding the transaction to the block.
If we are being pedantic, it is therefore incorrect (strictly speaking) to think of ErgoScript as the language of Ergo contracts, because it is the language of propositions (logical predicates, formulas, etc.) which protect boxes from “illegal” spending. Unlike Bitcoin, in Ergo the whole transaction and a part of the current blockchain context is available to every script. Therefore each script may check which outputs are created by the transaction, their ERG and token amounts (we will use this capability in our example DEX contracts), current block number etc.
In ErgoScript you define the conditions of whether changes (i.e. coin spending) are allowed to happen in a given context. This is in contrast to programming the changes imperatively in the code of a contract.
While Ergo's transaction model unlocks a whole range of applications like (DEX, DeFi Apps, LETS, etc), designing contracts as pre-conditions for coin spending (or guarding scripts) directly is not intuitive. In the next sections we will consider a useful graphical notation to design contracts declaratively using FlowCard Diagrams, which is a visual representation of executable components (FlowCards).
FlowCards aim to radically simplify dApp development on the Ergo platform by providing a high-level declarative language, execution runtime, storage format and a graphical notation.
We will start with a high level of diagrams and go down to FlowCard specification.
FlowCard Diagrams
The idea behind FlowCard diagrams is based on the following observations: 1) An Ergo box is immutable and can only be spent in the transaction which uses it as an input. 2) We therefore can draw a flow of boxes through transactions, so that boxes flowing in to the transaction are spent and those flowing out are created and added to the UTXO. 3) A transaction from this perspective is simply a transformer of old boxes to the new ones preserving the balances of ERGs and tokens involved.
The following figure shows the main elements of the Ergo transaction we've already seen previously (now under the name of FlowCard Diagram).
https://preview.redd.it/9kcxl11o9tv41.png?width=1304&format=png&auto=webp&s=378a7f50769292ca94de35ff597dc1a44af56d14
There is a strictly defined meaning (semantics) behind every element of the diagram, so that the diagram is a visual representation (or a view) of the underlying executable component (called FlowCard).
The FlowCard can be used as a reusable component of an Ergo dApp to create and initiate the transaction on the Ergo blockchain. We will discuss this in the coming sections.
Now let's look at the individual pieces of the FlowCard diagram one by one.
  1. Name and Parameters
Each flow card is given a name and a list of typed parameters. This is similar to a template with parameters. In the above figure we can see the Send flow card which has five parameters. The parameters are used in the specification.
  1. Contract Wallet
This is a key element of the flow card. Every box has a guarding script. Often it is the script that checks a signature against a public key. This script is trivial in ErgoScript and is defined like the def pk(pubkey: Address) = { pubkey } template where pubkey is a parameter of the type Address . In the figure, the script template is applied to the parameter pk(sender) and thus a concrete wallet contract is obtained. Therefore pk(sender) and pk(receiver) yield different scripts and represent different wallets on the diagram, even though they use the same template.
Contract Wallet contains a set of all UTXO boxes which have a given script derived from the given script template using flow card parameters. For example, in the figure, the template is pk and parameter pubkey is substituted with the `sender’ flow card parameter.
  1. Contract
Even though a contract is a property of a box, on the diagram we group the boxes by their contracts, therefore it looks like the boxes belong to the contracts, rather than the contracts belong to the boxes. In the example, we have three instantiated contracts pk(sender) , pk(receiver) and minerFee . Note, that pk(sender) is the instantiation of the pk template with the concrete parameter sender and minerFee is the instantiation of the pre-defined contract which protects the miner reward boxes.
  1. Box name
In the diagram we can give each box a name. Besides readability of the diagram, we also use the name as a synonym of a more complex indexed access to the box in the contract. For example, change is the name of the box, which can also be used in the ErgoScript conditions instead of OUTPUTS(2) . We also use box names to associate spending conditions with the boxes.
  1. Boxes in the wallet
In the diagram, we show boxes (darker rectangles) as belonging to the contract wallets (lighter rectangles). Each such box rectangle is connected with a grey transaction rectangle by either orange or green arrows or both. An output box (with an incoming green arrow) may include many lines of text where each line specifies a condition which should be checked as part of the transaction. The first line specifies the condition on the amount of ERG which should be placed in the box. Other lines may take one of the following forms:
  1. amount: TOKEN - the box should contain the given amount of the given TOKEN
  2. R == value - the box should contain the given value of the given register R
  3. boxName ? condition - the box named boxName should check condition in its script.
We discuss these conditions in the sections below.
  1. Amount of ERGs in the box
Each box should store a minimum amount of ERGs. This is checked when the creating transaction is validated. In the diagram the amount of ERGs is always shown as the first line (e.g. B: ERG or B - minErg - txFee ). The value type ascription B: ERG is optional and may be used for readability. When the value is given as a formula, then this formula should be respected by the transaction which creates the box.
It is important to understand that variables like amount and txFee are not named properties of the boxes. They are parameters of the whole diagram and representing some amounts. Or put it another way, they are shared parameters between transactions (e.g. Sell Order and Swap transactions from DEX example below share the tAmt parameter). So the same name is tied to the same value throughout the diagram (this is where the tooling would help a lot). However, when it comes to on-chain validation of those values, only explicit conditions which are marked with ? are transformed to ErgoScript. At the same time, all other conditions are ensured off-chain during transaction building (for example in an application using Appkit API) and transaction validation when it is added to the blockchain.
  1. Amount of T token
A box can store values of many tokens. The tokens on the diagram are named and a value variable may be associated with the token T using value: T expression. The value may be given by formula. If the formula is prefixed with a box name like boxName ? formula , then it is should also be checked in the guarding script of the boxName box. This additional specification is very convenient because 1) it allows to validate the visual design automatically, and 2) the conditions specified in the boxes of a diagram are enough to synthesize the necessary guarding scripts. (more about this below at “From Diagrams To ErgoScript Contracts”)
  1. Tx Inputs
Inputs are connected to the corresponding transaction by orange arrows. An input arrow may have a label of the following forms:
  1. [email protected] - optional name with an index i.e. [email protected] or u/2 . This is a property of the target endpoint of the arrow. The name is used in conditions of related boxes and the index is the position of the corresponding box in the INPUTS collection of the transaction.
  2. !action - is a property of the source of the arrow and gives a name for an alternative spending path of the box (we will see this in DEX example)
Because of alternative spending paths, a box may have many outgoing orange arrows, in which case they should be labeled with different actions.
  1. Transaction
A transaction spends input boxes and creates output boxes. The input boxes are given by the orange arrows and the labels are expected to put inputs at the right indexes in INPUTS collection. The output boxes are given by the green arrows. Each transaction should preserve a strict balance of ERG values (sum of inputs == sum of outputs) and for each token the sum of inputs >= the sum of outputs. The design diagram requires an explicit specification of the ERG and token values for all of the output boxes to avoid implicit errors and ensure better readability.
  1. Tx Outputs
Outputs are connected to the corresponding transaction by green arrows. An output arrow may have a label of the following [email protected] , where an optional name is accompanied with an index i.e. [email protected] or u/2 . This is a property of the source endpoint of the arrow. The name is used in conditions of the related boxes and the index is the position of the corresponding box in the OUTPUTS collection of the transaction.
Example: Decentralized Exchange (DEX)
Now let's use the above described notation to design a FlowCard for a DEX dApp. It is simple enough yet also illustrates all of the key features of FlowCard diagrams which we've introduced in the previous section.
The dApp scenario is shown in the figure below: There are three participants (buyer, seller and DEX) of the DEX dApp and five different transaction types, which are created by participants. The buyer wants to swap ergAmt of ERGs for tAmt of TID tokens (or vice versa, the seller wants to sell TID tokens for ERGs, who sends the order first doesn't matter). Both the buyer and the seller can cancel their orders any time. The DEX off-chain matching service can find matching orders and create the Swap transaction to complete the exchange.
The following diagram fully (and formally) specifies all of the five transactions that must be created off-chain by the DEX dApp. It also specifies all of the spending conditions that should be verified on-chain.

https://preview.redd.it/fnt5f4qp9tv41.png?width=1614&format=png&auto=webp&s=34f145f9a6d622454906857e645def2faba057bd
Let's discuss the FlowCard diagram and the logic of each transaction in details:
Buy Order Transaction
A buyer creates a Buy Order transaction. The transaction spends E amount of ERGs (which we will write E: ERG ) from one or more boxes in the pk(buyer) wallet. The transaction creates a bid box with ergAmt: ERG protected by the buyOrder script. The buyOrder script is synthesized from the specification (see below at “From Diagrams To ErgoScript Contracts”) either manually or automatically by a tool. Even though we don't need to define the buyOrder script explicitly during designing, at run time the bid box should contain the buyOrder script as the guarding proposition (which checks the box spending conditions), otherwise the conditions specified in the diagram will not be checked.
The change box is created to make the input and output sums of the transaction balanced. The transaction fee box is omitted because it can be added automatically by the tools. In practice, however, the designer can add the fee box explicitly to the a diagram. It covers the cases of more complex transactions (like Swap) where there are many ways to pay the transaction fee.
Cancel Buy, Cancel Sell Transactions
At any time, the buyer can cancel the order by sending CancelBuy transaction. The transaction should satisfy the guarding buyOrder contract which protects the bid box. As you can see on the diagram, both the Cancel and the Swap transactions can spend the bid box. When a box has spending alternatives (or spending paths) then each alternative is identified by a unique name prefixed with ! (!cancel and !swap for the bid box). Each alternative path has specific spending conditions. In our example, when the Cancel Buy transaction spends the bid box the ?buyer condition should be satisfied, which we read as “the signature for the buyer address should be presented in the transaction”. Therefore, only buyer can cancel the buy order. This “signature” condition is only required for the !cancel alternative spending path and not required for !swap .
Sell Order Transaction
The Sell Order transaction is similar to the BuyOrder in that it deals with tokens in addition to ERGs. The transaction spends E: ERG and T: TID tokens from seller's wallet (specified as pk(seller) contract). The two outputs are ask and change . The change is a standard box to balance transaction. The ask box keeps tAmt: TID tokens for the exchange and minErg: ERG - the minimum amount of ERGs required in every box.
Swap Transaction
This is a key transaction in the DEX dApp scenario. The transaction has several spending conditions on the input boxes and those conditions are included in the buyOrder and sellOrder scripts (which are verified when the transaction is added to the blockchain). However, on the diagram those conditions are not specified in the bid and ask boxes, they are instead defined in the output boxes of the transaction.
This is a convention for improved usability because most of the conditions relate to the properties of the output boxes. We could specify those properties in the bid box, but then we would have to use more complex expressions.
Let's consider the output created by the arrow labeled with [email protected] . This label tells us that the output is at the index 0 in the OUTPUTS collection of the transaction and that in the diagram we can refer to this box by the buyerOut name. Thus we can label both the box itself and the arrow to give the box a name.
The conditions shown in the buyerOut box have the form bid ? condition , which means they should be verified on-chain in order to spend the bid box. The conditions have the following meaning:
  • tAmt: TID requires the box to have tAmt amount of TID token
  • R4 == bid.id requires R4 register in the box to be equal to id of the bid box.
  • script == buyer requires the buyerOut box to have the script of the wallet where it is located on the diagram, i.e. pk(buyer)
Similar properties are added to the sellerOut box, which is specified to be at index 1 and the name is given to it using the label on the box itself, rather than on the arrow.
The Swap transaction spends two boxes bid and ask using the !swap spending path on both, however unlike !cancel the conditions on the path are not specified. This is where the bid ? and ask ? prefixes come into play. They are used so that the conditions listed in the buyerOut and sellerOut boxes are moved to the !swap spending path of the bid and ask boxes correspondingly.
If you look at the conditions of the output boxes, you will see that they exactly specify the swap of values between seller's and buyer's wallets. The buyer gets the necessary amount of TID token and seller gets the corresponding amount of ERGs. The Swap transaction is created when there are two matching boxes with buyOrder and sellOrder contracts.
From Diagrams To ErgoScript Contracts
What is interesting about FlowCard specifications is that we can use them to automatically generate the necessary ErgoTree scripts. With the appropriate tooling support this can be done automatically, but with the lack of thereof, it can be done manually. Thus, the FlowCard allows us to capture and visually represent all of the design choices and semantic details of an Ergo dApp.
What we are going to do next is to mechanically create the buyOrder contract from the information given in the DEX flow card.
Recall that each script is a proposition (boolean valued expression) which should evaluate to true to allow spending of the box. When we have many conditions to be met at the same time we can combine them in a logical formula using the AND binary operation, and if we have alternatives (not necessarily exclusive) we can put them into the OR operation.
The buyOrder box has the alternative spending paths !cancel and !swap . Thus the ErgoScript code should have OR operation with two arguments - one for each spending path.
/** buyOrder contract */ { val cancelCondition = {} val swapCondition = {} cancelCondition || swapCondition } 
The formula for the cancelCondition expression is given in the !cancel spending path of the buyOrder box. We can directly include it in the script.
/** buyOrder contract */ { val cancelCondition = { buyer } val swapCondition = {} cancelCondition || swapCondition } 
For the !swap spending path of the buyOrder box the conditions are specified in the buyerOut output box of the Swap transaction. If we simply include them in the swapCondition then we get a syntactically incorrect script.
/** buyOrder contract */ { val cancelCondition = { buyer } val swapCondition = { tAmt: TID && R4 == bid.id && @contract } cancelCondition || swapCondition } 
We can however translate the conditions from the diagram syntax to ErgoScript expressions using the following simple rules
  1. [email protected] ==> val buyerOut = OUTPUTS(0)
  2. tAmt: TID ==> tid._2 == tAmt where tid = buyerOut.tokens(TID)
  3. R4 == bid.id ==> R4 == SELF.id where R4 = buyerOut.R4[Coll[Byte]].get
  4. script == buyer ==> buyerOut.propositionBytes == buyer.propBytes
Note, in the diagram TID represents a token id, but ErgoScript doesn't have access to the tokens by the ids so we cannot write tokens.getByKey(TID) . For this reason, when the diagram is translated into ErgoScript, TID becomes a named constant of the index in tokens collection of the box. The concrete value of the constant is assigned when the BuyOrder transaction with the buyOrder box is created. The correspondence and consistency between the actual tokenId, the TID constant and the actual tokens of the buyerOut box is ensured by the off-chain application code, which is completely possible since all of the transactions are created by the application using FlowCard as a guiding specification. This may sound too complicated, but this is part of the translation from diagram specification to actual executable application code, most of which can be automated.
After the transformation we can obtain a correct script which checks all the required preconditions for spending the buyOrder box.
/** buyOrder contract */ def DEX(buyer: Addrss, seller: Address, TID: Int, ergAmt: Long, tAmt: Long) { val cancelCondition: SigmaProp = { buyer } // verify buyer's sig (ProveDlog) val swapCondition = OUTPUTS.size > 0 && { // securing OUTPUTS access val buyerOut = OUTPUTS(0) // from [email protected] buyerOut.tokens.size > TID && { // securing tokens access val tid = buyerOut.tokens(TID) val regR4 = buyerOut.R4[Coll[Byte]] regR4.isDefined && { // securing R4 access val R4 = regR4.get tid._2 == tAmt && // from tAmt: TID R4 == SELF.id && // from R4 == bid.id buyerOut.propositionBytes == buyer.propBytes // from script == buyer } } } cancelCondition || swapCondition } 
A similar script for the sellOrder box can be obtained using the same translation rules. With the help of the tooling the code of contracts can be mechanically generated from the diagram specification.
Conclusions
Declarative programming models have already won the battle against imperative programming in many application domains like Big Data, Stream Processing, Deep Learning, Databases, etc. Ergo is pioneering the declarative model of dApp development as a better and safer alternative to the now popular imperative model of smart contracts.
The concept of FlowCard shifts the focus from writing ErgoScript contracts to the overall flow of values (hence the name), in such a way, that ErgoScript can always be generated from them. You will never need to look at the ErgoScript code once the tooling is in place.
Here are the possible next steps for future work:
  1. Storage format for FlowCard Spec and the corresponding EIP standardized file format (Json/XML/Protobuf). This will allow various tools (Diagram Editor, Runtime, dApps etc) to create and use *.flowcard files.
  2. FlowCard Viewer, which can generate the diagrams from *.flowcard files.
  3. FlowCard Runtime, which can run *.flowcard files, create and send transactions to Ergo network.
  4. FlowCard Designer Tool, which can simplify development of complex diagrams . This will make designing and validation of Ergo contracts a pleasant experience, more like drawing rather than coding. In addition, the correctness of the whole dApp scenario can be verified and controlled by the tooling.
submitted by Guilty_Pea to CryptoCurrencies [link] [comments]

FlowCards: A Declarative Framework for Development of Ergo dApps

FlowCards: A Declarative Framework for Development of Ergo dApps
Introduction
ErgoScript is the smart contract language used by the Ergo blockchain. While it has concise syntax adopted from Scala/Kotlin, it still may seem confusing at first because conceptually ErgoScript is quite different compared to conventional languages which we all know and love. This is because Ergo is a UTXO based blockchain, whereas smart contracts are traditionally associated with account based systems like Ethereum. However, Ergo's transaction model has many advantages over the account based model and with the right approach it can even be significantly easier to develop Ergo contracts than to write and debug Solidity code.
Below we will cover the key aspects of the Ergo contract model which makes it different:
Paradigm
The account model of Ethereum is imperative. This means that the typical task of sending coins from Alice to Bob requires changing the balances in storage as a series of operations. Ergo's UTXO based programming model on the other hand is declarative. ErgoScript contracts specify conditions for a transaction to be accepted by the blockchain (not changes to be made in the storage state as result of the contract execution).
Scalability
In the account model of Ethereum both storage changes and validity checks are performed on-chain during code execution. In contrast, Ergo transactions are created off-chain and only validation checks are performed on-chain thus reducing the amount of operations performed by every node on the network. In addition, due to immutability of the transaction graph, various optimization strategies are possible to improve throughput of transactions per second in the network. Light verifying nodes are also possible thus further facilitating scalability and accessibility of the network.
Shared state
The account-based model is reliant on shared mutable state which is known to lead to complex semantics (and subtle million dollar bugs) in the context of concurrent/ distributed computation. Ergo's model is based on an immutable graph of transactions. This approach, inherited from Bitcoin, plays well with the concurrent and distributed nature of blockchains and facilitates light trustless clients.
Expressive Power
Ethereum advocated execution of a turing-complete language on the blockchain. It theoretically promised unlimited potential, however in practice severe limitations came to light from excessive blockchain bloat, subtle multi-million dollar bugs, gas costs which limit contract complexity, and other such problems. Ergo on the flip side extends UTXO to enable turing-completeness while limiting the complexity of the ErgoScript language itself. The same expressive power is achieved in a different and more semantically sound way.
With the all of the above points, it should be clear that there are a lot of benefits to the model Ergo is using. In the rest of this article I will introduce you to the concept of FlowCards - a dApp developer component which allows for designing complex Ergo contracts in a declarative and visual way.

From Imperative to Declarative

In the imperative programming model of Ethereum a transaction is a sequence of operations executed by the Ethereum VM. The following Solidity function implements a transfer of tokens from sender to receiver . The transaction starts when sender calls this function on an instance of a contract and ends when the function returns.
// Sends an amount of existing coins from any caller to an address function send(address receiver, uint amount) public { require(amount <= balances[msg.sender], "Insufficient balance."); balances[msg.sender] -= amount; balances[receiver] += amount; emit Sent(msg.sender, receiver, amount); } 
The function first checks the pre-conditions, then updates the storage (i.e. balances) and finally publishes the post-condition as the Sent event. The gas which is consumed by the transaction is sent to the miner as a reward for executing this transaction.
Unlike Ethereum, a transaction in Ergo is a data structure holding a list of input coins which it spends and a list of output coins which it creates preserving the total balances of ERGs and tokens (in which Ergo is similar to Bitcoin).
Turning back to the example above, since Ergo natively supports tokens, therefore for this specific example of sending tokens we don't need to write any code in ErgoScript. Instead we need to create the ‘send’ transaction shown in the following figure, which describes the same token transfer but declaratively.
https://preview.redd.it/sxs3kesvrsv41.png?width=1348&format=png&auto=webp&s=582382bc26912ff79114d831d937d94b6988e69f
The picture visually describes the following steps, which the network user needs to perform:
  1. Select unspent sender's boxes, containing in total tB >= amount of tokens and B >= txFee + minErg ERGs.
  2. Create an output target box which is protected by the receiver public key with minErg ERGs and amount of T tokens.
  3. Create one fee output protected by the minerFee contract with txFee ERGs.
  4. Create one change output protected by the sender public key, containing B - minErg - txFee ERGs and tB - amount of T tokens.
  5. Create a new transaction, sign it using the sender's secret key and send to the Ergo network.
What is important to understand here is that all of these steps are preformed off-chain (for example using Appkit Transaction API) by the user's application. Ergo network nodes don't need to repeat this transaction creation process, they only need to validate the already formed transaction. ErgoScript contracts are stored in the inputs of the transaction and check spending conditions. The node executes the contracts on-chain when the transaction is validated. The transaction is valid if all of the conditions are satisfied.
Thus, in Ethereum when we “send amount from sender to recipient” we are literally editing balances and updating the storage with a concrete set of commands. This happens on-chain and thus a new transaction is also created on-chain as the result of this process.
In Ergo (as in Bitcoin) transactions are created off-chain and the network nodes only verify them. The effects of the transaction on the blockchain state is that input coins (or Boxes in Ergo's parlance) are removed and output boxes are added to the UTXO set.
In the example above we don't use an ErgoScript contract but instead assume a signature check is used as the spending pre-condition. However in more complex application scenarios we of course need to use ErgoScript which is what we are going to discuss next.

From Changing State to Checking Context

In the send function example we first checked the pre-condition (require(amount <= balances[msg.sender],...) ) and then changed the state (i.e. update balances balances[msg.sender] -= amount ). This is typical in Ethereum transactions. Before we change anything we need to check if it is valid to do so.
In Ergo, as we discussed previously, the state (i.e. UTXO set of boxes) is changed implicitly when a valid transaction is included in a block. Thus we only need to check the pre-conditions before the transaction can be added to the block. This is what ErgoScript contracts do.
It is not possible to “change the state” in ErgoScript because it is a language to check pre-conditions for spending coins. ErgoScript is a purely functional language without side effects that operates on immutable data values. This means all the inputs, outputs and other transaction parameters available in a script are immutable. This, among other things, makes ErgoScript a very simple language that is easy to learn and safe to use. Similar to Bitcoin, each input box contains a script, which should return the true value in order to 1) allow spending of the box (i.e. removing from the UTXO set) and 2) adding the transaction to the block.
If we are being pedantic, it is therefore incorrect (strictly speaking) to think of ErgoScript as the language of Ergo contracts, because it is the language of propositions (logical predicates, formulas, etc.) which protect boxes from “illegal” spending. Unlike Bitcoin, in Ergo the whole transaction and a part of the current blockchain context is available to every script. Therefore each script may check which outputs are created by the transaction, their ERG and token amounts (we will use this capability in our example DEX contracts), current block number etc.
In ErgoScript you define the conditions of whether changes (i.e. coin spending) are allowed to happen in a given context. This is in contrast to programming the changes imperatively in the code of a contract.
While Ergo's transaction model unlocks a whole range of applications like (DEX, DeFi Apps, LETS, etc), designing contracts as pre-conditions for coin spending (or guarding scripts) directly is not intuitive. In the next sections we will consider a useful graphical notation to design contracts declaratively using FlowCard Diagrams, which is a visual representation of executable components (FlowCards).
FlowCards aim to radically simplify dApp development on the Ergo platform by providing a high-level declarative language, execution runtime, storage format and a graphical notation.
We will start with a high level of diagrams and go down to FlowCard specification.

FlowCard Diagrams

The idea behind FlowCard diagrams is based on the following observations: 1) An Ergo box is immutable and can only be spent in the transaction which uses it as an input. 2) We therefore can draw a flow of boxes through transactions, so that boxes flowing in to the transaction are spent and those flowing out are created and added to the UTXO. 3) A transaction from this perspective is simply a transformer of old boxes to the new ones preserving the balances of ERGs and tokens involved.
The following figure shows the main elements of the Ergo transaction we've already seen previously (now under the name of FlowCard Diagram).
https://preview.redd.it/06aqkcd1ssv41.png?width=1304&format=png&auto=webp&s=106eda730e0526919aabd5af9596b97e45b69777
There is a strictly defined meaning (semantics) behind every element of the diagram, so that the diagram is a visual representation (or a view) of the underlying executable component (called FlowCard).
The FlowCard can be used as a reusable component of an Ergo dApp to create and initiate the transaction on the Ergo blockchain. We will discuss this in the coming sections.
Now let's look at the individual pieces of the FlowCard diagram one by one.
1. Name and Parameters
Each flow card is given a name and a list of typed parameters. This is similar to a template with parameters. In the above figure we can see the Send flow card which has five parameters. The parameters are used in the specification.
2. Contract Wallet
This is a key element of the flow card. Every box has a guarding script. Often it is the script that checks a signature against a public key. This script is trivial in ErgoScript and is defined like the def pk(pubkey: Address) = { pubkey } template where pubkey is a parameter of the type Address . In the figure, the script template is applied to the parameter pk(sender) and thus a concrete wallet contract is obtained. Therefore pk(sender) and pk(receiver) yield different scripts and represent different wallets on the diagram, even though they use the same template.
Contract Wallet contains a set of all UTXO boxes which have a given script derived from the given script template using flow card parameters. For example, in the figure, the template is pk and parameter pubkey is substituted with the `sender’ flow card parameter.
3. Contract
Even though a contract is a property of a box, on the diagram we group the boxes by their contracts, therefore it looks like the boxes belong to the contracts, rather than the contracts belong to the boxes. In the example, we have three instantiated contracts pk(sender) , pk(receiver) and minerFee . Note, that pk(sender) is the instantiation of the pk template with the concrete parameter sender and minerFee is the instantiation of the pre-defined contract which protects the miner reward boxes.
4. Box name
In the diagram we can give each box a name. Besides readability of the diagram, we also use the name as a synonym of a more complex indexed access to the box in the contract. For example, change is the name of the box, which can also be used in the ErgoScript conditions instead of OUTPUTS(2) . We also use box names to associate spending conditions with the boxes.
5. Boxes in the wallet
In the diagram, we show boxes (darker rectangles) as belonging to the contract wallets (lighter rectangles). Each such box rectangle is connected with a grey transaction rectangle by either orange or green arrows or both. An output box (with an incoming green arrow) may include many lines of text where each line specifies a condition which should be checked as part of the transaction. The first line specifies the condition on the amount of ERG which should be placed in the box. Other lines may take one of the following forms:
  1. amount: TOKEN - the box should contain the given amount of the given TOKEN
  2. R == value - the box should contain the given value of the given register R
  3. boxName ? condition - the box named boxName should check condition in its script.
We discuss these conditions in the sections below.
6. Amount of ERGs in the box
Each box should store a minimum amount of ERGs. This is checked when the creating transaction is validated. In the diagram the amount of ERGs is always shown as the first line (e.g. B: ERG or B - minErg - txFee ). The value type ascription B: ERG is optional and may be used for readability. When the value is given as a formula, then this formula should be respected by the transaction which creates the box.
It is important to understand that variables like amount and txFee are not named properties of the boxes. They are parameters of the whole diagram and representing some amounts. Or put it another way, they are shared parameters between transactions (e.g. Sell Order and Swap transactions from DEX example below share the tAmt parameter). So the same name is tied to the same value throughout the diagram (this is where the tooling would help a lot). However, when it comes to on-chain validation of those values, only explicit conditions which are marked with ? are transformed to ErgoScript. At the same time, all other conditions are ensured off-chain during transaction building (for example in an application using Appkit API) and transaction validation when it is added to the blockchain.
7. Amount of T token
A box can store values of many tokens. The tokens on the diagram are named and a value variable may be associated with the token T using value: T expression. The value may be given by formula. If the formula is prefixed with a box name like boxName ? formula , then it is should also be checked in the guarding script of the boxName box. This additional specification is very convenient because 1) it allows to validate the visual design automatically, and 2) the conditions specified in the boxes of a diagram are enough to synthesize the necessary guarding scripts. (more about this below at “From Diagrams To ErgoScript Contracts”)
8. Tx Inputs
Inputs are connected to the corresponding transaction by orange arrows. An input arrow may have a label of the following forms:
  1. [email protected] - optional name with an index i.e. [email protected] or u/2 . This is a property of the target endpoint of the arrow. The name is used in conditions of related boxes and the index is the position of the corresponding box in the INPUTS collection of the transaction.
  2. !action - is a property of the source of the arrow and gives a name for an alternative spending path of the box (we will see this in DEX example)
Because of alternative spending paths, a box may have many outgoing orange arrows, in which case they should be labeled with different actions.
9. Transaction
A transaction spends input boxes and creates output boxes. The input boxes are given by the orange arrows and the labels are expected to put inputs at the right indexes in INPUTS collection. The output boxes are given by the green arrows. Each transaction should preserve a strict balance of ERG values (sum of inputs == sum of outputs) and for each token the sum of inputs >= the sum of outputs. The design diagram requires an explicit specification of the ERG and token values for all of the output boxes to avoid implicit errors and ensure better readability.
10. Tx Outputs
Outputs are connected to the corresponding transaction by green arrows. An output arrow may have a label of the following [email protected] , where an optional name is accompanied with an index i.e. [email protected] or u/2 . This is a property of the source endpoint of the arrow. The name is used in conditions of the related boxes and the index is the position of the corresponding box in the OUTPUTS collection of the transaction.

Example: Decentralized Exchange (DEX)

Now let's use the above described notation to design a FlowCard for a DEX dApp. It is simple enough yet also illustrates all of the key features of FlowCard diagrams which we've introduced in the previous section.
The dApp scenario is shown in the figure below: There are three participants (buyer, seller and DEX) of the DEX dApp and five different transaction types, which are created by participants. The buyer wants to swap ergAmt of ERGs for tAmt of TID tokens (or vice versa, the seller wants to sell TID tokens for ERGs, who sends the order first doesn't matter). Both the buyer and the seller can cancel their orders any time. The DEX off-chain matching service can find matching orders and create the Swap transaction to complete the exchange.
The following diagram fully (and formally) specifies all of the five transactions that must be created off-chain by the DEX dApp. It also specifies all of the spending conditions that should be verified on-chain.

https://preview.redd.it/piogz0v9ssv41.png?width=1614&format=png&auto=webp&s=e1b503a635ad3d138ef91e2f0c3b726e78958646
Let's discuss the FlowCard diagram and the logic of each transaction in details:
Buy Order Transaction
A buyer creates a Buy Order transaction. The transaction spends E amount of ERGs (which we will write E: ERG ) from one or more boxes in the pk(buyer) wallet. The transaction creates a bid box with ergAmt: ERG protected by the buyOrder script. The buyOrder script is synthesized from the specification (see below at “From Diagrams To ErgoScript Contracts”) either manually or automatically by a tool. Even though we don't need to define the buyOrder script explicitly during designing, at run time the bid box should contain the buyOrder script as the guarding proposition (which checks the box spending conditions), otherwise the conditions specified in the diagram will not be checked.
The change box is created to make the input and output sums of the transaction balanced. The transaction fee box is omitted because it can be added automatically by the tools. In practice, however, the designer can add the fee box explicitly to the a diagram. It covers the cases of more complex transactions (like Swap) where there are many ways to pay the transaction fee.
Cancel Buy, Cancel Sell Transactions
At any time, the buyer can cancel the order by sending CancelBuy transaction. The transaction should satisfy the guarding buyOrder contract which protects the bid box. As you can see on the diagram, both the Cancel and the Swap transactions can spend the bid box. When a box has spending alternatives (or spending paths) then each alternative is identified by a unique name prefixed with ! (!cancel and !swap for the bid box). Each alternative path has specific spending conditions. In our example, when the Cancel Buy transaction spends the bid box the ?buyer condition should be satisfied, which we read as “the signature for the buyer address should be presented in the transaction”. Therefore, only buyer can cancel the buy order. This “signature” condition is only required for the !cancel alternative spending path and not required for !swap .
Sell Order Transaction
The Sell Order transaction is similar to the BuyOrder in that it deals with tokens in addition to ERGs. The transaction spends E: ERG and T: TID tokens from seller's wallet (specified as pk(seller) contract). The two outputs are ask and change . The change is a standard box to balance transaction. The ask box keeps tAmt: TID tokens for the exchange and minErg: ERG - the minimum amount of ERGs required in every box.
Swap Transaction
This is a key transaction in the DEX dApp scenario. The transaction has several spending conditions on the input boxes and those conditions are included in the buyOrder and sellOrder scripts (which are verified when the transaction is added to the blockchain). However, on the diagram those conditions are not specified in the bid and ask boxes, they are instead defined in the output boxes of the transaction.
This is a convention for improved usability because most of the conditions relate to the properties of the output boxes. We could specify those properties in the bid box, but then we would have to use more complex expressions.
Let's consider the output created by the arrow labeled with [email protected] . This label tells us that the output is at the index 0 in the OUTPUTS collection of the transaction and that in the diagram we can refer to this box by the buyerOut name. Thus we can label both the box itself and the arrow to give the box a name.
The conditions shown in the buyerOut box have the form bid ? condition , which means they should be verified on-chain in order to spend the bid box. The conditions have the following meaning:
  • tAmt: TID requires the box to have tAmt amount of TID token
  • R4 == bid.id requires R4 register in the box to be equal to id of the bid box.
  • script == buyer requires the buyerOut box to have the script of the wallet where it is located on the diagram, i.e. pk(buyer)
Similar properties are added to the sellerOut box, which is specified to be at index 1 and the name is given to it using the label on the box itself, rather than on the arrow.
The Swap transaction spends two boxes bid and ask using the !swap spending path on both, however unlike !cancel the conditions on the path are not specified. This is where the bid ? and ask ? prefixes come into play. They are used so that the conditions listed in the buyerOut and sellerOut boxes are moved to the !swap spending path of the bid and ask boxes correspondingly.
If you look at the conditions of the output boxes, you will see that they exactly specify the swap of values between seller's and buyer's wallets. The buyer gets the necessary amount of TID token and seller gets the corresponding amount of ERGs. The Swap transaction is created when there are two matching boxes with buyOrder and sellOrder contracts.

From Diagrams To ErgoScript Contracts

What is interesting about FlowCard specifications is that we can use them to automatically generate the necessary ErgoTree scripts. With the appropriate tooling support this can be done automatically, but with the lack of thereof, it can be done manually. Thus, the FlowCard allows us to capture and visually represent all of the design choices and semantic details of an Ergo dApp.
What we are going to do next is to mechanically create the buyOrder contract from the information given in the DEX flow card.
Recall that each script is a proposition (boolean valued expression) which should evaluate to true to allow spending of the box. When we have many conditions to be met at the same time we can combine them in a logical formula using the AND binary operation, and if we have alternatives (not necessarily exclusive) we can put them into the OR operation.
The buyOrder box has the alternative spending paths !cancel and !swap . Thus the ErgoScript code should have OR operation with two arguments - one for each spending path.
/** buyOrder contract */ { val cancelCondition = {} val swapCondition = {} cancelCondition || swapCondition } 
The formula for the cancelCondition expression is given in the !cancel spending path of the buyOrder box. We can directly include it in the script.
/** buyOrder contract */ { val cancelCondition = { buyer } val swapCondition = {} cancelCondition || swapCondition } 
For the !swap spending path of the buyOrder box the conditions are specified in the buyerOut output box of the Swap transaction. If we simply include them in the swapCondition then we get a syntactically incorrect script.
/** buyOrder contract */ { val cancelCondition = { buyer } val swapCondition = { tAmt: TID && R4 == bid.id && @contract } cancelCondition || swapCondition } 
We can however translate the conditions from the diagram syntax to ErgoScript expressions using the following simple rules
  1. [email protected] ==> val buyerOut = OUTPUTS(0)
  2. tAmt: TID ==> tid._2 == tAmt where tid = buyerOut.tokens(TID)
  3. R4 == bid.id ==> R4 == SELF.id where R4 = buyerOut.R4[Coll[Byte]].get
  4. script == buyer ==> buyerOut.propositionBytes == buyer.propBytes
Note, in the diagram TID represents a token id, but ErgoScript doesn't have access to the tokens by the ids so we cannot write tokens.getByKey(TID) . For this reason, when the diagram is translated into ErgoScript, TID becomes a named constant of the index in tokens collection of the box. The concrete value of the constant is assigned when the BuyOrder transaction with the buyOrder box is created. The correspondence and consistency between the actual tokenId, the TID constant and the actual tokens of the buyerOut box is ensured by the off-chain application code, which is completely possible since all of the transactions are created by the application using FlowCard as a guiding specification. This may sound too complicated, but this is part of the translation from diagram specification to actual executable application code, most of which can be automated.
After the transformation we can obtain a correct script which checks all the required preconditions for spending the buyOrder box.
/** buyOrder contract */ def DEX(buyer: Addrss, seller: Address, TID: Int, ergAmt: Long, tAmt: Long) { val cancelCondition: SigmaProp = { buyer } // verify buyer's sig (ProveDlog) val swapCondition = OUTPUTS.size > 0 && { // securing OUTPUTS access val buyerOut = OUTPUTS(0) // from [email protected] buyerOut.tokens.size > TID && { // securing tokens access val tid = buyerOut.tokens(TID) val regR4 = buyerOut.R4[Coll[Byte]] regR4.isDefined && { // securing R4 access val R4 = regR4.get tid._2 == tAmt && // from tAmt: TID R4 == SELF.id && // from R4 == bid.id buyerOut.propositionBytes == buyer.propBytes // from script == buyer } } } cancelCondition || swapCondition } 
A similar script for the sellOrder box can be obtained using the same translation rules. With the help of the tooling the code of contracts can be mechanically generated from the diagram specification.

Conclusions

Declarative programming models have already won the battle against imperative programming in many application domains like Big Data, Stream Processing, Deep Learning, Databases, etc. Ergo is pioneering the declarative model of dApp development as a better and safer alternative to the now popular imperative model of smart contracts.
The concept of FlowCard shifts the focus from writing ErgoScript contracts to the overall flow of values (hence the name), in such a way, that ErgoScript can always be generated from them. You will never need to look at the ErgoScript code once the tooling is in place.
Here are the possible next steps for future work:
  1. Storage format for FlowCard Spec and the corresponding EIP standardized file format (Json/XML/Protobuf). This will allow various tools (Diagram Editor, Runtime, dApps etc) to create and use *.flowcard files.
  2. FlowCard Viewer, which can generate the diagrams from *.flowcard files.
  3. FlowCard Runtime, which can run *.flowcard files, create and send transactions to Ergo network.
  4. FlowCard Designer Tool, which can simplify development of complex diagrams . This will make designing and validation of Ergo contracts a pleasant experience, more like drawing rather than coding. In addition, the correctness of the whole dApp scenario can be verified and controlled by the tooling.
submitted by eleanorcwhite to btc [link] [comments]

Technical: A Brief History of Payment Channels: from Satoshi to Lightning Network

Who cares about political tweets from some random country's president when payment channels are a much more interesting and are actually capable of carrying value?
So let's have a short history of various payment channel techs!

Generation 0: Satoshi's Broken nSequence Channels

Because Satoshi's Vision included payment channels, except his implementation sucked so hard we had to go fix it and added RBF as a by-product.
Originally, the plan for nSequence was that mempools would replace any transaction spending certain inputs with another transaction spending the same inputs, but only if the nSequence field of the replacement was larger.
Since 0xFFFFFFFF was the highest value that nSequence could get, this would mark a transaction as "final" and not replaceable on the mempool anymore.
In fact, this "nSequence channel" I will describe is the reason why we have this weird rule about nLockTime and nSequence. nLockTime actually only works if nSequence is not 0xFFFFFFFF i.e. final. If nSequence is 0xFFFFFFFF then nLockTime is ignored, because this if the "final" version of the transaction.
So what you'd do would be something like this:
  1. You go to a bar and promise the bartender to pay by the time the bar closes. Because this is the Bitcoin universe, time is measured in blockheight, so the closing time of the bar is indicated as some future blockheight.
  2. For your first drink, you'd make a transaction paying to the bartender for that drink, paying from some coins you have. The transaction has an nLockTime equal to the closing time of the bar, and a starting nSequence of 0. You hand over the transaction and the bartender hands you your drink.
  3. For your succeeding drink, you'd remake the same transaction, adding the payment for that drink to the transaction output that goes to the bartender (so that output keeps getting larger, by the amount of payment), and having an nSequence that is one higher than the previous one.
  4. Eventually you have to stop drinking. It comes down to one of two possibilities:
    • You drink until the bar closes. Since it is now the nLockTime indicated in the transaction, the bartender is able to broadcast the latest transaction and tells the bouncers to kick you out of the bar.
    • You wisely consider the state of your liver. So you re-sign the last transaction with a "final" nSequence of 0xFFFFFFFF i.e. the maximum possible value it can have. This allows the bartender to get his or her funds immediately (nLockTime is ignored if nSequence is 0xFFFFFFFF), so he or she tells the bouncers to let you out of the bar.
Now that of course is a payment channel. Individual payments (purchases of alcohol, so I guess buying coffee is not in scope for payment channels). Closing is done by creating a "final" transaction that is the sum of the individual payments. Sure there's no routing and channels are unidirectional and channels have a maximum lifetime but give Satoshi a break, he was also busy inventing Bitcoin at the time.
Now if you noticed I called this kind of payment channel "broken". This is because the mempool rules are not consensus rules, and cannot be validated (nothing about the mempool can be validated onchain: I sigh every time somebody proposes "let's make block size dependent on mempool size", mempool state cannot be validated by onchain data). Fullnodes can't see all of the transactions you signed, and then validate that the final one with the maximum nSequence is the one that actually is used onchain. So you can do the below:
  1. Become friends with Jihan Wu, because he owns >51% of the mining hashrate (he totally reorged Bitcoin to reverse the Binance hack right?).
  2. Slip Jihan Wu some of the more interesting drinks you're ordering as an incentive to cooperate with you. So say you end up ordering 100 drinks, you split it with Jihan Wu and give him 50 of the drinks.
  3. When the bar closes, Jihan Wu quickly calls his mining rig and tells them to mine the version of your transaction with nSequence 0. You know, that first one where you pay for only one drink.
  4. Because fullnodes cannot validate nSequence, they'll accept even the nSequence=0 version and confirm it, immutably adding you paying for a single alcoholic drink to the blockchain.
  5. The bartender, pissed at being cheated, takes out a shotgun from under the bar and shoots at you and Jihan Wu.
  6. Jihan Wu uses his mystical chi powers (actually the combined exhaust from all of his mining rigs) to slow down the shotgun pellets, making them hit you as softly as petals drifting in the wind.
  7. The bartender mutters some words, clothes ripping apart as he or she (hard to believe it could be a she but hey) turns into a bear, ready to maul you for cheating him or her of the payment for all the 100 drinks you ordered from him or her.
  8. Steely-eyed, you stand in front of the bartender-turned-bear, daring him to touch you. You've watched Revenant, you know Leonardo di Caprio could survive a bear mauling, and if some posh actor can survive that, you know you can too. You make a pose. "Drunken troll logic attack!"
  9. I think I got sidetracked here.
Lessons learned?

Spilman Channels

Incentive-compatible time-limited unidirectional channel; or, Satoshi's Vision, Fixed (if transaction malleability hadn't been a problem, that is).
Now, we know the bartender will turn into a bear and maul you if you try to cheat the payment channel, and now that we've revealed you're good friends with Jihan Wu, the bartender will no longer accept a payment channel scheme that lets one you cooperate with a miner to cheat the bartender.
Fortunately, Jeremy Spilman proposed a better way that would not let you cheat the bartender.
First, you and the bartender perform this ritual:
  1. You get some funds and create a transaction that pays to a 2-of-2 multisig between you and the bartender. You don't broadcast this yet: you just sign it and get its txid.
  2. You create another transaction that spends the above transaction. This transaction (the "backoff") has an nLockTime equal to the closing time of the bar, plus one block. You sign it and give this backoff transaction (but not the above transaction) to the bartender.
  3. The bartender signs the backoff and gives it back to you. It is now valid since it's spending a 2-of-2 of you and the bartender, and both of you have signed the backoff transaction.
  4. Now you broadcast the first transaction onchain. You and the bartender wait for it to be deeply confirmed, then you can start ordering.
The above is probably vaguely familiar to LN users. It's the funding process of payment channels! The first transaction, the one that pays to a 2-of-2 multisig, is the funding transaction that backs the payment channel funds.
So now you start ordering in this way:
  1. For your first drink, you create a transaction spending the funding transaction output and sending the price of the drink to the bartender, with the rest returning to you.
  2. You sign the transaction and pass it to the bartender, who serves your first drink.
  3. For your succeeding drinks, you recreate the same transaction, adding the price of the new drink to the sum that goes to the bartender and reducing the money returned to you. You sign the transaction and give it to the bartender, who serves you your next drink.
  4. At the end:
    • If the bar closing time is reached, the bartender signs the latest transaction, completing the needed 2-of-2 signatures and broadcasting this to the Bitcoin network. Since the backoff transaction is the closing time + 1, it can't get used at closing time.
    • If you decide you want to leave early because your liver is crying, you just tell the bartender to go ahead and close the channel (which the bartender can do at any time by just signing and broadcasting the latest transaction: the bartender won't do that because he or she is hoping you'll stay and drink more).
    • If you ended up just hanging around the bar and never ordering, then at closing time + 1 you broadcast the backoff transaction and get your funds back in full.
Now, even if you pass 50 drinks to Jihan Wu, you can't give him the first transaction (the one which pays for only one drink) and ask him to mine it: it's spending a 2-of-2 and the copy you have only contains your own signature. You need the bartender's signature to make it valid, but he or she sure as hell isn't going to cooperate in something that would lose him or her money, so a signature from the bartender validating old state where he or she gets paid less isn't going to happen.
So, problem solved, right? Right? Okay, let's try it. So you get your funds, put them in a funding tx, get the backoff tx, confirm the funding tx...
Once the funding transaction confirms deeply, the bartender laughs uproariously. He or she summons the bouncers, who surround you menacingly.
"I'm refusing service to you," the bartender says.
"Fine," you say. "I was leaving anyway;" You smirk. "I'll get back my money with the backoff transaction, and posting about your poor service on reddit so you get negative karma, so there!"
"Not so fast," the bartender says. His or her voice chills your bones. It looks like your exploitation of the Satoshi nSequence payment channel is still fresh in his or her mind. "Look at the txid of the funding transaction that got confirmed."
"What about it?" you ask nonchalantly, as you flip open your desktop computer and open a reputable blockchain explorer.
What you see shocks you.
"What the --- the txid is different! You--- you changed my signature?? But how? I put the only copy of my private key in a sealed envelope in a cast-iron box inside a safe buried in the Gobi desert protected by a clan of nomads who have dedicated their lives and their childrens' lives to keeping my private key safe in perpetuity!"
"Didn't you know?" the bartender asks. "The components of the signature are just very large numbers. The sign of one of the signature components can be changed, from positive to negative, or negative to positive, and the signature will remain valid. Anyone can do that, even if they don't know the private key. But because Bitcoin includes the signatures in the transaction when it's generating the txid, this little change also changes the txid." He or she chuckles. "They say they'll fix it by separating the signatures from the transaction body. They're saying that these kinds of signature malleability won't affect transaction ids anymore after they do this, but I bet I can get my good friend Jihan Wu to delay this 'SepSig' plan for a good while yet. Friendly guy, this Jihan Wu, it turns out all I had to do was slip him 51 drinks and he was willing to mine a tx with the signature signs flipped." His or her grin widens. "I'm afraid your backoff transaction won't work anymore, since it spends a txid that is not existent and will never be confirmed. So here's the deal. You pay me 99% of the funds in the funding transaction, in exchange for me signing the transaction that spends with the txid that you see onchain. Refuse, and you lose 100% of the funds and every other HODLer, including me, benefits from the reduction in coin supply. Accept, and you get to keep 1%. I lose nothing if you refuse, so I won't care if you do, but consider the difference of getting zilch vs. getting 1% of your funds." His or her eyes glow. "GENUFLECT RIGHT NOW."
Lesson learned?

CLTV-protected Spilman Channels

Using CLTV for the backoff branch.
This variation is simply Spilman channels, but with the backoff transaction replaced with a backoff branch in the SCRIPT you pay to. It only became possible after OP_CHECKLOCKTIMEVERIFY (CLTV) was enabled in 2015.
Now as we saw in the Spilman Channels discussion, transaction malleability means that any pre-signed offchain transaction can easily be invalidated by flipping the sign of the signature of the funding transaction while the funding transaction is not yet confirmed.
This can be avoided by simply putting any special requirements into an explicit branch of the Bitcoin SCRIPT. Now, the backoff branch is supposed to create a maximum lifetime for the payment channel, and prior to the introduction of OP_CHECKLOCKTIMEVERIFY this could only be done by having a pre-signed nLockTime transaction.
With CLTV, however, we can now make the branches explicit in the SCRIPT that the funding transaction pays to.
Instead of paying to a 2-of-2 in order to set up the funding transaction, you pay to a SCRIPT which is basically "2-of-2, OR this singlesig after a specified lock time".
With this, there is no backoff transaction that is pre-signed and which refers to a specific txid. Instead, you can create the backoff transaction later, using whatever txid the funding transaction ends up being confirmed under. Since the funding transaction is immutable once confirmed, it is no longer possible to change the txid afterwards.

Todd Micropayment Networks

The old hub-spoke model (that isn't how LN today actually works).
One of the more direct predecessors of the Lightning Network was the hub-spoke model discussed by Peter Todd. In this model, instead of payers directly having channels to payees, payers and payees connect to a central hub server. This allows any payer to pay any payee, using the same channel for every payee on the hub. Similarly, this allows any payee to receive from any payer, using the same channel.
Remember from the above Spilman example? When you open a channel to the bartender, you have to wait around for the funding tx to confirm. This will take an hour at best. Now consider that you have to make channels for everyone you want to pay to. That's not very scalable.
So the Todd hub-spoke model has a central "clearing house" that transport money from payers to payees. The "Moonbeam" project takes this model. Of course, this reveals to the hub who the payer and payee are, and thus the hub can potentially censor transactions. Generally, though, it was considered that a hub would more efficiently censor by just not maintaining a channel with the payer or payee that it wants to censor (since the money it owned in the channel would just be locked uselessly if the hub won't process payments to/from the censored user).
In any case, the ability of the central hub to monitor payments means that it can surveill the payer and payee, and then sell this private transactional data to third parties. This loss of privacy would be intolerable today.
Peter Todd also proposed that there might be multiple hubs that could transport funds to each other on behalf of their users, providing somewhat better privacy.
Another point of note is that at the time such networks were proposed, only unidirectional (Spilman) channels were available. Thus, while one could be a payer, or payee, you would have to use separate channels for your income versus for your spending. Worse, if you wanted to transfer money from your income channel to your spending channel, you had to close both and reshuffle the money between them, both onchain activities.

Poon-Dryja Lightning Network

Bidirectional two-participant channels.
The Poon-Dryja channel mechanism has two important properties:
Both the original Satoshi and the two Spilman variants are unidirectional: there is a payer and a payee, and if the payee wants to do a refund, or wants to pay for a different service or product the payer is providing, then they can't use the same unidirectional channel.
The Poon-Dryjam mechanism allows channels, however, to be bidirectional instead: you are not a payer or a payee on the channel, you can receive or send at any time as long as both you and the channel counterparty are online.
Further, unlike either of the Spilman variants, there is no time limit for the lifetime of a channel. Instead, you can keep the channel open for as long as you want.
Both properties, together, form a very powerful scaling property that I believe most people have not appreciated. With unidirectional channels, as mentioned before, if you both earn and spend over the same network of payment channels, you would have separate channels for earning and spending. You would then need to perform onchain operations to "reverse" the directions of your channels periodically. Secondly, since Spilman channels have a fixed lifetime, even if you never used either channel, you would have to periodically "refresh" it by closing it and reopening.
With bidirectional, indefinite-lifetime channels, you may instead open some channels when you first begin managing your own money, then close them only after your lawyers have executed your last will and testament on how the money in your channels get divided up to your heirs: that's just two onchain transactions in your entire lifetime. That is the potentially very powerful scaling property that bidirectional, indefinite-lifetime channels allow.
I won't discuss the transaction structure needed for Poon-Dryja bidirectional channels --- it's complicated and you can easily get explanations with cute graphics elsewhere.
There is a weakness of Poon-Dryja that people tend to gloss over (because it was fixed very well by RustyReddit):
Another thing I want to emphasize is that while the Lightning Network paper and many of the earlier presentations developed from the old Peter Todd hub-and-spoke model, the modern Lightning Network takes the logical conclusion of removing a strict separation between "hubs" and "spokes". Any node on the Lightning Network can very well work as a hub for any other node. Thus, while you might operate as "mostly a payer", "mostly a forwarding node", "mostly a payee", you still end up being at least partially a forwarding node ("hub") on the network, at least part of the time. This greatly reduces the problems of privacy inherent in having only a few hub nodes: forwarding nodes cannot get significantly useful data from the payments passing through them, because the distance between the payer and the payee can be so large that it would be likely that the ultimate payer and the ultimate payee could be anyone on the Lightning Network.
Lessons learned?

Future

After LN, there's also the Decker-Wattenhofer Duplex Micropayment Channels (DMC). This post is long enough as-is, LOL. But for now, it uses a novel "decrementing nSequence channel", using the new relative-timelock semantics of nSequence (not the broken one originally by Satoshi). It actually uses multiple such "decrementing nSequence" constructs, terminating in a pair of Spilman channels, one in both directions (thus "duplex"). Maybe I'll discuss it some other time.
The realization that channel constructions could actually hold more channel constructions inside them (the way the Decker-Wattenhofer puts a pair of Spilman channels inside a series of "decrementing nSequence channels") lead to the further thought behind Burchert-Decker-Wattenhofer channel factories. Basically, you could host multiple two-participant channel constructs inside a larger multiparticipant "channel" construct (i.e. host multiple channels inside a factory).
Further, we have the Decker-Russell-Osuntokun or "eltoo" construction. I'd argue that this is "nSequence done right". I'll write more about this later, because this post is long enough.
Lessons learned?
submitted by almkglor to Bitcoin [link] [comments]

My Ethereum Prediction From 2017. Still Think I was Wrong?

Link to the original post is at the bottom.

Ethereum made one mistake, talking about its future contributions before people could fully perceive them. for anyone that believes ethereum is undervalued it is my opinion you cannot comprehend abstract ideas or conceptualize what ehtereum and blockchain technology actually is.
cryptocurrencies as a digital asset are cool, fun to play with and not typically a bad investment as they are based off the value of bitcoin.
bitcoin as a form of currency has its place and will more than likely ( by means of Litecoin ) aquire a 50 billion dollar market share of cross border money transfer services current rates require 10%+ of the sent value. litecoin does this for about 1%-10% of that. (0.01%-1% and in actuality less in most cases ) divide 84 million coins (max available at production end) by 500 billion (yearly cross border money transfers) roughly $4500 per coin is the minimum value of each coin to cover just one year of money transfers. rest assured it will be higher.
ethereum is efficiency , it is balance, equality, cooperation, innovation, security, and accountability. Ethereum is progress in the name of the greater good of all mankind not just the elite. Ethereum is a social Democracy
all of this sounds nice .... which is what Ethereum promises. people need proof before investing. and that is why you will be just a moment to late. because once it's a sure thing everyone will be investing.
blockchain technology is the real use of digital assets. imagine the following, all media content can be easily published on the blockchain providing two advantages, instant alert to its previous creation if applicable (through the entire database being accessible for instant search and comparison of all published media ) instant encryption ensuring piracy is lessened ( future application software will not be downloadable its code will exist in the ethereum "cloud based" network) the media can be viewed, shared, or done with as is desired, but only to the limits permitted by its creator and only when accessed through a supported ethereum network affiliate using ethereums "Token" to powe rthe software allowing the creator of the content to share their creation. furthermore the creator is capable of issuing their own proprietary tokens that allow them to essentially grant access to their creation to anyone in posession of their "token"
The reason that you cannot comprehend Ethereum is the same reason your parents dont understand bitcoin, why your grandma will never comprehend the internet, why her mother doubted electricity, and her mother didnt see how coal could move a 50 ton train. that reason ? you are all just one generation behind in respect to grasping the concept, for which you have nothing to base its technology off of Ethereum is the next step in innovation. we all wondered what form the next leap in progress would take every great leap in technology is not recognized immediately but when initiated they cannot be stopped. the chain cannot be stopped it just moves forward. building on every advancement that comes before it.
whatare these apps ?.....
medical information will be on ethereum network.... the entire medical database of the world will be connected. acting as a living network updated instantaneously patients symptoms will have quantifiable values, vital statistics will be available for every patient that has ever had the symptoms that any given patient comes in with. by inputting the data of a patient the network uses event related probability to calculate a given set of all possible cases where the data matched with other patients ( millions of variables are considered in an instant.) to diagnose and treat patients according to the most succesful course of action as time goes on after years of trial and error the data will eventually reach a near 100% success rate. faster than we ever thought possible.
Television. cable will end see my remaining thoughts down below for why. netflix style content will replace it. tokens will be distributed. by movie producers meaning a handful of affiliates have access to the rights to distribute them. and netflix will require you to buy its token to have access.
pandora style radio tokens
gps tokens,
but why ?
by making specific tokens account for specific services we can prevent inflation. we also give a value to our money supply. remember when we had money backed by gold ? a dollar could be exchanged for its value in gold. well thats your answer. we have returned to a barter system where i can trade my own services for your services or a future promise that you can at any time redeem said token for my service, or trade for other services. ultimately our money can be thought of as bitcoin and the gold is all other coins. fiat or at least a hard money currency will always exist although two things will occur because of that. people will not be as likely to keep large amounts of money outside of the system as it will depreciate. in most cases over long periods of time. take 10 dollars out for a year and when you come back to buy the equivelent in bitcoin you will likely receive less than if it stayd in the system. where as hard currency versions of bitcoin will retain their value. that theory should hold until 2041 when all coins have been mined and by that time i would bet everyone has jumpedon board. and global currencies will have traded in their fiatmoney to make huge gains from the appreciation of bitcoin integration. i believe bitcoin will be more than an investment it is a replacement as well as a return to the gold standard.
if my outlook holds true then wewill all get an identity token. with that token you can vote on everything from what to spend the pto funds on to what roads need to be built in your city to whether that 150 million dollars should go towards researching the effects of mustard gas on purple monkeys or if it might be better served providing 2 and a half million children with water that hasnt been filled with biological waste. or maybe to give power to 20 million human beings that have lived their entire life without it.
we will have a global currency (bitcoin) and all goods and services will add to its overall marketcap. one services sucess adds to the value of all services. if you do roofing in the the summer your toens will be more valuable. if people cant afford your service then they can contribute to the mining of that service if you allow it. if yoou want to support a cause like funding research on autism then you can go and buy their coin. their service is to find a cure and if its important to people then they will continue to do so. if it is meaningless we as a society will not buy their coin and they will have to find a new job, or keep it as a hobby. either way its not up to a group of people that find it unnecessary it is the decision of the entire world as a collective entity.
many will read what i am about to say and it will cause everything i have said to be no longer looked at as credible. for this i am sorry that you are unable to think of anyone in this world but yourself, and it is people like you that have brought us to this point. socialism always failed in the worlds eyes as did communism. on paper the greatest civilization and its structure are ones in which people work together and do not worry about accumulating wealth in order to live in excess. the wealth is distributed equally, some positions which are harder to fill or require more skills will in the end offer higher pay for their tokens but only because there will be a supply and demand effect created due to its nature of less people being capable of supplying that service/good. on the flip side i believe that by the same token certain positions will ultimately demand a far higher pay. do you want to clean shit out of a porta potty ? probably not so when you need someone else to do it guess what you are going to pay that guy/girl exactly what it costs to have someone do it or you can do it yourself either way supply and demand dictates the value and the most agreed upon value between the provider and the consumer will prevail.




Card

submitted by buybitcoinsites_com to u/buybitcoinsites_com [link] [comments]

Electroneum and Who is Richard Ells? My 1-on-1.

Earlier this week, during the 2018 BCI Summit in New York, I had the pleasure and honor of meeting and speaking with Richard Ells. It is not the same as watching someone on the screen I assure you. After exchanging formalities and introductions I looked into his eyes and I knew: “He's the kind of guy you would just want to do Business with.” And now I will tell you why.
I had several conversations with Mr. Ells throughout the course of The Summit and he did not disappoint, even when asked difficult questions. Richard Ells is a very hard-working individual working 7 days a week and firing on all cylinders. He has dedicated himself to this project and to the Electroneum community, so next time you want to ask the silly question or post a negative comment please think twice. Mr. Ells is working around the clock trying to deliver everything that he said he would (especially and even during the times of extreme pressure).
Here is what I saw in DirectoCEO Richard Ells; who he really is, and why I believe he can and will make Electroneum a successful project. Blockchain, cryptocurrency, and decentralized economies are changing the way humanity interacts with the world. We are talking about a change on a huge scale. Being involved in the crypto space can be overwhelming at times. Although crypto trading can be fun and enjoyable, having a healthy and balanced lifestyle is very important. In today’s dynamic world of information and misinformation it is hard to distinguish what is real and true and what is not. There are over 1600 cryptocurrencies and more are added everyday, so how can one know which if any are going to be here in 5 years? Due diligence alone is no longer going to cut it, you have to go out and meet the people/person behind the project. Only then can you be certain that you have made a sound decision based on your own research. I have been involved in crypto projects for a while; finding the diamonds in the rough is not an easy task. Knowing what we know today, many of you would love to go back in time and get in BTC or ETH when they were just starting.
Electroneum is your most likely opportunity to be part of a project that has as much potential, if not more, as the very best BTC. I just lost half of you there; the half that continue reading will be rewarded. I know it is not enough for me to say Electroneum is one of the most exciting and new projects available today, and during this market correction there is ample opportunity to pick up Electroenum (ETN) at highly discounted rates. So please allow me to explain why I believe Electroneum is THE diamond you are looking for and why Richard Ells is THE Man for the Job.
I have done an extensive research on the project itself but more importantly on the man at the helm – Richard Ells – Director of Electroneum. What separates Mr. Ells from other crypto projects and their teams is important as most people are very skeptical about bitcoin and crypto in general. So what makes him so special? In the world of cryptos you do not have to be the strongest or the fastest: what you need is the ability to take action and execute on your vision with the right amount talent and support, and more importantly passion and motivation. There are few small groups of people that will dispute my finding and question my research, but I assure you that none of them spent any time doing any research, let alone go out and meet one-on-one with Richard Ells. These are the same small disgruntled individuals that spread negative and often false information on the internet about Electroneum and the project itself.
There are millions of companies out there in the world, each and every one of them is run by a group of individuals, CEOs, and Board of Directors. What makes Richard an excellent Director is that he is a calculated risk taker who takes action, ready to dive deep into the future of uncertainty. The cryptosphere certainly has its fair share of fear, uncertainty, and doubt (FUD). But not all risk takers are successful entrepreneurs. Richard Ells is a successful business owner willing to risk his name, time and money on the unknowns. I learned he also keeps resources and he plans ahead, keeping plenty of reserves for dealing with the unforeseen. Let me be perfectly clear: Richard Ells has already taken measures so that Electroneum is fully prepared for the regulatory changing landscape in the event major changes should occur.
When evaluating risk, a successful person like Richard Ells will ask if the risk is worth the cost of his career, his name, time, family and money. His intense focus on and faith in the Electroneum project may be misconstrued as stubbornness. I can tell you he is 100% dedicated and committed to the success of Electroenum, often working 7 days a week clocking nearly 100 hours, to the point where his eyes are so red and puffy that he can no longer see (I’m not making this up, this is literally how hard the gentleman works).
One might ask how can I be so sure that Richard Ells and Electroneum will succeed, well the honest answer is it’s impossible to know. If we knew all the answers to the future we would not be here right now. Analyzing and understanding the potential of a project in the crypto world can be both tricky and frustrating. There are no quick and dirty methods of analysis that can forecast or spell out the future of Electroneum. There are however some parameters that can help you understand where the project is most likely to go and how to gauge if the coin is a good potential investment. Some understanding of the crypto market is always better than no understanding which is unfortunately often the case in today’s world. The media have been painting a negative picture all around bitcoin and most other crypto projects, so how can you tell if this is the one? Mass Adoption, Patent Pending - Instant Cryptocurrency Payments - and Micro Subscription Payments are just a few reasons why Electroneum is THE coin that may turn this market upside down flip the script on this space, paving the way for mass adoption.
Richard Ells has the business plan, the backbone of any serious company, and he has the auxiliary plan and contingencies in place in order to prevent the unthinkable. This plan is about building a business from scratch while managing limited resources including time, money and personal relationships. Trying to plan for everything and having a ready solution in place for all possible issues and scenarios is not possible. Electroneum had experienced some hiccups along the way, and every time it has risen like a phoenix and pushed forward. Electroneum will continue to push forward, paving the way and becoming successful because Richard Ells is NOT going after the 1% that are in crypto today; he is going after the 99% who are not involved at all.
The road to Mass Adoption will not be an easy journey and it will not be a parabolic shot to the moon. If you have jumped into the Electroneum with unrealistic expectations because you have watched a few videos, hoping for overnight 1000x returns and instantly becoming a millionaire, then you have not done your due diligence and you can only blame yourself not Richard Ells or Electroneum. Predicting cryptocurrency prices is a fool’s errand and there is no algorithm or a computer that can accurately predict anything in the crypto world. Electroneum is no different, it follows certain standards like Bitcoin Standard due to pairing on exchanges. This however will soon change as the framework for new regulation is being explored every day, and we can further expect to see this landscape change as the SEC and other regulatory agencies in the world begin regulating the buying and selling of cryptocurrencies in very real ways.
There are many companies in the world that have been involved in “Instant Payments” but not Crypto Instant Payments. Richard Ells and Electroneum have created something that didn't already exist, patented it globally (their patent covers all cryptocurrencies and even allows Electroneum to do instant payments with other cryptos), and thereby significantly improved an existing product after experiencing frustration with the way it worked. This week at The Summit Electronuem demonstrated the instant payment system in action – it was impressive. In about 2 weeks, on July 1st, Electroneum is opening their vendor application for vendors to start accepting instant Electroneum (ETN) in a live environment. Following this period the general release will commence! Remaining unaware of changing market needs, competitor moves and other external factors can cause even great products to fail. Visa and Mastercard have been hard at work to create a system of Instant Payments and to shorten your time at the terminal (they even stopped asking for your signature).
Electroneum’s Crypto Instant Payment system introduced by Richard Ells at the 2018 BCI Summit in New York “Is a groundbreaking technology in the cryptocurrency industry that bridges the gap between blockchain’s decentralization and the modern world’s fast payment technology.” Mass Adoption will revolutionize the world of crypto use and spending and allow the poor and the unbanked in of the Developing World to enter this ecosystem. “Price Waterhouse Coopers predicts this market to be as large as USD 3 trillion.” There are others that say 20 trillion.
If you are looking to enter the crypto market, there is no better time than now as crypto is still a baby. Large corporations, the general public, governments and investment firms are all watching this space closely and only dipping their toes into this market. Because of Richard Ells’ work ethic, his ability to take action swiftly, his dedicated team, and the massive developments already underway – I believe Electroneum stands to become THE crypto for the people.
I’ll leave you with this as you think about the crypto space:
The lion is the king of the jungle; the king of his domain. The lion is not the tallest, not the largest, not the heaviest, and not the smartest nor the most intelligent animal in the jungle. Yet, the lion is the king of the jungle. What makes all these animals respect the lion so much? He takes action and executes on the way he thinks.
M.
https://preview.redd.it/hqgbpszql2411.jpg?width=960&format=pjpg&auto=webp&s=1bb4f62c05bd4407e98302eecfeb92f6069d573e
submitted by M-Systems to Electroneum [link] [comments]

Initially, I liked SegWit. But then I learned SegWit-as-a-SOFT-fork is dangerous (making transactions "anyone-can-spend"??) & centrally planned (1.7MB blocksize??). Instead, Bitcoin Unlimited is simple & safe, with MARKET-BASED BLOCKSIZE. This is why more & more people have decided to REJECT SEGWIT.

Initially, I liked SegWit. But then I learned SegWit-as-a-SOFT-fork is dangerous (making transactions "anyone-can-spend"??) & centrally planned (1.7MB blocksize??). Instead, Bitcoin Unlimited is simple & safe, with MARKET-BASED BLOCKSIZE. This is why more & more people have decided to REJECT SEGWIT.
Summary
Like many people, I initially loved SegWit - until I found out more about it.
I'm proud of my open-mindedness and my initial - albeit short-lived - support of SegWit - because this shows that I judge software on its merits, instead of being some kind of knee-jerk "hater".
SegWit's idea of "refactoring" the code to separate out the validation stuff made sense, and the phrase "soft fork" sounded cool - for a while.
But then we all learned that:
And we also got much better solutions: such as market-based blocksize with Bitcoin Unlimited - way better than SegWit's arbitrary, random centrally-planned, too-little-too-late 1.7MB "max blocksize".
This is why more and more people are rejecting SegWit - and instead installing Bitcoin Unlimited.
In my case, as I gradually learned about the disastrous consequences which SegWit-as-a-soft-fork-hack would have, my intial single OP in December 2015 expressing outspoken support for SegWit soon turned to an avalanche of outspoken opposition to SegWit.
Details
Core / Blockstream lost my support on SegWit - and it's all their fault.
How did Core / Blockstream turn me from an outspoken SegWit supporter to an outspoken SegWit opponent?
It was simple: They made the totally unnecessary (and dangerous) decision to program SegWit as a messy and dangerous soft-fork which would:
  • create a massive new threat vector by making all transactions "anyone-can-spend";
  • force yet-another random / arbitrary / centrally planned "max blocksize" on everyone (previously 1 MB, now 1.7MB - still pathetically small and hard-coded!).
Meanwhile, new, independent dev teams which are smaller and much better than the corrupt, fiat-financed Core / Blockstream are offering simpler and safer solutions which are much better than SegWit:
  • For blocksize governance, we now have market-based blocksize based on emergent consensus, provided by Bitcoin Unlimited.
  • For malleability and quadratic hashing time (plus a future-proof, tag-based language similar to JSON or XML supporting much cleaner upgrades long-term), we now have Flexible Transactions (FlexTrans).
This is why We Reject SegWit because "SegWit is the most radical and irresponsible protocol upgrade Bitcoin has faced in its history".
My rapid evolution on SegWit - as I discovered its dangers (and as we got much better alternatives, like Bitcoin Unlimited + FlexTrans):
Initially, I was one of the most outspoken supporters of SegWit - raving about it in the following OP which I posted (on Monday, December 7, 2015) immediately after seeing a presentation about it on YouTube by Pieter Wuille at one of the early Bitcoin scaling stalling conferences:
https://np.reddit.com/btc/comments/3vt1ov/pieter_wuilles_segregated_witness_and_fraud/
Pieter Wuille's Segregated Witness and Fraud Proofs (via Soft-Fork!) is a major improvement for scaling and security (and upgrading!)
I am very proud of that initial pro-SegWit post of mine - because it shows that I have always been totally unbiased and impartial and objective about the ideas behind SegWit - and I have always evaluated it purely on its merits (and demerits).
So, I was one of the first people to recognize the positive impact which the ideas behind SegWit could have had (ie, "segregating" the signature information from the sender / receiver / amount information) - if SegWit had been implemented by an honest dev team that supports the interests of the Bitcoin community.
However, we've learned a lot since December 2015. Now we know that Core / Blockstream is actively working against the interests of the Bitcoin community, by:
  • trying to force their political and economic viewpoints onto everyone else by "hard-coding" / "bundling" some random / arbitrary / centrally-planned 1.7MB "max blocksize" (?!?) into our code;
  • trying to take away our right to vote via a clean and safe "hard fork";
  • trying to cripple our code with dangerous "technical debt" - eg their radical and irresponsible proposal to make all transactions "anyone-can-spend".
This is the mess of SegWit - which we all learned about over the past year.
So, Core / Blockstream blew it - bigtime - losing my support for SegWit, and the support of many others in the community.
We might have continued to support SegWit if Core / Blockstream had not implemented it as a dangerous and dirty soft fork.
But Core / Blockstream lost our support - by attempting to implement SegWit as a dangerous, anti-democratic soft fork.
The lesson here for Core/Blockstream is clear:
Bitcoin users are not stupid.
Many of us are programmers ourselves, and we know the difference between a simple & safe hard fork and a messy & dangerous soft fork.
And we also don't like it when Core / Blockstream attempts to take away our right to vote.
And finally, we don't like it when Core / Blockstream attempts to steal functionality away from nodes while using misleading terminology - as u/chinawat has repeatedly been pointing out lately.
We know a messy, dangerous, centrally planned hack when we see it - and SegWit is a messy, dangerous, centrally planned hack.
If Core/Blockstream attempts to foce messy and dangerous code like SegWit-as-a-soft-fork on the community, we can and should and we will reject SegWit - to protect our billions of dollars of investment in Bitcoin (which could turn into trillions of dollars someday - if we continue to protect our code from poison pills and trojans like SegWit).
Too bad you lost my support (and the support of many, many other Bitcoin users), Core / Blockstream! But it's your own fault for releasing shitty code.
Below are some earlier comments from me showing how I quickly turned from one of the most outspoken supporters of Segwit (in that single OP I wrote the day I saw Pieter Wuille's presentation on YouTube) - into one of most outspoken opponents of SegWit:
I also think Pieter Wuille is a great programmer and I was one of the first people to support SegWit after it was announced at a congress a few months ago.
But then Blockstream went and distorted SegWit to fit it into their corporate interests (maintaining their position as the dominant centralized dev team - which requires avoiding hard-forks). And Blockstream's corporate interests don't always align with Bitcoin's interests.
https://np.reddit.com/btc/comments/57zbkp/if_blockstream_were_truly_conservative_and_wanted/
As noted in the link in the section title above, I myself was an outspoken supporter championing SegWit on the day when I first the YouTube of Pieter Wuille explaining it at one of the early "Scaling Bitcoin" conferences.
Then I found out that doing it as a soft fork would add unnecessary "spaghetti code" - and I became one of the most outspoken opponents of SegWit.
https://np.reddit.com/btc/comments/5ejmin/coreblockstream_is_living_in_a_fantasy_world_in/
Pieter Wuille's SegWit would be a great refactoring and clean-up of the code (if we don't let Luke-Jr poison it by packaging it as a soft-fork)
https://np.reddit.com/btc/comments/4kxtq4/i_think_the_berlin_wall_principle_will_end_up/
Probably the only prominent Core/Blockstream dev who does understand this kind of stuff like the Robustness Principle or its equivalent reformulation in terms of covariant and contravariant types is someone like Pieter Wuille – since he’s a guy who’s done a lot of work in functional languages like Haskell – instead of being a myopic C-tard like most of the rest of the Core/Blockstream devs. He’s a smart guy, and his work on SegWit is really important stuff (but too bad that, yet again, it’s being misdelivered as a “soft-fork,” again due to the cluelessness of someone like Luke-Jr, whose grasp of syntax and semantics – not to mention society – is so glaringly lacking that he should have been recognized for the toxic influence that he is and shunned long ago).
https://np.reddit.com/btc/comments/4k6tke/the_tragedy_of/
The damage which would be caused by SegWit (at the financial, software, and governance level) would be massive:
  • Millions of lines of other Bitcoin code would have to be rewritten (in wallets, on exchanges, at businesses) in order to become compatible with all the messy non-standard kludges and workarounds which Blockstream was forced into adding to the code (the famous "technical debt") in order to get SegWit to work as a soft fork.
  • SegWit was originally sold to us as a "code clean-up". Heck, even I intially fell for it when I saw an early presentation by Pieter Wuille on YouTube from one of Blockstream's many, censored Bitcoin scaling stalling conferences)
  • But as we all later all discovered, SegWit is just a messy hack.
  • Probably the most dangerous aspect of SegWit is that it changes all transactions into "ANYONE-CAN-SPEND" without SegWit - all because of the messy workarounds necessary to do SegWit as a soft-fork. The kludges and workarounds involving SegWit's "ANYONE-CAN-SPEND" semantics would only work as long as SegWit is still installed.
  • This means that it would be impossible to roll-back SegWit - because all SegWit transactions that get recorded on the blockchain would now be interpreted as "ANYONE-CAN-SPEND" - so, SegWit's dangerous and messy "kludges and workarounds and hacks" would have to be made permanent - otherwise, anyone could spend those "ANYONE-CAN-SPEND" SegWit coins!
Segwit cannot be rolled back because to non-upgraded clients, ANYONE can spend Segwit txn outputs. If Segwit is rolled back, all funds locked in Segwit outputs can be taken by anyone. As more funds gets locked up in segwit outputs, incentive for miners to collude to claim them grows.
https://np.reddit.com/btc/comments/5ge1ks/segwit_cannot_be_rolled_back_because_to/
https://np.reddit.com/btc/search?q=segwit+anyone+can+spend&restrict_sr=on&sort=relevance&t=all
https://np.reddit.com/btc/comments/5r9cu7/the_real_question_is_how_fast_do_bugs_get_fixed/
Why are more and more people (including me!) rejecting SegWit?
(1) SegWit is the most radical and irresponsible change ever proposed for Bitcoin:
"SegWit encumbers Bitcoin with irreversible technical debt. Miners should reject SWSF. SW is the most radical and irresponsible protocol upgrade Bitcoin has faced in its history. The scale of the code changes are far from trivial - nearly every part of the codebase is affected by SW" Jaqen Hash’ghar
https://np.reddit.com/btc/comments/5rdl1j/segwit_encumbers_bitcoin_with_irreversible/
3 excellent articles highlighting some of the major problems with SegWit: (1) "Core Segwit – Thinking of upgrading? You need to read this!" by WallStreetTechnologist (2) "SegWit is not great" by Deadalnix (3) "How Software Gets Bloated: From Telephony to Bitcoin" by Emin Gün Sirer
https://np.reddit.com/btc/comments/5rfh4i/3_excellent_articles_highlighting_some_of_the/
"The scaling argument was ridiculous at first, and now it's sinister. Core wants to take transactions away from miners to give to their banking buddies - crippling Bitcoin to only be able to do settlements. They are destroying Satoshi's vision. SegwitCoin is Bankcoin, not Bitcoin" ~ u/ZeroFucksG1v3n
https://np.reddit.com/btc/comments/5rbug3/the_scaling_argument_was_ridiculous_at_first_and/
u/Uptrenda on SegWit: "Core is forcing every Bitcoin startup to abandon their entire code base for a Rube Goldberg machine making their products so slow, inconvenient, and confusing that even if they do manage to 'migrate' to this cluster-fuck of technical debt it will kill their businesses anyway."
https://np.reddit.com/btc/comments/5e86fg/uuptrenda_on_segwit_core_is_forcing_every_bitcoin/
"SegWit [would] bring unnecessary complexity to the bitcoin blockchain. Huge changes it introduces into the client are a veritable minefield of issues, [with] huge changes needed for all wallets, exchanges, remittance, and virtually all bitcoin software that will use it." ~ u/Bitcoinopoly
https://np.reddit.com/btc/comments/5jqgpz/segwit_would_bring_unnecessary_complexity_to_the/
Just because something is a "soft fork" doesn't mean it isn't a massive change. SegWit is an alt-coin. It would introduce radical and unpredictable changes in Bitcoin's economic parameters and incentives. Just read this thread. Nobody has any idea how the mainnet will react to SegWit in real life.
https://np.reddit.com/btc/comments/5fc1ii/just_because_something_is_a_soft_fork_doesnt_mean/
Core/Blockstream & their supporters keep saying that "SegWit has been tested". But this is false. Other software used by miners, exchanges, Bitcoin hardware manufacturers, non-Core software developers/companies, and Bitcoin enthusiasts would all need to be rewritten, to be compatible with SegWit
https://np.reddit.com/btc/comments/5dlyz7/coreblockstream_their_supporters_keep_saying_that/
SegWit-as-a-softfork is a hack. Flexible-Transactions-as-a-hard-fork is simpler, safer and more future-proof than SegWit-as-a-soft-fork - trivially solving malleability, while adding a "tag-based" binary data format (like JSON, XML or HTML) for easier, safer future upgrades with less technical debt
https://np.reddit.com/btc/comments/5a7husegwitasasoftfork_is_a_hack/
(2) Better solutions than SegWit are now available (Bitcoin Unlimited, FlexTrans):
ViABTC: "Why I support BU: We should give the question of block size to the free market to decide. It will naturally adjust to ever-improving network & technological constraints. Bitcoin Unlimited guarantees that block size will follow what the Bitcoin network is capable of handling safely."
https://np.reddit.com/btc/comments/574g5l/viabtc_why_i_support_bu_we_should_give_the/
"Why is Flexible Transactions more future-proof than SegWit?" by u/ThomasZander
https://np.reddit.com/btc/comments/5rbv1j/why_is_flexible_transactions_more_futureproof/
Bitcoin's specification (eg: Excess Blocksize (EB) & Acceptance Depth (AD), configurable via Bitcoin Unlimited) can, should & always WILL be decided by ALL the miners & users - not by a single FIAT-FUNDED, CENSORSHIP-SUPPORTED dev team (Core/Blockstream) & miner (BitFury) pushing SegWit 1.7MB blocks
https://np.reddit.com/btc/comments/5u1r2d/bitcoins_specification_eg_excess_blocksize_eb/
The Blockstream/SegWit/LN fork will be worth LESS: SegWit uses 4MB storage/bandwidth to provide a one-time bump to 1.7MB blocksize; messy, less-safe as softfork; LN=vaporware. The BU fork will be worth MORE: single clean safe hardfork solving blocksize forever; on-chain; fix malleability separately.
https://np.reddit.com/btc/comments/57zjnk/the_blockstreamsegwitln_fork_will_be_worth_less/
(3) Very few miners actually support SegWit. In fact, over half of SegWit signaling comes from just two fiat-funded miners associated with Core / Blockstream: BitFury and BTCC:
Brock Pierce's BLOCKCHAIN CAPITAL is part-owner of Bitcoin's biggest, private, fiat-funded private dev team (Blockstream) & biggest, private, fiat-funded private mining operation (BitFury). Both are pushing SegWit - with its "centrally planned blocksize" & dangerous "anyone-can-spend kludge".
https://np.reddit.com/btc/comments/5sndsz/brock_pierces_blockchain_capital_is_partowner_of/
(4) Hard forks are simpler and safer than soft forks. Hard forks preserve your "right to vote" - so Core / Blockstream is afraid of hard forks a/k/a "full node refendums" - because they know their code would be rejected:
The real reason why Core / Blockstream always favors soft-forks over hard-forks (even though hard-forks are actually safer because hard-forks are explicit) is because soft-forks allow the "incumbent" code to quietly remain incumbent forever (and in this case, the "incumbent" code is Core)
https://np.reddit.com/btc/comments/4080mw/the_real_reason_why_core_blockstream_always/
Reminder: Previous posts showing that Blockstream's opposition to hard-forks is dangerous, obstructionist, selfish FUD. As many of us already know, the reason that Blockstream is against hard forks is simple: Hard forks are good for Bitcoin, but bad for the private company Blockstream.
https://np.reddit.com/btc/comments/4ttmk3/reminder_previous_posts_showing_that_blockstreams/
"They [Core/Blockstream] fear a hard fork will remove them from their dominant position." ... "Hard forks are 'dangerous' because they put the market in charge, and the market might vote against '[the] experts' [at Core/Blockstream]" - ForkiusMaximus
https://np.reddit.com/btc/comments/43h4cq/they_coreblockstream_fear_a_hard_fork_will_remove/
The proper terminology for a "hard fork" should be a "FULL NODE REFERENDUM" - an open, transparent EXPLICIT process where everyone has the right to vote FOR or AGAINST an upgrade. The proper terminology for a "soft fork" should be a "SNEAKY TROJAN HORSE" - because IT TAKES AWAY YOUR RIGHT TO VOTE.
https://np.reddit.com/btc/comments/5e4e7d/the_proper_terminology_for_a_hard_fork_should_be/
If Blockstream were truly "conservative" and wanted to "protect Bitcoin" then they would deploy SegWit AS A HARD FORK. Insisting on deploying SegWit as a soft fork (overly complicated so more dangerous for Bitcoin) exposes that they are LYING about being "conservative" and "protecting Bitcoin".
https://np.reddit.com/btc/comments/57zbkp/if_blockstream_were_truly_conservative_and_wanted/
"We had our arms twisted to accept 2MB hardfork + SegWit. We then got a bait and switch 1MB + SegWit with no hardfork, and accounting tricks to make P2SH transactions cheaper (for sidechains and Lightning, which is all Blockstream wants because they can use it to control Bitcoin)." ~ u/URGOVERNMENT
https://np.reddit.com/btc/comments/5ju5r8/we_had_our_arms_twisted_to_accept_2mb_hardfork/
u/Luke-Jr invented SegWit's dangerous "anyone-can-spend" soft-fork kludge. Now he helped kill Bitcoin trading at Circle. He thinks Bitcoin should only hard-fork TO DEAL WITH QUANTUM COMPUTING. Luke-Jr will continue to kill Bitcoin if we continue to let him. To prosper, BITCOIN MUST IGNORE LUKE-JR.
https://np.reddit.com/btc/comments/5h0yf0/ulukejr_invented_segwits_dangerous_anyonecanspend/
Normal users understand that SegWit-as-a-softfork is dangerous, because it deceives non-upgraded nodes into thinking transactions are valid when actually they're not - turning those nodes into "zombie nodes". Greg Maxwell and Blockstream are jeopardizing Bitcoin - in order to stay in power.
https://np.reddit.com/btc/comments/4mnpxx/normal_users_understand_that_segwitasasoftfork_is/
"Negotiations have failed. BS/Core will never HF - except to fire the miners and create an altcoin. Malleability & quadratic verification time should be fixed - but not via SWSF political/economic trojan horse. CHANGES TO BITCOIN ECONOMICS MUST BE THRU FULL NODE REFERENDUM OF A HF." ~ u/TunaMelt
https://np.reddit.com/btc/comments/5e410j/negotiations_have_failed_bscore_will_never_hf/
"Anything controversial ... is the perfect time for a hard fork. ... Hard forks are the market speaking. Soft forks on any issues where there is controversy are an attempt to smother the market in its sleep. Core's approach is fundamentally anti-market" ~ u/ForkiusMaximus
https://np.reddit.com/btc/comments/5f4zaa/anything_controversial_is_the_perfect_time_for_a/
As Core / Blockstream collapses and Classic gains momentum, the CEO of Blockstream, Austin Hill, gets caught spreading FUD about the safety of "hard forks", falsely claiming that: "A hard-fork forced-upgrade flag day ... disenfranchises everyone who doesn't upgrade ... causes them to lose funds"
https://np.reddit.com/btc/comments/41c8n5/as_core_blockstream_collapses_and_classic_gains/
Core/Blockstream is living in a fantasy world. In the real world everyone knows (1) our hardware can support 4-8 MB (even with the Great Firewall), and (2) hard forks are cleaner than soft forks. Core/Blockstream refuses to offer either of these things. Other implementations (eg: BU) can offer both.
https://np.reddit.com/btc/comments/5ejmin/coreblockstream_is_living_in_a_fantasy_world_in/
Blockstream is "just another shitty startup. A 30-second review of their business plan makes it obvious that LN was never going to happen. Due to elasticity of demand, users either go to another coin, or don't use crypto at all. There is no demand for degraded 'off-chain' services." ~ u/jeanduluoz
https://np.reddit.com/btc/comments/59hcvblockstream_is_just_another_shitty_startup_a/
(5) Core / Blockstream's latest propaganda "talking point" proclaims that "SegWit is a blocksize increase". But we don't want "a" random, arbitrary centrally planned blocksize increase (to a tiny 1.7MB) - we want _market-based blocksizes - now and into the future:_
The debate is not "SHOULD THE BLOCKSIZE BE 1MB VERSUS 1.7MB?". The debate is: "WHO SHOULD DECIDE THE BLOCKSIZE?" (1) Should an obsolete temporary anti-spam hack freeze blocks at 1MB? (2) Should a centralized dev team soft-fork the blocksize to 1.7MB? (3) OR SHOULD THE MARKET DECIDE THE BLOCKSIZE?
https://np.reddit.com/btc/comments/5pcpec/the_debate_is_not_should_the_blocksize_be_1mb/
The Bitcoin community is talking. Why isn't Core/Blockstream listening? "Yes, [SegWit] increases the blocksize but BU wants a literal blocksize increase." ~ u/lurker_derp ... "It's pretty clear that they [BU-ers] want Bitcoin, not a BTC fork, to have a bigger blocksize." ~ u/WellSpentTime
https://np.reddit.com/btc/comments/5fjh6l/the_bitcoin_community_is_talking_why_isnt/
"The MAJORITY of the community sentiment (be it miners or users / hodlers) is in favour of the manner in which BU handles the scaling conundrum (only a conundrum due to the junta at Core) and SegWit as a hard and not a soft fork." ~ u/pekatete
https://np.reddit.com/btc/comments/593voi/the_majority_of_the_community_sentiment_be_it/
(6) Core / Blockstream want to radically change Bitcoin to centrally planned 1.7MB blocksize, and dangerous "anyone-can-spend" semantics. The market wants to go to the moon - with Bitcoin's original security model, and Bitcoin's original market-based (miner-decided) blocksize.
Bitcoin Unlimited is the real Bitcoin, in line with Satoshi's vision. Meanwhile, BlockstreamCoin+RBF+SegWitAsASoftFork+LightningCentralizedHub-OfflineIOUCoin is some kind of weird unrecognizable double-spendable non-consensus-driven fiat-financed offline centralized settlement-only non-P2P "altcoin"
https://np.reddit.com/btc/comments/57brcb/bitcoin_unlimited_is_the_real_bitcoin_in_line/
The number of blocks being mined by Bitcoin Unlimited is now getting very close to surpassing the number of blocks being mined by SegWit! More and more people are supporting BU's MARKET-BASED BLOCKSIZE - because BU avoids needless transaction delays and ultimately increases Bitcoin adoption & price!
https://np.reddit.com/btc/comments/5rdhzh/the_number_of_blocks_being_mined_by_bitcoin/
I have just been banned for from /Bitcoin for posting evidence that there is a moderate/strong inverse correlation between the amount of Bitcoin Core Blocks mined and the Bitcoin Price (meaning that as Core loses market share, Price goes up).
https://np.reddit.com/btc/comments/5v10zw/i_have_just_been_banned_for_from_rbitcoin_fo
Flipping the Script: It is Core who is proposing a change to Bitcoin, and BU/Classic that is maintaining the status quo.
https://np.reddit.com/btc/comments/5v36jy/flipping_the_script_it_is_core_who_is_proposing_a/
The main difference between Bitcoin core and BU client is BU developers dont bundle their economic and political opinions with their code
https://np.reddit.com/btc/comments/5v3rt2/the_main_difference_between_bitcoin_core_and_bu/
TL;DR:
You wanted people like me to support you and install your code, Core / Blockstream?
Then you shouldn't have a released messy, dangerous, centrally planned hack like SegWit-as-a-soft-fork - with its random, arbitrary, centrally planned, ridiculously tiny 1.7MB blocksize - and its dangerous "anyone-can-spend" soft-fork semantics.
Now it's too late. The market will reject SegWit - and it's all Core / Blockstream's fault.
The market prefers simpler, safer, future-proof, market-based solutions such as Bitcoin Unlimited.
submitted by ydtm to btc [link] [comments]

Electroneum (ETN) and Who is Richard Ells? My 1-on-1.

Electroneum (ETN) and Who is Richard Ells? My 1-on-1.
Hello Crypto Experts !
I know I am probably going to get flamed by posting this here, but before you call me a name or point a finger at the price of this coin and tell me it is a "s..t coin" please consider the current market conditions and the value of all cryptos including the top 20. I believe in actions and going out into the field yourself, meeting the people behind the projects is the only way to know for sure. What ever the coin or project you support try to meet the team if it is possible, if there is no team or person behind it then you know what sort of coin/project you are dealing with. Ladies and Gents - I hope you find something useful in this write-up. Stay open minded folks ! This coin is 9 months old give it some time, look at all the BTC madness taking place right now.
Few weeks ago, during the 2018 BCI Summit in New York, I had the pleasure and honor of meeting and speaking with Richard Ells President/CEO of Electroneum (ETN). It is not the same as watching someone on the screen I assure you. After exchanging formalities and introductions I looked into his eyes and I knew: “He's the kind of guy you would just want to do Business with.” And now I will tell you why.
I had several conversations with Mr. Ells throughout the course of The Summit and he did not disappoint, even when asked difficult questions. Richard Ells is a very hard-working individual working 7 days a week and firing on all cylinders. He has dedicated himself to this project and to the Electroneum community, so next time you want to ask the silly question or post a negative comment please think twice. Mr. Ells is working around the clock trying to deliver everything that he said he would (especially and even during the times of extreme pressure).
Here is what I saw in DirectoCEO Richard Ells; who he really is, and why I believe he can and will make Electroneum a successful project. Blockchain, cryptocurrency, and decentralized economies are changing the way humanity interacts with the world. We are talking about a change on a huge scale. Being involved in the crypto space can be overwhelming at times. Although crypto trading can be fun and enjoyable, having a healthy and balanced lifestyle is very important. In today’s dynamic world of information and misinformation it is hard to distinguish what is real and true and what is not. There are over 1600 cryptocurrencies and more are added everyday, so how can one know which if any are going to be here in 5 years? Due diligence alone is no longer going to cut it, you have to go out and meet the people/person behind the project. Only then can you be certain that you have made a sound decision based on your own research. I have been involved in crypto projects for a while; finding the diamonds in the rough is not an easy task. Knowing what we know today, many of you would love to go back in time and get in BTC or ETH when they were just starting.
Electroneum is your most likely opportunity to be part of a project that has as much potential, if not more, as the very best BTC. I just lost half of you there; the half that continue reading will be rewarded. I know it is not enough for me to say Electroneum is one of the most exciting and new projects available today, and during this market correction there is ample opportunity to pick up Electroenum (ETN) at highly discounted rates. So please allow me to explain why I believe Electroneum is THE diamond you are looking for and why Richard Ells is THE Man for the Job.
I have done an extensive research on the project itself but more importantly on the man at the helm – Richard Ells – Director of Electroneum. What separates Mr. Ells from other crypto projects and their teams is important as most people are very skeptical about bitcoin and crypto in general. So what makes him so special? In the world of cryptos you do not have to be the strongest or the fastest: what you need is the ability to take action and execute on your vision with the right amount talent and support, and more importantly passion and motivation. There are few small groups of people that will dispute my finding and question my research, but I assure you that none of them spent any time doing any research, let alone go out and meet one-on-one with Richard Ells. These are the same small disgruntled individuals that spread negative and often false information on the internet about Electroneum and the project itself.
There are millions of companies out there in the world, each and every one of them is run by a group of individuals, CEOs, and Board of Directors. What makes Richard an excellent Director is that he is a calculated risk taker who takes action, ready to dive deep into the future of uncertainty. The cryptosphere certainly has its fair share of fear, uncertainty, and doubt (FUD). But not all risk takers are successful entrepreneurs. Richard Ells is a successful business owner willing to risk his name, time and money on the unknowns. I learned he also keeps resources and he plans ahead, keeping plenty of reserves for dealing with the unforeseen. Let me be perfectly clear: Richard Ells has already taken measures so that Electroneum is fully prepared for the regulatory changing landscape in the event major changes should occur.
When evaluating risk, a successful person like Richard Ells will ask if the risk is worth the cost of his career, his name, time, family and money. His intense focus on and faith in the Electroneum project may be misconstrued as stubbornness. I can tell you he is 100% dedicated and committed to the success of Electroenum, often working 7 days a week clocking nearly 100 hours, to the point where his eyes are so red and puffy that he can no longer see (I’m not making this up, this is literally how hard the gentleman works).
One might ask how can I be so sure that Richard Ells and Electroneum will succeed, well the honest answer is it’s impossible to know. If we knew all the answers to the future we would not be here right now. Analyzing and understanding the potential of a project in the crypto world can be both tricky and frustrating. There are no quick and dirty methods of analysis that can forecast or spell out the future of Electroneum. There are however some parameters that can help you understand where the project is most likely to go and how to gauge if the coin is a good potential investment. Some understanding of the crypto market is always better than no understanding which is unfortunately often the case in today’s world. The media have been painting a negative picture all around bitcoin and most other crypto projects, so how can you tell if this is the one? Mass Adoption, Patent Pending - Instant Cryptocurrency Payments - and Micro Subscription Payments are just a few reasons why Electroneum is THE coin that may turn this market upside down flip the script on this space, paving the way for mass adoption.
For those of you who are interested in Instant Payments you can read more details here as it was just released:
https://twitter.com/electroneum/status/1013184289721212929
Richard Ells has the business plan, the backbone of any serious company, and he has the auxiliary plan and contingencies in place in order to prevent the unthinkable. This plan is about building a business from scratch while managing limited resources including time, money and personal relationships. Trying to plan for everything and having a ready solution in place for all possible issues and scenarios is not possible. Electroneum had experienced some hiccups along the way, and every time it has risen like a phoenix and pushed forward. Electroneum will continue to push forward, paving the way and becoming successful because Richard Ells is NOT going after the 1% that are in crypto today; he is going after the 99% who are not involved at all.
The road to Mass Adoption will not be an easy journey and it will not be a parabolic shot to the moon. If you have jumped into the Electroneum with unrealistic expectations because you have watched a few videos, hoping for overnight 1000x returns and instantly becoming a millionaire, then you have not done your due diligence and you can only blame yourself not Richard Ells or Electroneum. Predicting cryptocurrency prices is a fool’s errand and there is no algorithm or a computer that can accurately predict anything in the crypto world. Electroneum is no different, it follows certain standards like Bitcoin Standard due to pairing on exchanges. This however will soon change as the framework for new regulation is being explored every day, and we can further expect to see this landscape change as the SEC and other regulatory agencies in the world begin regulating the buying and selling of cryptocurrencies in very real ways.
There are many companies in the world that have been involved in “Instant Payments” but not Crypto Instant Payments. Richard Ells and Electroneum have created something that didn't already exist, patented it globally (their patent covers all cryptocurrencies and even allows Electroneum to do instant payments with other cryptos), and thereby significantly improved an existing product after experiencing frustration with the way it worked. This week at The Summit Electronuem demonstrated the instant payment system in action – it was impressive. In about 2 weeks, on July 1st, Electroneum is opening their vendor application for vendors to start accepting instant Electroneum (ETN) in a live environment. Following this period the general release will commence! Remaining unaware of changing market needs, competitor moves and other external factors can cause even great products to fail. Visa and Mastercard have been hard at work to create a system of Instant Payments and to shorten your time at the terminal (they even stopped asking for your signature).
Electroneum’s Crypto Instant Payment system introduced by Richard Ells at the 2018 BCI Summit in New York “Is a groundbreaking technology in the cryptocurrency industry that bridges the gap between blockchain’s decentralization and the modern world’s fast payment technology.” Mass Adoption will revolutionize the world of crypto use and spending and allow the poor and the unbanked in of the Developing World to enter this ecosystem. “Price Waterhouse Coopers predicts this market to be as large as USD 3 trillion.” There are others that say 20 trillion.
If you are looking to enter the crypto market, there is no better time than now as crypto is still a baby. Large corporations, the general public, governments and investment firms are all watching this space closely and only dipping their toes into this market. Because of Richard Ells’ work ethic, his ability to take action swiftly, his dedicated team, and the massive developments already underway – I believe Electroneum stands to become THE crypto for the people.
I’ll leave you with this as you think about the crypto space:
The lion is the king of the jungle; the king of his domain. The lion is not the tallest, not the largest, not the heaviest, and not the smartest nor the most intelligent animal in the jungle. Yet, the lion is the king of the jungle. What makes all these animals respect the lion so much? He takes action and executes on the way he thinks.
I know it is a long read and if you got all the way down here then at least you are still open minded as there many in the cryptospace that will just call me a shill or that I was paid. Well no one paid me a damn thing and I have other coins that I intend to talk about in the same manner 0x, DBC, and few others.
Thanks M.
https://preview.redd.it/7qlgzs4c9d711.jpg?width=960&format=pjpg&auto=webp&s=ca9abcbfc6a9dba9554514bbaa146df877dc5bce
submitted by M-Systems to CryptoCurrency [link] [comments]

Guide: Claiming and Dumping Bitcoin Faith (BTF) for complete idiots

Guide: Claiming and Dumping Bitcoin Faith (BTF) for complete idiots
Why am I bothering to write this?
I've already dumped my Bitcoin Faith, and I want you to dump yours too, tank the market and make my dumping look like a genius decision.
I guess you could say I have no faith.
What will I need for this?
What don't I need?
Ok, I've got a key. How do I check if it had funds at block 500,000?
Go to blockchain.info, paste it in.
Let me give you an example so you can follow along.
Check out this Public Key on blockchain.info: 1LqMdotNwAVmqRYpkNTiDSEfPsbsgK23hx
Only one transaction. Nice. Click on the transaction reference, which is d9ed8f32b0f0e5d9fe2f53e0f32c3e89765f27ab365379c513df64859bed48cd
You'll see it was included in block 499990. And from the pub key you can see the funds did not leave PRIOR to 500000. In fact, the funds are still there. So BTF is in there.
If you do this check and find that funds were there before 500000, and the funds left after 500000, then you've got BTF in there. If however, the funds arrived AND left prior to 500000, you've got no BTF. Also, if the funds arrived after 500000 or arrived and left after 500000, then you've got no BTF.
Partial is okay. So say you had 10BTC that came in at block 488888, and then you sent 5BTC out at block 499000, and the remaining 5BTC stayed until block 500100, then you're good to claim 5BTF.
Got it? Ok next.
Ok, so my key had funds at 500000. But I don't have a WIF format Private Key. I've got my Private Key in some other god awful format.
Yeah, not going to help with that. But you can convert a private key from any format into the WIF format. You just have to search on the web a fair bit, but there's a converter out there somewhere. Go find it. Plenty of sites describe how to change a private key into a WIF format private key, but the web based implementations of this are hard to find.
I don't have a Windows PC!
Go find one.
What should I know about btctrade.im?
Well first off, do not even bother if you can't get verified there. If you can't get verified, then you won't be able to withdraw your coins later.
If you're from the USA, don't bother, they don't verify from that country. Australia, Canada and a bunch of other countries are fine.
Some hints on getting verified.
It takes about a day.
You can trade while you're waiting.
You'll need a passport.
When filling in the address stuff and it keeps complaining about the last field, put a single word in the last field and it should be okay. Example "Canada" will work. "556 Blah Road, Canada" will not work.
They want three passport photos. One of the front, one of the back, and one of you holding it with todays date. You can do the one of you holding it with todays date in english, that is fine.
Most passports don't really have a back to take a photo of. Take a photo of the front of your passport (the page with all of the details), and then flip a few pages into your passport, and take a photo of one of those pages, and put that in as the back. That works. Just make sure you upload three photos.
If after a day, you see red chinese writing at the top of the verification page, you've failed, and you need to try again. Try a different page for the back page.
Note that after you click confirm, there is radio silence for about a minute, and then finally it will show a "processing" message that you can click okay on. There is no progress bar. You don't get an e-mail verification once you are verified, so you have to keep on logging back in to check.
What about gate.io, can I use them?
No, they aren't accepting BTF deposits. It looks like they do, but the key never appears.
Done all that, what next?
Download the latest version of Python2 from here
https://www.python.org/downloads/release/python-2714/
Not Python3, Python2. Install it into, say, the C:\PYTHON directory
Grab this code from pastebin -> https://pastebin.com/UAREBKk7
Copy it, put it in notepad, save the document as btf.py into your Python directory. Make sure Windows doesn't add a .txt extension or anything dumb like that.
I did not write this code. Use it at your own risk. Credit for this code to the person on bitcoinairdrops who wrote it and provided it for everyone. Theres a link to it somewhere too on github or something but I can't be assed finding it.
Let's create some transactions!
Ok so let's look back at our example of Pub Key 1LqMdotNwAVmqRYpkNTiDSEfPsbsgK23hx on blockchain.info. It's eligible for BTF, so let's do that one as an example transaction.
Your format will be C:\PYTHON>python btf.py
Let's talk about what those mean.
Obviously you're at a dos prompt running python and the btf.py script that you just saved.
The TXID is the TRANSACTION ID for the transaction that LAST SENT FUNDS INTO THE PUBLIC KEY BEFORE BLOCK 500000. So in the case of our example, it is d9ed8f32b0f0e5d9fe2f53e0f32c3e89765f27ab365379c513df64859bed48cd, which is the only transaction ID there. Easy. But in other cases, like when you have multiple deposits, or deposits and withdrawals, it won't be so easy. I'll come back to that later.
Next is the REF, which is the number (Between, say, 0 and 1000) of Public Key on the RIGHT HAND SIDE of the transaction. What the hell does that mean? Well, basically, look at the grey public key on the right hand side of the green arrow on blockchain.info for this transaction. That is the reference you want, but it STARTS FROM 0. So if its the first key that is grey, then your reference is 0. If it is the second key that is grey, then the reference is 1, and so forth. Screw this up and you ain't getting any BTF. For our example, it is 1. It can be any number up to 1000 and beyond, but most of the time it will be 0 or 1.
*See my comment at the bottom with regards to the REF, the information in the paragraph above can be slightly off in some cases, the info at the very bottom covers it.
Next is WIF, which is your private key off your paper wallet for the public key from which you are trying to extract the BTF. You should have this handy, no problems. Convert from a regular private key to a WIF private key if necessary as previously mentioned.
Next is BTFID. That is the public key deposit address for BTF on btctrade.im. Make sure you provide a BTF deposit address, not a BTC deposit address. Easy.
Next is SATOSHISMINUS1000. This is basically the amount available to send, denoted in satoshis, minus 1000. Use a BTC to Satoshi converter (Google it) to ensure you get the right number, and then round it down by 1000. So if you've got 1BTC in there, then you'll be transferring 99999000 Satoshis. In our example, you can do 232073 Satoshis. Make sure you are entering the amount relevant to the TXID that you're trying to claim. That is simple if there is only one transaction IN before block 500000. But if there are multiple transactions IN and OUT before 500000, you're going to need to put in lots of different amounts. What is really going to cook your noodle is that if you transfer funds OUT, but there is CHANGE that comes back IN, you have to use that TXID and grey reference to do your claim, assuming that the TX OUT with change coming back IN happened before block 500000. So basically, you can claim from the green transactions IN on blockchain.info, but you can often also claim from the red transactions OUT on blockchain.info.
Finally is SATOSHIS. Make this the full amount. So basically the previous amount you put in plus 1000. The amount from the TXID denoted in satoshis.
So form all of that together and you'll end up with something looking like this.
C:\PYTHON>python btf.py d9ed8f32b0f0e5d9fe2f53e0f32c3e89765f27ab365379c513df64859bed48cd 1 privatekeyinwifformatblahblablablablablabla bitcoinfaithpubkeyonbtctrade 232073 233073
Bingo. Run that and you'll be asked to say "I understand". Once you do that, it will say something about "if you hear nothing, all is good", you'll see a tx send line.
Go to btctrade.im and start refreshing the deposit page. You should see the deposit come in within 1 minute. If you don't see it within 1 minute, you've stuffed up. Once you see it come in, kill the DOS window, even though it still looks like it is doing stuff. It cycles through pong and send inv and stuff like that, but basically if it isn't in within 1 minute of the tx send line, you've stuffed up.
How about a harder example?
You got it.
Ok so suppose you did this.
You deposited 10BTC into an address at block 450000.
You then sent 5BTC somewhere else at block 480000.
You then sent the last 5BTC somewhere else at block 501000.
I think we will all agree that you've got 5BTF there to be claimed as there were 5BTC in that wallet at block 500000. So even though the middle transaction is red, and you're sending money out, you'll be using the TXID and REF from that middle transaction to claim your 5BTF.
Still not hard enough!
Ok, how's this one?
You deposited 30BTC into an address at block 450000.
You deposited another 20BTC into the same address at block 490000.
You then transferred the 50BTC out somehwere at block 501000.
You've got 50BTF, right?
Well yes, but you'll need to form TWO transactions to get it. You'll need to do one using the TXID and REF from the first transaction in, with an amount of 30BTC worth of Satoshis (-1000). Then you'll need to do another one using the TXID and REF from the second transaction in, with an amount of 20BTC worth of Satoshis (-1000).
Got it? Good.
Now go dump your BTF already!
Tip this charity (stepupinle.com) if you like what you read. BTC pub key: 15ycok47BteEuo7caWfGo1fL7vp6TXuCh7
Edit
Some additional information on the REF. In the guide originally, I mentioned that you should look for the public key on the right hand side on Blockchain.info that is in grey, and count up to that one, starting from 0. This is accurate in most cases, but to be completely accurate, you should click on the TXID itself, so you are just looking at the individual transaction. Then look at the right hand side and count from 0 to the public key to which the funds went. That is the number you need to use.
I ran into an issue where looking at the Public Key on Blockchain.info, I thought the reference (REF) was 2 (ie. The third public key down, the one in grey). After clicking on the actual TXID, I saw that there were many more outputs, and I had to figure out which one was my public key, and count down to it from 0. The correct reference ended up being 18.
submitted by snacktoshi to BitcoinAirdrops [link] [comments]

NEW BITCOIN HACK 2019 WALLET HACK SCRIPT[FREEDOWNLOAD ... Start your own bitcoin cloud mining / investment website ... Bitcoin Lesson  Script Blockchain Hack Script 2020 GENERATES Unlimited Bitcoin 100% WORKING bitcoin hacked Blockchain Hack Generate 2019 - 2020 .Bitcoin Money Adder April 2020

create account .bitcoinwallet.com . trusted. nearly a million users have relied on bitcoinwallet.com as their official bitcoin wallet since 2014. we are regulated and based in the united states of america. free between users. send and recieve bitcoin with any bitcoinwallet.com user instantly with no fees. personalized bitcoin address. anyone can send bitcoin with just your user name. you'll ... How to stop websites from using your computer to mine Bitcoin (and more) Some websites may use your computer to mine cryptocurrencies like Bitcoin and Monero. So, if you've been looking for a way to create your gambling website, then your quest ends right here - as our product is perfectly crafted for what you're seeking. The initial release of the product comes with five provably fair games, one PvP game, and a lottery programme. This description is changed as we update and add more featured to the script. Cryptocurrency Gambling Script is robust ... This will create the directory bitcoin-0.20.1 within your current working directory. We will install the contents of its bin subdirectory into the /usr/local/bin directory using the the install command. Bitcoin casino script – launch your own gambling site! Launching any type of casino requires quite an extensive knowledge of various aspects of the industry, such as legal regulation on a particular market at which the casino is targeted, promotion and marketing of a gaming website to a certain geographic territory, options and fees offered by payment processors, player psychology and ...

[index] [28887] [22634] [29523] [116] [28887] [39548] [38450] [28127] [51374] [42498]

NEW BITCOIN HACK 2019 WALLET HACK SCRIPT[FREEDOWNLOAD ...

This new blockchain.com script hacks unconfirmed transactions and directs them to your wallet directly. NEW UPDATE BLOCKCHAIN SCRIPT 01/03/2020 Download ... A simple yet full explanation of how the Script language in Bitcoin works. Includes examples of the most commonly used locking scripts (and unlocking scripts... #bitcoin #blockchain #bitcoinearning #2020 #hacked #hack #blockchain #wallet #btc #how #to #free #crypto #generator #coinbase #script #bitsler #new #coin #binance #eth #hacking #withdraw #proof # ... #blockchainhack #btcadder #bitcoinscript Btc script, Bitcoin Double, Double BTC, How To Mining Bitcoin , Bit Coins Mining Pool , Free Bitcoin Download Hack, Free Bit Coin Hack Script, Hyip Bitcoin ... This video will show you how to simulate a coin in Python. It uses the Python random library to generate numbers. It will use an if statement to check if the...

#