how lambda256 developed a major blockchain platform with
TRANSCRIPT
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How Lambda256 developed a major blockchain platform with AWS databases
DAT313
MJ Jung
Account Manager
Amazon Web Services
Kwunho (Blake) Jeong
Chief Strategy Officer
Lambda256
Agenda
I. Blockchain market in Korea
II. Lambda256: Who are we?
III. Introduction to Luniverse Blockchain Service
IV. How did we use Amazon DynamoDB to build our SaaS?
V. Teaser on Amazon Quantum Ledger Database (Amazon QLDB) usage
VI. Quick demonstration
Agenda
I. Blockchain market in Korea
II. Lambda256: Who are we?
III. Introduction to Luniverse Blockchain Service
IV. How did we use DynamoDB to build our SaaS?
V. Teaser on Amazon QLDB usage
VI. Quick demonstration
107th Country size
10th GDP
28th Population (51 million)
First 5G network & fastest average internet connection
BTS (K-Pop), PUBG (game), and Yuna Kim/Hyunjin Ryu (athletes)
…And blockchain
Korea
Blockchain market in Korea
Blockchain technology
emerging
Cryptocurrency
boom
CurrentPast
AWS Summit Seoul: “Blockchain Pub”?
Purpose-built databases
Relational Key-value Document In-memory Graph Time-series Ledger
Aurora CommercialCommunity Redis Memcached
Amazon
DocumentDB
Amazon
DynamoDB
Amazon
Neptune
Amazon Quantum
Ledger Database
Amazon
RDS
Amazon
Timestream
Amazon
ElastiCache
Different demands on the database in blockchain
Management of the specific structured information
such as key management, access control, and OAuth
Management of complex transaction data
High scalability and throughput for data processing
such as block explore and blockchain analytics
Central trusted authority
Resistant to data modification & immutable
such as auditable data and event tracking
AWS DatabaseRequirements
Amazon
RDS
Amazon Quantum
Ledger Database
Amazon
DynamoDB
Relational
Key-value
Ledger
Agenda
I. Blockchain market in Korea
II. Lambda256: Who are we?
III. Introduction to Luniverse Blockchain Service
IV. How did we use DynamoDB to build our SaaS?
V. Teaser on Amazon QLDB usage
VI. Quick demonstration
Lambda256 & Dunamu affiliates
APAC
Cryptocurrency Exchange
Service in Korea
(Global top-tier crypto
exchange, partnering with
Bittrex US)
Cryptocurrency Exchange
Service in APAC
(Based in Singapore,
Thailand, Malaysia,
Indonesia, and expanding)
Stock Exchange Service
based on Kakao Platform
(Leading stock trading
application in South Korea,
rebranded to “Stockplus”)
Luniverse Blockchain-as-
a-Service 2.0 Platform
(Spun off from Dunamu,
since March ’19)
Investment Division of
Dunamu
(Invests total of ~$100M
into the
blockchain industry)
“We, as a blockchain enabler, provide infrastructure and services for our partners to
grasp driving forces for building blockchain-enabled ecosystems.”
Our business focus
B2C (DApp)
Businesses utilizing blockchain technology
to provide B2C services
B2B (Enterprise app)
Larger businesses (enterprises) using
blockchain to optimize internal process or
develop new business model
1 Expand the user base of DApp ecosystem
Provide a complete range
of the DApp ecosystem –
from development to usage
2 Fulfill the needs of enterprise customers
Establish a foundation for
mass adoption of blockchain led by
the enterprise area
Agenda
I. Blockchain market in Korea
II. Lambda256: Who are we?
III. Introduction to Luniverse Blockchain Service
IV. How did we use DynamoDB to build our SaaS?
V. Teaser on Amazon QLDB usage
VI. Quick demonstration
Roadblocks to blockchain mass adoption
DeveloperBlockchain transaction speed/scalability issue,
difficulties of responding to various protocols
End UserPrivate key management,
Inconvenient UI/UX
Lack of channels to approach DApps
BusinessDifficult to recruit competent
blockchain developers
Excessive R&D cost of blockchain
Lack of access to potential end users
Luniverse, Blockchain-as-a-Service 2.0
A developer-friendly
environment for
secure & convenient
development
High performance for service
Stability of service
Convenient development environment
Easy user account (EOA, REOA) mgmt.
Auto sign-in for real-time service
Safe user account back-up & mgmt.
Smart contract safety
Data privacy compliance
Manageable gas fee
Scalability per usage
Cloud-based
high-
performing
chain service
Token service
DApp service
Solidity IDE
User
management
service
Security
assessment
1
2
3
4
5
6
7
8
9
10
Luniverse Architecture Overview
Luniverse
User Portal
API
Gateway
Luniverse
Admin Portal
Layer Portal API Service Common
BaaS Admin
API
Token
API
Chain
API
Security
API
Operation
API
Utility
API
Luniverse
Admin API
Token Service
Chain Service
Security Assessment
Operation Service
Utility Service - wallet
Token Template
Manager
Authority Gov.
Manager
Block Explorer
ManagerBlock Anchor
Manager
Token Economy
Manager
Contract
Analyzer
Dashboard
Manager
Monitoring
ManagerAnalysis
Manager
Token Contract
3rd Party
wallet
Internal
Wallet(HSM)Auth
HSM User/
Private Key
Vulnerability
Pattern DBAssessment
Reporter
Data Service
Storage
Manager
(IPFS)
Data Analytics
Manager
System Contract
Provision
Manager DApp
Auth. Gov.
Manager DApp
(Stack Slasher)
Multi-Tenant
Shard Manager DAppBlock Anchor
DApp
Chain Router
Signer Bridge
DApp
Signer Bridge
DApp
Side Chain
Upward block Anchoring
(Level 1)
www
REST
RPC
www
Luniverse Blockchain Service Platform
Agenda
I. Blockchain market in Korea
II. Lambda256: Who are we?
III. Introduction to Luniverse Blockchain Service
IV. How did we use DynamoDB to build our SaaS?
V. Teaser on Amazon QLDB usage
VI. Quick demonstration
Initial architecture of Luniverse
Blockchain
node node
node
node
nodeBlockchain
node node
node
node
node
Luniverse platform
transaction server
token server
chain manager
nonce manager
User
API
call
Receipt
inquiry
Transactions
Request &
response
Amazon Aurora
Problem Statement: How to secure Blockchain Performance & Sustainability?
• Transaction receipt inquiries for all transactions are required to identify success/fail result• Periodic transaction receipt inquiry via polling methodology• #Transaction receipts > #Transactions
• Transaction receipt has significant impact on block mining performance
node 0
(miner)
node 1
node 2
1. Submit Tx
3. Get Receipt for Tx
Transaction
service
2. Submit Tx
4. Get Receipt for Tx
← TxHash
← Receipt
Our as-is architecture
Blockchain
node node
node
node
nodeBlockchain
node node
node
node
node
Luniverse platform
User
Transactions
API Call
Chain crawlerBlock, tx,
tx receipt
Raw & Secondary
data
Luniverse scan UI
User
Data Check
Inquiry & Query
Amazon Aurora
Amazon
DynamoDB
How did we solve the problem with DynamoDB?
● Used two types of table
○ Basic table: Only using partition key
○ Secondary table: Only using partition key + sort key
● Partition key
○ Starts with prefix, which differentiates data type and ChainId per chain
● Sort key
○ Curate chronological order with block number (12 digit) + tx index (6 digit) +
event index (6 digit)
● Data to be accumulated
○ Total transaction list of a chain gathered up in 100 units to store in
DynamoDB
■
■
■
■
DynamoDB table modeling: Basic
PartitionKey Data
{lChainId}’TI’{TxId} Transaction hash (string, < 100 B)
{lChainId}’TH’{TxHash} Json of transaction info (< 1 KB)
{lChainId}’TR’{TxHash}’receipt’ Json of receipt info of transaction (95% < 2 KB, 5% 2 ~ 4 KB)
{lChainId}’BN’{BlockNo} Json of block info (1.7 ~ 100 KB depends on the number of tx in the block)
{lChainId}’BH’{BlockHash} Block number (number)
{lChainId}’DM’{DAppId}’meta’ Refer to the right (< 1 KB)
{lChainId}’DI’{DAppId}{Idx} A bundle of transaction hashes (exactly 100 tx in a bundle) (6.5 KB)
{lChainId}’TM’transaction’’meta’ Refer to the right (< 1 KB)
{lChainId}’TI’’transaction’{idx} A bundle of transaction hashes (exactly 100 tx in a bundle) (6.5 KB)
{lChainId}’CC’{contractAddress} Json of contract data (< 1 KB)
{lChainId}’AM’{Address} Json of account data (< 1 KB)
@ xxx’meta’ Sample
{
id: ${itemId}, => Id per usage
type: ${type}, => type per usage
currentBlock: 1234 => Last updated state of block number
currentIdx: 5, => Index of current bundle
countPerBundle: 100, => Max size of each bundle
totalCount: 543, => Total # items
currentBundleCount: 43, => Last updated size of bundle
}
DynamoDB table modeling: Secondary
PartitionKey SortKey Data Description
{lChainId}’AX’{Address} {12.blockNo}{6.txIdx} Json of summarized tx (< 1 KB) Tx list per address
{lChainId}’AF’{Address} {12.blockNo}{6.txIdx}{6.logIdx} Json of transfer event (< 1 KB) Transfer list per address
{lChainId}’TF’{TokenContractAddress} {12.blockNo}{6.txIdx}{6.logIdx} Json of transfer event (< 1 KB) Transfer list per token
{lChainId}’AT’{Address}{TokenContractAddress} {12.blockNo}{6.txIdx}{6.logIdx} Json of transfer event (< 1 KB)Transfer list per token &
account
{Address} {lChainId}’TK’{TokenContractAddress} Balance per address Balance per address
@ Tx (Event) Sample
{
txHash : 0x34868a1c9b2bbba79f6402,
timestamp : 0x5d3ac148,
from : 0x0137e70aff854ed4e832c9b84d,
to : 0xb19aefe904fffcad47224fab2c,
value : 1230000000,
fee : 14300000, => only for tx
status : 0x1, => only for tx (1 success, 0 fail)
tokenContractAddress, => only for event
}
@ Global Secondary Index (index name : token-holders)
1. PartitionKey = skey, SortKey = balance
=> Net holder balance list per token
To-be design rationale
● Raw/Old data stored in Amazon S3; implement data lake
● Real-time data with Amazon Kinesis
● Near real-time data with Amazon Elasticsearch Service
● Windowed statistics data with Amazon DynamoDB
To have variant database
Our to-be architecture
Blockchain
node node
node
node
node
User
API Call
Chain
crawler
Block, tx,
tx receipt
Luniverse platform
tx servertoken
server
nonce
manager
chain
manager
Blockchain
node node
node
node
node
Transactions
Luniverse scan server
User
Data Check
Inquiry & Query
Real-time data
(e.g., receipt, etc.)
Raw data Raw data
Raw data &
secondary dataAggregation
data
Block stream
Event
Subscription
Events &
txs
Amazon
DynamoDB
Amazon Kinesis Amazon S3
Amazon
Athena
Amazon
Elasticsearch
Service
Amazon
Kinesis
Ad hoc
query
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Wave of KYC/AML in blockchain
~2018, Indirect Regulatory for
Virtual Asset Service Providers (VASPs)(AML compliance obligations to
corresponding financial institutions)
2019~, Direct Regulatory for VASPs(AML compliance obligation to VASPs)
Relative regulations are being reviewed
FATF Guidance
Wave of KYC/AML in blockchain
New KYC/AML obligations to Virtual Asset Service Provider
Customer Due
Diligence
Suspicious
Transaction
Report
Travel Rule
Only customers in FATF
compliance…
will be able to make
only nonsuspicious transactions…
and same logic applies to
all external transactions
Luniverse VASP whitelist alliance on Amazon QLDB
Illustrative
Crypto exchanges/VASPs
Company 1
Company 2
… Immutable & highly scalable
KYC/AML data
KYC/AML data
KYC/AML data
{ user: abc, name: Blake, phone:
01012345678, address: Gangnam***,
birthday: 821231, duedate:
20191221 }
Exchanges can share their KYC data to be FATF-compliant regarding AML issue
Why did we choose QLDB?
Cost effective
ServerlessAuto scalable
Immutable ledger
Transactional logJournal cannot be modified
Easy to use
PartiQL, Similarusability as SQL
QLDB provides immutable and cost-efficient ledger
for the cases in which blockchain technology is required
Luniverse VASP alliance service feature
Notarization
Wallet KYC levelnotarization request
Auditing
Notarizationvalidation request
KYC database
VASP’s walletaddress + KYC
All data must be managed with transparency and immutable
AWS QLDB journal (immutable transaction log) supports all the history of modifications
Usage scenario
Digest inquiry
(QLDB query)
Address KYC
notarization request
QLDB append
(Digest creation)
Address KYC
result + digest
Value
Address KYC
validation request
(digest)
Address KYC
notarization
request
Audit (Validate that data from QLDB has not been forged)
Create KYC Level at the moment of request as
well as digest including timestamp
Data scheme: Wallet table
DOCUMENT ID EXCHANGE CRYPTO UID ADDRESS KYC LEVEL
3Qv67yjXEwB9SjmvkuG6Cp UPBIT BTC DhDh8dpZ 1BvBMSEYstWetqTFn... 3
LRqYYYQiRPaZVDqfDSRH1c UPBIT ETH CxpZObJ1 0x64771A1C9c7241Af... 2
bnExrgJ5OwajLSa2SFVlmV BINANCE ETH c5dd5Z2o0x4385dfBC18e0863D...
1
iQRi8SfSkpOZ9wE3nqsrJ3 BINANCE ETH N2ETJaQr 0xd6255fDB76FC0137... 1
Data scheme: Notarization digests
DOCUMENT ID DIGEST (INDEXED) DOCUMENT ID of WALLETS TIMESTAMP
0UXhXlw8UhtERsv8KdoI F8GU2SLSSiUNXPz··· LRqYYYQiRPaZVDqfDSRH1c 2019-11-25T19:51:46Z
pw1rlVYelsUwLzZutweZ 5ByxLAp7DMWIW20··· LRqYYYQiRPaZVDqfDSRH1c 2019-11-24T23:11:10Z
B4sJy4QGpXCllBjz3Aca sZGTD99eL13YsyO··· iQRi8SfSkpOZ9wE3nqsrJ3 2019-11-24T10:12:34Z
OLQ8iHxs36pLhE1VhCLc aIqXf8sxMecc2qf··· 3Qv67yjXEwB9SjmvkuG6Cp 2019-11-20T10:30:23Z
Our next plan
• KYC notarization open API launch
• KYC level data will be available using open API
• Enhance KYC architecture upon requirements per county based on FATF guidance
• VASP alliance expansion
• Develop alliance from regional representative VASP (exchanges, wallets, custodies, etc.)
• Official launch of KYC/AML API service in 2020 1Q
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
25+ free digital training courses cover topics and services related to databases, including:
Validate expertise with the new AWS Certified Database - Specialty beta exam
Learn databases with AWS Training and Certification
• Amazon Aurora
• Amazon Neptune
• Amazon DocumentDB
• Amazon DynamoDB
• Amazon ElastiCache
• Amazon Redshift
• Amazon RDS
Visit aws.training
Resources created by the experts at AWS to help you build and validate database skills
Thank you!
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.