Questions and answers to the Takamaka Blockchain Team
Security, oracles, programmability and future developments, a must-read interview to understand and learn about the project and its direction.
1) My understanding is that this is a completely new blockchain in its own right. It‘s not a fork or layer of 2 existing blockchains?
?? It is a blockchain entirely built from scratch which uses the Proof-of-Stake (PoS) algorithm
2) Faster than Ethereum and cheaper, but what about Algorand or Cosmos-derived blockchains (e.g. Terra)?
?? The speed of Takamaka blockchain is constrained by the hardware resources made available by the nodes, so the network effect (intended as performance and scalability) is made by the hardware. Algorand introduced the Pure Pos (PPOS) delegating the security of the network to the owners of the tokens (and staking) and the ASA protocol to manage tokens which are not the blockchain native one.
TERRA instead, is a large and complex project, not only SC, derivatives and Stablecoin, but much more. COSMOS ( Atom ), makes blockchain interoperable, thanks to the substrates TENDERMINT and Cosmos SDK, optimizing performance and security. Takamaka is (will become) a programmable ecosystem, where SC processing, transactions and integration functions with IoT will bring new solutions. It is a solution halfway between the performance of ALGORAND and the programmability of TERRA.
A secure and monolithic blockchain on which , in the future, will be possible to provide interoperability with other solutions.
3) The smart contracts are developed in Java. Ethereum uses solidity and the contracts run in the E(thereum)VM and in the case of Takamaka it is a Java and therefore the Java virtual machine?
?? YES. Takamaka is a Java framework for writing Smart contracts. Programmers can use Java to write code that can be installed and executed on the blockchain.
4) Takamaka blockchain runs with 2 tokens, am I right? I interpreted the Green Token (TKG) to be a governance token but also usable for transactions and the reward from staking operations. But the Red Token (TKR)?
?? Staking is paid with both red TKR token and green TKG token.
a. If I understand correctly, the difference between the Green Token (TKG) and Red Token (TKR) is that the latter: 1) is a stablecoin 2) is not generated as a staking reward.
?? YES Correct.
b. Now comes the which is a bit unclear to me:
How is the stability of TKR guaranteed? It’s not an “algorithmic”; stable coin like DAI for example, right? So is it like Tether? AiliA acts as a guarantor?
?? TKR is a Tether-like stablecoin. TKR was created in block zero and anyone can acquire it directly from AiliA either with bank transfer or credit card payments. The money is deposited at the BPS bank and guarantees the value of the stablecoin issued by AiliA. Takamaka recently obtained the “ Financial Services Standards Association (VQF)“, which certifies that the company complies with anti-money laundering regulations and that TKR, Takamaka’s
stablecoin pair 1:1: with the USD, is officially in compliance with the Swiss regulator and is to all intents and purposes digital money!
c. The white paper mentions “determinism“ in the determination of fees… I guess this only applies to TKR. TKG is a "standard" token and is subject to fluctuations. So it is up to the user to decide whether or not to tolerate fee fluctuations and to choose which token to use.
?? The system determines the fees regardless of the token (it calculates them in TK) then it is up to the user to choose what to pay them with. If there are TKRs on the wallet the system will automatically pay in TKRs. If there are not enough TKR, the system will first pay with TKR and the remainder with TKG, otherwise only in TKG.
Determinism refers to the calculation of transaction costs. For basic transactions the only criterion evaluated is the number of bytes. Loading a hash, which has a fixed length, always costs about 0.07 TK(G/R). As a result, the cost of execution is calculable beforehand, allowing budget planning based on the workload.
The same applies to smart contracts, with the only difference that the consumption of RAM and CPU must also be considered. In this case, determinism is a consequence of the way the functions have been programmed. Finally, there is the cost of the token in relation to the exchange rate. While the TKG value is fluctuating, the TKR has a fixed value.
Since the chain is:
(transaction bytes) → (TK) → (TKG)
The first transaction is deterministic, the second conversion is constant from this follows the predictable cost.
In the construction phase all the possible changes in cost parameters related to the workload of the network have been deliberately removed.
d. Then, If I’m not mistaken, TKG is not exchangeable for TKR? So to get “cash”; I have to sell it on DEX, right?
?? Yes, at the moment TKG can only be traded on the LATOKEN exchange, there are currently no DEXs accepting exchange of TKG, due to its PoS. It is not excluded that in the near future Takamaka will create its own DEX in order to exchange Takamaka’s tokens.
5) Security problem in smart contract management. Java is turing complete. What about “financial” transactions which do not require complex code? (no loops?!).It is fair to say that there are two types of contracts to overcome the problem?
?? The Takamaka blockchain is structured on 2 levels, the one currently in production is not full turing. In practice it consists of a preset of constant cost operations:
? exchange of the native tokens (TKG, TKR)
? staking configuration
? data recording
From the analyses done in the design phase we have extracted this minimal subset. All the functions described above are security-critical, commonly used but, at the same, time costly in terms of space and data structures.
We managed to limit the maximum amount of resources required for each operation, effectively putting a ceiling on the complexity of execution. Without this, it would not be possible to guarantee the throughput stated in the specifications. As you have rightly noted, the drastic reduction in operational complexity at the base level makes it possible to implement very stringent controls, to use parallelism of calculation and to guarantee
a high level of security.
A negative consequence of guaranteeing throughput is the need to limit execution time. With a complete turing programme this is generally not possible. In order to avoid complex contracts being discarded because of the block release rate, it was decided to place the full turing layer on a different level by removing these constraints. Thanks to this choice, basic operations are fast and at a predictable cost, while smart contracts are not subject to purely technological limitations.
To answer your question, yes, the blockchain works on two levels, a synchronous and cadenced one that manages bulk operations and an asynchronous one (with respect to the release of blocks) that takes care of the operational complicacy of complex programs.
6) How is the “quality” of the information receive from the oracles guaranteed (e.g. more oracles queried for a smart contract?) From a coding point of view we use python “requests” library.
?? As you know the basic blockchains cannot ask the world for information. It is a closed and self-referential system. This is not an error but an inherent feature of these systems. If I were to allow external information to be read, I would link the correctness of the execution to the availability and integrity of an external source. If this were to fail at a given moment in time, transactional
correctness would no longer be verifiable independently by each node.
Obviously anyone can write and implement an oracle according to their own needs. What we can do is provide an example and implementation guidelines to create a data entry process that is as reliable as possible.
I will now bring you an example related to a concrete problem in finance: exchange rates. In the end, the same principles can be applied to any data source. First of all it is necessary to identify a secure and reliable source that can be shared by all users of the oracle.
In our case https://sdw-wsrest.ecb.europa.eu/help/ which is the European gateway for the publication of official data, including the daily exchange rate produced by the ECB. This is the official data recognised by all traders exchanging to and from the Euro and other central banks. A normal application would simply download the data by discarding the signature data (the padlock you see in the address bar of browsers) once it has been checked for integrity.
The oracle, on the other hand, has to guarantee the loading of unaltered data exactly as it is produced by the source. To do this it generates a file, which in addition to containing the raw data, also contains:
? the entire certificate chain from the root-ca to the one used to sign the data (this is the current standard for integrity verification in all public systems
领英推荐
? the signature of the message containing the exchange rates
? the raw exchange rates as produced by the European portal
? the most recent version of the revocation list
The last step is necessary to ensure the good faith of the oracle.
The oracle verifies that the data is within a range determined by the oracle programmer which avoids the inclusion of obviously wrong data. Sources, such as the one mentioned above, have multiple checking systems and patterns to allow an application to understand if the data is corrupt.
It then uploads everything to a BLOB transaction that is accessible to anyone on the blockchain. This is the basis of the blockchain oracle. All subsequent processing will refer to this particular data installation.
? Since [the data] is uploaded to the blockchain, it will be available independently to all nodes at any time.
? Root-CA certificates are present in all devices from the moment they are installed by the manufacturer. Even mobile phones need to know them and they are necessary for the proper functioning of the internet verification infrastructure (their lifetime is about 40 years). The fact that they are included in the transaction allows any device to decide whether the basic data used for signing is valid or not.
Subsequently, a final level of control is implemented within the application logic of the smart contract which, in the event of variations outside of a certain range, may wait for several confirmations before proceeding with execution. These controls are implemented a priori in the installed version of the smart contract and do not represent a “surprise” for the user. The user implicitly accepts them when he decides to make use of that programme.
To conclude, in this particular case we have chosen to link the oracle to a source whose compromise would render the smart contract useless.
In terms of requests and implementation, the blockchain is written in java but has a native REST interface. The linking libraries or the language in which the oracle is written depend only on the preference of the programmer.
7) How is the blockchain saved? I mean do you use a database… if yes, what kind? A standard such as mysql, postgres… that allows rollback to have ACID transactions? In this case, have platforms for blockchain analysis, accessible to the community, been developed or are planned via API? How does the wallet query the network?
??The current version of the wallet uses differential hash tables to store data and its evolution, taking into account possible forks. This technique has the advantage of being extremely efficient and makes the data manually verifiable. The tables are written as serialised json over text to facilitate debugging. These files can also be accessed directly and consulted as snapshots by external applications running on the same server.
The disadvantage of this technique is the occupation of space and the type of queries that can be executed, a brief description can be found here https://en.wikipedia.org/wiki/Hash_table .
In practice, if I want to find a balance I just need to know the address to which it is associated and in 3 simple steps Ill receive the data (O(1) constant time), regardless of the number of balances present within the blockchain, ensuring the maintenance of performance over time. This is done at the cost of sacrificing the efficiency of a query that lists all or some of the balances or extracts them by value.
Another feature of the data structure is fork management. Each block results in a change of state of the entire structure. However, if that block should be “discarded” because it is part of a secondary history, I must be able to instantly reconnect to the previous state. This advancement of the story tree, together with the ability to instantly reconnect to any point in the story, has a significant cost in terms of space.
The main difference with databases is that I can run an arbitrary number of versions of the world until the goal is reached, manage them in parallel, and do so without loss of computational efficiency.
This structure has given us time to improve the formulation of Takamaka’s goal. At the following link you will find the latest version of the related paper:
Thanks to this feature we were able to introduce a limitation to the complexity of fork management and begin the development of the new PostgreSQL-based client version.
Without this change, it would not have been possible to efficiently manage data on a standard DB. The introduction of the standard database will allow complex data mining queries to be performed on blockchain replication nodes as well as giving an additional layer of integrity to the data.
Currently, the software performs an initial calculation and then a verification. If the datafile result is not consistent, the block is discarded.
That will no longer be necessary thanks to the consistency rules inherent in the PostgreSQL structure, which will also extend the possibilities of data mining.
Currently, the execution of data mining queries is possible thanks to specific structures and the support of an elastic search database, which will be removed in later versions.
The documentation required to connect to the blockchain can be found here:
*Including applications and SDKs.
8) And about blockchain explorer… where do you see the transactions ?
9) Last… given the availability of a stablecoin… is the development of applications such as Chai payment (blockchain land) plausible?
?? Takamaka’s WALLET works (already) as a payment instrument, and given the possibility of storing TKR (stablecoin), recognised as digital money by the Swiss Regulators, payment systems can be launched (for those who accept them) with stablecoin guaranteed by the money stored in the bank account.
Furthermore, the road map includes the integration of the wallet with personalised credit cards, with which TKR can be spent.
And case studies on cashback are being presented to large entertainment companies.
The company has also formally applied for a banking licence in Switzerland.
?? For more information, please check out the links below.