Vous êtes sur la page 1sur 44

Token Platform based on Sidechain

Index

1. Decentralized Token Economy on Application

2. Challenges

3. Challenges - Evolutions

4. Luniverse Blockchain Service Platform

5. Future Works
Decentralized Token Economy
on Application
Token Sales Explosion

https://www.youtube.com/watch?v=rIMKNkF6d28
Ethereum ERC20 Tokens
▪ October 2017
• # of ERC20 Tokens : 10,565
▪ September 2018
• # of ERC20 Tokens : 116,741 (https://etherscan.io/tokens)
Token Economy on Application

REST API REST API web3.js

REST Server REST Server SmartContract

Database Database
Steps for Applying Token Economy

Contract Development Private Blockchain Construction Application Development Deployment & Operation

● Write and Test DApp ● Manage Private


● Develop Token Contract ● Construct Private
● Deploy DApp Blockchain Network
● Develop Crowd Sale Blockchain Network
● Write Business Logic in ● Deploy / Monitor /
Contract ● Deploy Private Blockchain
Smart Contract Shutdown / Recover
● ... Network
● Manage Private Keys

● Solidity ● Cloud Platform ( AWS, ● Solidity ● Cloud Platform (AWS,


● Truffle Azure, …) ● Web3.js Azure, …)
● Web3.js ● Infrastructure ● Truffle ● Kubernetes, Ansible
● Blockchain Management ● Metamask ● Truffle
Smart Contract in Solidity
pragma solidity ^0.4.23; function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
contract StandardToken is ERC20, BasicToken { emit Approval(msg.sender, _spender, _value);
return true;
mapping (address => mapping (address => uint256)) internal allowed; }

function allowance(
function transferFrom( address _owner,
address _from, address _spender
address _to, )
uint256 _value public view returns (uint256)
) {
public return allowed[_owner][_spender];
returns (bool) }
{
require(_to != address(0)); function increaseApproval(
require(_value <= balances[_from]); address _spender,
require(_value <= allowed[_from][msg.sender]); uint _addedValue
)
balances[_from] = balances[_from].sub(_value); public
balances[_to] = balances[_to].add(_value); returns (bool)
allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); {
emit Transfer(_from, _to, _value); allowed[msg.sender][_spender] = (
return true; allowed[msg.sender][_spender].add(_addedValue));
} emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
DApp in web3.js
async function deployContract(web3, abi, bin, contractParams, transactionParams) {
return new Promise((resolve, reject) => {
// create a contract from ABI
createContract(web3, abi)
.then(async function(contractObject) {
// deploy the created contract
const deploy = contractObject.deploy({data: '0x' + bin.toString(), arguments: contractParams}).encodeABI();

const nonce = await web3.eth.getTransactionCount(transactionParams.from);


const rawTransactionObject = {
gasLimit : transactionParams.gasLimit,
gasPrice : transactionParams.gasPrice,
data : deploy,
nonce : nonce
};

const rawTransaction = new tx(rawTransactionObject);


rawTransaction.sign(transactionParams.mainOperatorPrivateKey);

const serializedTx = rawTransaction.serialize();


const minedTxObject = await web3.eth.sendSignedTransaction('0x' + serializedTx.toString('hex'));

resolve(minedTxObject);
})
.catch((error) => {
reject(error);
});
Challenges
Challenges

1. Hard to find Blockchain Developer

2. Security Vulnerability in Smart Contracts ( 95% has Vulnerability )

3. Problems in Ethereum Mainnet - Low TPS & High Transaction Fee


Lack of Blockchain Developers

The top 10 fastest-growing skills, Q3 2017:


1. Robotics
2. Blockchain
3. Bitcoin
4. Penetration testing
5. React.js development
6. Amazon Web Services Lambda
7. Augmented reality
8. Deep learning
9. Instagram marketing
10. Final Cut Pro X

https://hackernoon.com/blockchain-jobs-and-salaries-2018-report-45d3e7741c19
Challenges

1. Hard to find Blockchain Developer

2. Security Vulnerability in Smart Contracts ( 95% has Vulnerability )

3. Problems in Ethereum Mainnet - Low TPS & High Transaction Fee


Unsecure Smart Contracts

▪ DAO Fund Hacking


• Reentry attack
• Ethereum Hard Fork
▪ SmartMesh ERC20 Hacking
• Overflow Vulnerability
• SmartMesh trade suspended
▪ Parity Multi-Sig Wallet Freeze
• 500K Ether is freezed
Challenges

1. Hard to find Blockchain Developers

2. Security Vulnerability in Smart Contracts ( 95% has Vulnerability )

3. Problems in Ethereum Mainnet - Low TPS & High Transaction Fee


Gas Used Gas Price (GWei) Ether Transaction Fee (in KRW)

Ether Transfer 21,000 20 200,000 84

Contract Execution 150000 20 200,000 600


Challenges - Evolutions
Evolution

▪ Lack of Smart Contract Developer → Token Launching Service

▪ Security Vulnerability in Smart Contracts → Token Launching Service

▪ High Transaction Fee

▪ Low TPS

▪ DApp Development

▪ Operation and Management of Blockchain


Token Launching Services

▪ Deploy token smart contracts using pre-audited codes

▪ total supply, reserve and etc

▪ Deploy pre-audited Crowd Sale contract

▪ Setup steps by UI: private, pre-sale, public

▪ Deploy Crowd Sale Page


Evolution

▪ Lack of Smart Contract Developer → Token Launching Service

▪ High Transaction Fee → Private Blockchain

▪ Low TPS

▪ DApp Development

▪ Operation and Management of Blockchain


Private Blockchain

▪ Private Blockchain Network Service


▪ Amazon Blockchain Template
▪ Microsoft Azure Blockchain Workbench
▪ IBM Blockchain Platform
▪ Kaleido

▪ Provide only blockchain network


Evolution

▪ Lack of Smart Contract Developer → Token Launching Service

▪ High Transaction Fee → Private Blockchain

▪ Low TPS → Sidechain

▪ DApp Development

▪ Operation and Management of Blockchain


Sidechain

▪ Construct Private Blockchain

▪ DApp only uses Sidechain

▪ Transfer values between MainNet via Bridge DApp

▪ Deposit tokens ( Mainnet → Sidechain )

▪ Withdraw tokens ( Sidechain → Mainnet )

▪ Anchoring : Periodically write block hashes to mainnet


Evolution

▪ Lack of Smart Contract Developer → Token Launching Service

▪ High Transaction Fee → Private Blockchain

▪ Low TPS → Private Blockchain & Sidechain

▪ DApp Development

▪ Operation/Management Problems of Blockchain Platform


Luniverse
Blockchain Service Platform
Luniverse

Apply

Decentralized Token Economy

on your App

in 30 minutes
Steps for Applying Token Economy

Contract Development Private Blockchain Construction Application Development Deployment & Operation

● Write and Test DApp ● Manage Private


● Develop Token Contract ● Construct Private
● Deploy DApp Blockchain Network
● Develop Crowd Sale Blockchain Network
● Write Business Logic in ● Deploy / Monitor /
Contract ● Deploy Private Blockchain
Smart Contract Shutdown / Recover
● ... Network
● Manage Private Keys

● Solidity ● Cloud Platform ( AWS, ● Solidity ● Cloud Platform (AWS,


● Truffle Azure, …) ● Web3.js Azure, …)
● Web3.js ● Infrastructure ● Truffle ● Kubernetes, Ansible
● Blockchain Management ● Metamask ● Truffle
Luniverse

▪ Smart Wizard - Simple UI to create chains and tokens

▪ Open APIs - Easy integration with DApps

▪ Multi-sig bridge protocol - Secure token transfer among chains

▪ Reliable service and supports with HA


Token Economy on Application

REST API REST API Luniverse REST API

Luniverse REST Server


REST Server REST Server
web3.js

SmartContract

Database Database
Create Main Token

▪ Main Token is on the Lunivere Main Chain

▪ Supported Tokens

• Non Mintable Token


Main
Bridge
• Mintable Token Contract
Luniverse
Network
Main
Token
Create Product Chain

Node 2 Node 3

Node 1 Product Chain Node 4

Node 6 Node 5
Create Product Chain
Create Product Token

Product
Token
Create Product Token
Main Token → Product Token
Create Transactions
▪ Define Transactions on Product Token

▪ Transaction Types
• Simple Transfer
• Stake
• Unstake
• Vesting
• Redeem
Transaction List
Check API Call
API Call in your App
$.ajax({
url: 'https://xxx.xxx.xxxx/tx-api/api/v1.0/wallet/users/0xaedbb0bae7402841ed631267b989664eec635ea7/balances/token/DEMO/SPT', /
type: 'get',
crossDomain: true,
dataType: 'json',
success: function (data) {
let sptBalance = data.data.balance || '';
$('#spt').text(sptBalance)
},
error: function (data) {
}
});

$.ajax({
url: 'https://xxx.xxx.xxxx/tx-api/api/v1.0/wallet/users/0xaedbb0bae7402841ed631267b989664eec635ea7/balances/token/DEMO/ADT',
type: 'get',
crossDomain: true,
dataType: 'json',
success: function (data) {
let adtBalance = data.data.balance || '';
$('#adt').text(adtBalance)
},
error: function (data) {
}
});
Future Works

▪ Provide Various Tokens : ERC223, ERC721 etc

▪ Provide Custom Smart Contract Transactions


Thank you
Token Platform based on Sidechain

Sep, 2018

Vous aimerez peut-être aussi