<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ακιλα βαηδαrα</title>
    <description>The latest articles on DEV Community by Ακιλα βαηδαrα (@clayakilabandara).</description>
    <link>https://dev.to/clayakilabandara</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F503497%2Ffa61a2cb-7211-4008-b698-34f558ef9dc4.jpg</url>
      <title>DEV Community: Ακιλα βαηδαrα</title>
      <link>https://dev.to/clayakilabandara</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/clayakilabandara"/>
    <language>en</language>
    <item>
      <title>Ruby Modules</title>
      <dc:creator>Ακιλα βαηδαrα</dc:creator>
      <pubDate>Sun, 01 Nov 2020 07:30:23 +0000</pubDate>
      <link>https://dev.to/clayakilabandara/ruby-modules-32p6</link>
      <guid>https://dev.to/clayakilabandara/ruby-modules-32p6</guid>
      <description>&lt;p&gt;Modules are a way of grouping together methods, classes, and constants. Modules give you two major benefits.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Modules provide a namespace and prevent name clashes.

Modules implement the mixin facility.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Modules define a namespace, a sandbox in which your methods and constants can play without having to worry about being stepped on by other methods and constants.&lt;br&gt;
Syntax&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module Identifier
   statement1
   statement2
   ...........
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Module constants are named just like class constants, with an initial uppercase letter. The method definitions look similar, too: Module methods are defined just like class methods.&lt;/p&gt;

&lt;p&gt;As with class methods, you call a module method by preceding its name with the module's name and a period, and you reference a constant using the module name and two colons.&lt;br&gt;
Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/usr/bin/ruby

# Module defined in trig.rb file

module Trig
   PI = 3.141592654
   def Trig.sin(x)
   # ..
   end
   def Trig.cos(x)
   # ..
   end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can define one more module with the same function name but different functionality −&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/usr/bin/ruby

# Module defined in moral.rb file

module Moral
   VERY_BAD = 0
   BAD = 1
   def Moral.sin(badness)
   # ...
   end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Like class methods, whenever you define a method in a module, you specify the module name followed by a dot and then the method name.&lt;br&gt;
Ruby require Statement&lt;/p&gt;

&lt;p&gt;The require statement is similar to the include statement of C and C++ and the import statement of Java. If a third program wants to use any defined module, it can simply load the module files using the Ruby require statement −&lt;br&gt;
Syntax&lt;/p&gt;

&lt;p&gt;require filename&lt;/p&gt;

&lt;p&gt;Here, it is not required to give .rb extension along with a file name.&lt;br&gt;
Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$LOAD_PATH &amp;lt;&amp;lt; '.'

require 'trig.rb'
require 'moral'

y = Trig.sin(Trig::PI/4)
wrongdoing = Moral.sin(Moral::VERY_BAD)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we are using $LOAD_PATH &amp;lt;&amp;lt; '.' to make Ruby aware that included files must be searched in the current directory. If you do not want to use $LOAD_PATH then you can use require_relative to include files from a relative directory.&lt;/p&gt;

&lt;p&gt;IMPORTANT − Here, both the files contain the same function name. So, this will result in code ambiguity while including in calling program but modules avoid this code ambiguity and we are able to call appropriate function using module name.&lt;br&gt;
Ruby include Statement&lt;/p&gt;

&lt;p&gt;You can embed a module in a class. To embed a module in a class, you use the include statement in the class −&lt;br&gt;
Syntax&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;include modulename
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If a module is defined in a separate file, then it is required to include that file using require statement before embedding module in a class.&lt;br&gt;
Example&lt;/p&gt;

&lt;p&gt;Consider the following module written in support.rb file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module Week
   FIRST_DAY = "Sunday"
   def Week.weeks_in_month
      puts "You have four weeks in a month"
   end
   def Week.weeks_in_year
      puts "You have 52 weeks in a year"
   end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, you can include this module in a class as follows −&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/usr/bin/ruby
$LOAD_PATH &amp;lt;&amp;lt; '.'
require "support"

class Decade
include Week
   no_of_yrs = 10
   def no_of_months
      puts Week::FIRST_DAY
      number = 10*12
      puts number
   end
end
d1 = Decade.new
puts Week::FIRST_DAY
Week.weeks_in_month
Week.weeks_in_year
d1.no_of_months
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will produce the following result −&lt;/p&gt;

&lt;p&gt;Sunday&lt;br&gt;
You have four weeks in a month&lt;br&gt;
You have 52 weeks in a year&lt;br&gt;
Sunday&lt;br&gt;
120&lt;/p&gt;

&lt;p&gt;Mixins in Ruby&lt;/p&gt;

&lt;p&gt;Before going through this section, we assume you have the knowledge of Object Oriented Concepts.&lt;/p&gt;

&lt;p&gt;When a class can inherit features from more than one parent class, the class is supposed to show multiple inheritance.&lt;/p&gt;

&lt;p&gt;Ruby does not support multiple inheritance directly but Ruby Modules have another wonderful use. At a stroke, they pretty much eliminate the need for multiple inheritance, providing a facility called a mixin.&lt;/p&gt;

&lt;p&gt;Mixins give you a wonderfully controlled way of adding functionality to classes. However, their true power comes out when the code in the mixin starts to interact with code in the class that uses it.&lt;/p&gt;

&lt;p&gt;Let us examine the following sample code to gain an understand of mixin −&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module A
   def a1
   end
   def a2
   end
end
module B
   def b1
   end
   def b2
   end
end

class Sample
include A
include B
   def s1
   end
end

samp = Sample.new
samp.a1
samp.a2
samp.b1
samp.b2
samp.s1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Module A consists of the methods a1 and a2. Module B consists of the methods b1 and b2. The class Sample includes both modules A and B. The class Sample can access all four methods, namely, a1, a2, b1, and b2. Therefore, you can see that the class Sample inherits from both the modules. Thus, you can say the class Sample shows multiple inheritance or a mixin.&lt;/p&gt;

</description>
      <category>ruby</category>
    </item>
    <item>
      <title>Make your own cryptocurrency</title>
      <dc:creator>Ακιλα βαηδαrα</dc:creator>
      <pubDate>Sun, 01 Nov 2020 07:22:17 +0000</pubDate>
      <link>https://dev.to/clayakilabandara/make-your-own-cryptocurrency-5hm0</link>
      <guid>https://dev.to/clayakilabandara/make-your-own-cryptocurrency-5hm0</guid>
      <description>&lt;p&gt;Author profile picture&lt;br&gt;
@oleksii.she&lt;br&gt;
Oleksii Shevchenko&lt;/p&gt;

&lt;p&gt;Cryptocurrency is one of the words you can’t avoid these days. News, blogs and even big-time financial authorities obsess over it, and by now everyone has to admit: the world is changing in front of our eyes. Miss this bandwagon now and you will be left so far behind that you might never recover.&lt;/p&gt;

&lt;p&gt;So, here you are with this great new business idea or getting ready to launch a startup, and you want to embrace the fascinating opportunities of the new world and create your own cryptocurrency. But how exactly does one do that? The Internet is full of information but, as it often happens, it’s contradicting, spattered all over the place, and sometimes simply hard to understand due to a heavy industry jargon.&lt;/p&gt;

&lt;p&gt;After reading this article you will know exactly what a cryptocurrency is, how a token is different from a coin, how to make your own cryptocurrency and whether your business needs it.&lt;br&gt;
Trending Cryptocurrency Hub Articles:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Everything we know about Ethergotchi so far!

2. Decentraland’s Virtual LAND Sale Stats

3. Three best blockchain stocks investors should watch out for

4. A Crypto that will Pay You
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Difference Between Token and Coin&lt;/p&gt;

&lt;p&gt;Before we dive into the technicalities of how to create your own cryptocurrency, we should set our facts straight and take a look at some basic definitions used in all cryptocurrency-related conversations.&lt;br&gt;
So, what is a cryptocurrency?&lt;/p&gt;

&lt;p&gt;Let’s take a step back and refresh in memory a definition of a currency first. While we tend to think about currencies in terms of banknotes and coins or dollars and euros, a currency is a unit of storage and account and a means of exсhаnge, i.e. a universally accepted way to obtain goods and services as well as to store and distribute wealth.&lt;/p&gt;

&lt;p&gt;Now, a cryptocurrency can be defined as a digital currency relying on encryption to generate new units and confirm the transactions. It has all the functions of the currency with the difference of running outside of a single centralized platform (such as a bank).&lt;/p&gt;

&lt;p&gt;Cryptocurrencies don’t have banknotes but they do have coins, which are often confused with tokens. So what exactly is the difference between them? Simply put, it all comes down to these three points:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Coins require their own blockchain while tokens can operate on the existing ones.
Tokens are limited to a specific project; coins can be used anywhere.
Coins buy tokens but tokens can’t buy coins.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you want to put tokens and coins in a real-life context, think about tokens as your Frequent Flyer Miles while coins are actual money: you can use both to get an airplane ticket, but with the miles your choice will be limited to the air company that issued them, while with the money you can take your business anywhere you want.&lt;/p&gt;

&lt;p&gt;The bottomline is that you need to build a blockchain if you want to create a crypto coin.&lt;br&gt;
Benefits of having your own cryptocurrency&lt;/p&gt;

&lt;p&gt;In some cases it’s a no-brainer: if your project or startup requires its own blockchain, you need to create your own digital currency to incentivize the nodes contributing their processing power. One more word on blockchains here: many authoritative business analysts foresee a big future and a growing list of the markets and industries where the blockchain technology will significantly disrupt the status quo and generously reward the early adopters. The good news is that for many fields the blockchain technology has never truly arrived yet so it’s not too late to join the ranks of pioneers.&lt;/p&gt;

&lt;p&gt;The other important aspect is that when you decide to start a cryptocurrency you get a whole set of powerful marketing tools and consumer benefits which will help you differentiate yourself from the competition. Here is a list of the most significant advantages:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Eliminating fraud risks — cryptocurrency is impossible to counterfeit and no party can reverse past transactions.
Providing transaction anonymity — customers decide what exactly they want sellers to know about them.
Cutting down operating costs — cryptocurrency is free from the exchange or interest rates, as well as the transaction charges.
Offering immediate transactions — state holidays, business hours or geographic location of the parties don’t affect cryptocurrency.
Ensuring an immediate pool of potential customers — now you can make business with those without an access to traditional exchange resources. No more trade restrictions in any markets.
Providing security for their funds — since cryptocurrency is a decentralized system, there is no Big Brother figure like banks or government institution that can seize or freeze your assets.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;How to Create a Blockchain&lt;/p&gt;

&lt;p&gt;Now that you know how your own cryptocurrency can boost your business, let’s see the main steps you need to take to build a blockchain.&lt;br&gt;
Step 1. Know your use-case.&lt;/p&gt;

&lt;p&gt;Do your business interests lay in smart contracts area, data authentication and verification or in smart asset management? Define your objectives clearly at the very beginning.&lt;br&gt;
Step 2. Choose a consensus mechanism.&lt;/p&gt;

&lt;p&gt;For your blockchain to operate smoothly the participating nodes must agree on which transactions should be considered legitimate and added to the block. Consensus mechanisms are the protocols that do just that. There are plenty to choose from for the best fit for your business objectives.&lt;br&gt;
Step 3. Pick a blockchain platform.&lt;/p&gt;

&lt;p&gt;Your choice of a blockchain platform will depend on the consensus mechanism you’ve selected. To give you a better idea of what is out there, here is a list of the most popular blockchain platforms:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Ethereum (market share — 82.70%)
Waves (WAVES)
NEM
Nxt (NXT)
BlockStarter
EOS
BitShares 2.0
CoinList
Hyperledger Fabric
IBM blockchain
MultiChain
HydraChain
BigChainDB
Openchain
Chain Core
Quorum
IOTA
KICKICO
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Step 4. Design the Nodes&lt;/p&gt;

&lt;p&gt;If you imagine a blockchain as a wall, nodes are the bricks it consists of. A node is an Internet-connected device supporting a blockchain by performing various tasks, from storing the data to verifying and processing transactions. Blockchains depend on nodes for efficiency, support, and security.&lt;/p&gt;

&lt;p&gt;There is a number of choices you have to make about the nodes you will employ:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;What are they going to be in terms of permissions: private, public, or hybrid?
Will they be hosted on the cloud, on premise or both?
Select and acquire necessary hardware details, such as processors, memory, disk size, etc.
Pick a base operating system (most common choices would be Ubuntu, Windows, Red Hat, Debian, CentOS, or Fedora)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Step 5. Establish your blockchain’s internal architecture&lt;/p&gt;

&lt;p&gt;Tread carefully as some of the parameters can not be changed once the blockchain platform is already running. It’s a good idea to take your time and really think through the following:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Permissions (define who can access the data, perform transactions and validate them, i.e. create new blocks)
Address formats (decide what your blockchain addresses will look like)
Key formats (decide on the format of the keys that will be generating the signatures for the transactions)
Asset issuance (establish the rules for creating and listing all asset units)
Asset re-issuance (establish the rules for creating more units of the open assets)
Key management (develop a system to store and protect the private keys granting the blockchain access)
Multisignatures (define the amount of keys your blockchain will require to validate a transaction )
Atomic swaps (plan for the smart contracts enabling the exchange of different cryptocurrencies without a trusted third party)
Parameters (estimate maximum block size, rewards for block mining, transaction limits, etc.)
Native assets (define the rules of a native currency issued in a blockchain)
Block signatures (define how the blockchain participants creating blocks will be required to sign them)
Hand-shaking (establish the rules of how the nodes will identify themselves when connecting to each other)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Step 6. Take care of APIs&lt;/p&gt;

&lt;p&gt;Make sure to check whether the blockchain platform of your choice provides the pre-built APIs since not all of them do. Even if your platform doesn’t come with those, not to worry: there are a lot of reliable blockchain API providers out there. Here are some of them for you to check out:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ChromaWay
Bitcore
Neuroware
Tierion
Gem
Coinbase’s API
Colored Coin APIs
Blockchain APIs
Factom Alpha API
Colu
BlockCypher
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Step 7: Design the Interface (Admin and User)&lt;/p&gt;

&lt;p&gt;Communication is the key and a well-thought-out interface ensures a smooth communication between your blockchain and it’s participants.&lt;/p&gt;

&lt;p&gt;Here are the things to consider at this stage:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Web, mail and FTP servers
External databases
The front end and programming languages (e.g. HTML5, CSS, PHP, C#, Java, Javascript, Python, Ruby).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Step 8. Make your cryptocurrency legal&lt;/p&gt;

&lt;p&gt;Slowly but surely the law is catching up with the cryptocurrencies and you better protect yourself from any surprises by looking into the trends around the cryptocurrency regulations and the direction they are headed.&lt;br&gt;
Bonus step for overachievers: Grow and Improve your Blockchain&lt;/p&gt;

&lt;p&gt;You’ve come so far, don’t stop now. Get a headstart into the future and think how you can boost your blockchain by tapping into the future-proof technologies like the Internet of Things, Data Analytics, Artificial Intelligence, Cognitive service, Machine Learning, Containers, Biometrics, Cloud, Bots and other inspiring developments.&lt;br&gt;
Bitcoin Forks as an Alternative to Building Your Own Blockchain&lt;/p&gt;

&lt;p&gt;As you can see, it takes a lot of time, resources and particular skills to build a blockchain. So what can you do if you don’t possess all of the above but still want to build your own cryptocurrency? Then it’s time to talk about Bitcoin forks.&lt;br&gt;
How to Create a Bitcoin Fork?&lt;/p&gt;

&lt;p&gt;It’s time for another basic definition to make sure that we speak the same language.&lt;br&gt;
What is forking in cryptocurrency?&lt;/p&gt;

&lt;p&gt;In layman’s terms, a blockchain fork is a software update. All blockchain participants (aka full nodes) run the same software and it’s crucial that they run the same version of that software to be able to access the shared ledger to verify transactions and ensure network security. Therefore, every time you want to change your blockchain parameters or introduce new features, you will need to create a fork.&lt;br&gt;
What is the difference between hard and soft forks?&lt;/p&gt;

&lt;p&gt;Forks can be divided into hard and soft.&lt;/p&gt;

&lt;p&gt;Hard forks require 90% to 95% percent of the nodes to update their software; the system will no longer accept the nodes running a non-updated version.&lt;/p&gt;

&lt;p&gt;Soft forks are less demanding. Simply a majority of the nodes is required to update the software and those who run a previous version can continue to operate.&lt;br&gt;
What are Bitcoin forks?&lt;/p&gt;

&lt;p&gt;Now, the Bitcoin forks are the changes in the Bitcoin network protocol. Since the Bitcoin code is an open-source protocol, it is a low-lift exercise for those who want to create their own cryptocurrency and built on the existing by adding new features or addressing current imperfections.&lt;br&gt;
How to create a Bitcoin fork?&lt;br&gt;
Option 1. Use a fork coin generator.&lt;/p&gt;

&lt;p&gt;If you don’t have any programming skills, services like ForkGen might be a perfect solution for you. ForkGen is an automated fork coin generator where anyone can create a unique Bitcoin offshoot by changing some parameters and rules.&lt;br&gt;
Option 2. Do It Yourself.&lt;/p&gt;

&lt;p&gt;If you want to take a hardcore way to create a Bitcoin fork and aren’t afraid to get your hands dirty, follow these steps:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Go to Github, find, download and compile Bitcoin code on your computer.
Then, the programming part starts: you’ll have to reconfigure the Bitcoin code, implement your customization.
Publish the code (open source) back to Github.
Provide a website and some kind of documentation (normally a white paper).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Bitcoin forks: success stories&lt;/p&gt;

&lt;p&gt;Bitcoin forks are worth exploring if you want to start your own cryptocurrency leveraging the social and financial capital around the Bitcoin name. Some examples of successful Bitcoin forks include:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Litecoin
Bitcoin Cash
Bitcoin Gold
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Main Steps of How to Make Your Own Cryptocurrency&lt;/p&gt;

&lt;p&gt;To sum it up, you have two ways to go about starting your own cryptocurrency: build a blockchain or create a fork.&lt;/p&gt;

&lt;p&gt;To build a blockchain you need to:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;define how it will be used in your business model;
decide upon a consensus mechanism
choose a blockchain platform;
design the nodes and blockchain properties;
provide APIs for the tasks executed on you blockchain;
develop an intuitive and comprehensive Admin and User Interfaces;
take care of the legal side of the business.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;To create a Bitcoin fork you can either:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Use an automated fork coin generator like ForkGen
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Or:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Download the Bitcoin code;
Customize it;
Publish and maintain your code.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Starting a New Cryptocurrency: Is It Worth the Effort?&lt;/p&gt;

&lt;p&gt;Having read this far, you already have a fairly clear picture of what it takes to create a new blockchain. Before starting any new complex project it’s always a good idea to take a deep breath and evaluate once again if this is something you should be investing your time and money in.&lt;/p&gt;

&lt;p&gt;So, how to establish if you even need a blockchain in the first place? Here is a list of question that will help you to answer this question before you make this commitment.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Do you need data storage?
Do your requirements reach beyond what a traditional database can provide?
Do you have multiple participants updating the data?
Are you looking to eliminate a third-party?
Do you want to establish a safe environment for the parties that don’t trust each other?
Is your environment going to have hard rules requiring little to no updates?
Do you need to maintain the privacy of your data?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you’ve answered “yes” to 3 and more of these questions, you will get all the benefits of a blockchain including:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enhancing data security.
Cutting down transaction costs.
Preventing frauds.
Improving efficiency.
Providing transparency.
Executing Smart Contracts.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;While the benefits are numerous, the amount of work that goes into creating your own blockchain is significant and requires a wide range of knowledge and tools to execute all steps of the process in the most time- and cost-efficient way.&lt;/p&gt;

&lt;p&gt;Having employed the help of professional developers you will significantly cut down your expenses in the long run by eliminating the room for errors, and, therefore, time and cost of the rework and updates; future-proof your solutions by working with the experts who stay on top of all the latest industry developments and innovations, and free up your time for growing your business.&lt;/p&gt;

&lt;p&gt;Explore how your business can benefit from its own cryptocurrency and blockchain — schedule your free 30-min consultation with the Ezetech professionals now.&lt;/p&gt;

</description>
      <category>cryptocurency</category>
    </item>
    <item>
      <title>LFI?</title>
      <dc:creator>Ακιλα βαηδαrα</dc:creator>
      <pubDate>Sun, 01 Nov 2020 07:15:24 +0000</pubDate>
      <link>https://dev.to/clayakilabandara/lfi-45le</link>
      <guid>https://dev.to/clayakilabandara/lfi-45le</guid>
      <description>&lt;p&gt;An attacker can use Local File Inclusion (LFI) to trick the web application into exposing or running files on the web server. An LFI attack may lead to information disclosure, remote code execution, or even Cross-site Scripting (XSS). Typically, LFI occurs when an application uses the path to a file as input. If the application treats this input as trusted, a local file may be used in the include statement.&lt;/p&gt;

&lt;p&gt;Local File Inclusion is very similar to Remote File Inclusion (RFI). However, an attacker using LFI may only include local files (not remote files like in the case of RFI).&lt;/p&gt;

&lt;p&gt;The following is an example of PHP code that is vulnerable to LFI&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/**
* Get the filename from a GET input
* Example - http://example.com/?file=filename.php
*/
$file = $_GET['file'];

/**
* Unsafely include the file
* Example - filename.php
*/
include('directory/' . $file);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above example, an attacker could make the following request. It tricks the application into executing a PHP script such as a web shell that the attacker managed to upload to the web server. 🤣&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


In this example, the file uploaded by the attacker will be included and executed by the user that runs the web application. That would allow an attacker to run any server-side malicious code that they want.

This is a worst-case scenario. An attacker does not always have the ability to upload a malicious file to the application. Even if they did, there is no guarantee that the application will save the file on the same server where the LFI vulnerability exists. Even then, the attacker would still need to know the disk path to the uploaded file.
Directory Traversal

Even without the ability to upload and execute code, a Local File Inclusion vulnerability can be dangerous. An attacker can still perform a Directory Traversal / Path Traversal attack using an LFI vulnerability as follows.



```http://example.com/?file=../../../../etc/passwd```



In the above example, an attacker can get the contents of the /etc/passwd file that contains a list of users on the server. Similarly, an attacker may leverage the Directory Traversal vulnerability to access log files (for example, Apache access.log or error.log), source code, and other sensitive information. This information may then be used to advance an attack.
Finding and Preventing Local File Inclusion (LFI) Vulnerabilities

Fortunately, it’s easy to test if your website or web application is vulnerable to LFI and other vulnerabilities by running an automated web scan using the Acunetix vulnerability scanner, which includes a specialized LFI scanner module. Request a demo and find out more about running LFI scans against your website or web application.

Resources:https://www.acunetix.com/
Docs: https://osandamalith.com/2019/10/12/bypassing-the-webarx-web-application-firewall-waf/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>security</category>
    </item>
  </channel>
</rss>
