Thuta Learning
Blockchain
AdvancedSecurityအဆင့်မြင့်

DApps & Web3

Blockchainသင်ခန်းစာ 25

ဒီခန်းပြီးရင် ဘာတတ်သွားမလဲ

  • DApps & Web3 ရဲ့ protocol model, trust assumptions နဲ့failure modes ကိုရှင်းပြနိုင်ရန်
  • Local simulation/testnet တွင် normal, tampered နဲ့failure cases ကိုစမ်းနိုင်ရန်
  • Real keys/funds မသုံးဘဲ security limitations နဲ့safe practice ကိုအသုံးချနိုင်ရန်

DApp ဆိုတာ decentralized application ဖြစ်ပြီး frontend app, wallet, smart contract, blockchain network တို့ချိတ်ဆက်အလုပ်လုပ်ပါတယ်။ User က email/password အစား wallet နဲ့ login/sign လုပ်နိုင်တတ်ပါတယ်။

Visual Flow

Frontend UIConnect WalletUser SignsSmart ContractBlockchain StateUI Updates

On-chain data က blockchain ပေါ်မှာသိမ်းထားတဲ့ public record ဖြစ်ပြီး cost ရှိနိုင်ပါတယ်။ Off-chain data က server/database/IPFS ပေါ်မှာရှိနိုင်ပြီး speed, privacy, cost အတွက်သုံးတတ်ပါတယ်။ DApp က on-chain/off-chain balance ကိုသေချာဒီဇိုင်းလုပ်ရပါတယ်။

You should see
DApp က website တစ်ခုထက်ပိုပြီး wallet + smart contract + network state ကိုပေါင်းစပ်ထားတဲ့ app architecture ဖြစ်ပါတယ်။

ပိုပြီးနားလည်ထားရမယ့် အချက်

DApp က frontend, wallet/provider, RPC/indexer, smart contracts, off-chain services/storage နဲ့governance/operations တို့ပေါင်းထားသော distributed application ဖြစ်ပါတယ်။ Contract decentralized ဖြစ်သော်လည်း frontend domain, RPC, admin key, oracle နဲ့storage gateway တို့ကcentralized failure points ဖြစ်နိုင်ပါတယ်။ Read/write flow, chain switching, signature intent, pending/reorg/error states နဲ့fallback endpoints ကိုuser experience ထဲရှင်းပြပါ။

လက်တွေ့မှာ ဘယ်လိုအသုံးချမလဲ

DApp architecture diagram မှာ trust boundary တစ်ခုစီ၊ data source, write authority နဲ့fallback ကိုmark လုပ်ပြီး RPC/domain failure simulation စမ်းပါ။

ကိုယ်တိုင်စမ်းကြည့်ရန်

DApps & Web3 နမူနာကို real funds သို့real seed/private key မသုံးဘဲ local simulation သို့testnet မှာပြန်တည်ဆောက်ပါ။ Normal case နှစ်ခု၊ tampered/adversarial case တစ်ခုနှင့် failure case တစ်ခုအတွက် expected state နဲ့verification evidence ကိုမ run မီရေးထားပါ။

Security သတိပေးချက်

Wallet connect အောင်တာကို authentication/authorization အပြီးသတ်ဖြစ်ပြီဟုယူဆခြင်းက replay နဲ့session binding bugs ဖြစ်စေနိုင်ပါတယ်။

Ethereum Developer Documentation — Smart Contracts — ethereum.org

ဒီနေရာမှာ လူအများမှားတတ်တယ်

  • Wallet connect အောင်တာကို authentication/authorization အပြီးသတ်ဖြစ်ပြီဟုယူဆခြင်းက replay နဲ့session binding bugs ဖြစ်စေနိုင်ပါတယ်။
  • Happy path တစ်ခုအောင်တာနဲ့ system secure သို့production-ready ဖြစ်ပြီဟုယူဆခြင်းက adversarial, key-management နဲ့economic risks များကိုလွတ်စေနိုင်ပါတယ်။

လက်တွေ့လေ့ကျင့်ခန်း

DApps & Web3 နမူနာကို real funds သို့real seed/private key မသုံးဘဲ local simulation သို့testnet မှာပြန်တည်ဆောက်ပါ။ Normal case နှစ်ခု၊ tampered/adversarial case တစ်ခုနှင့် failure case တစ်ခုအတွက် expected state နဲ့verification evidence ကိုမ run မီရေးထားပါ။

အလုပ်ဖြစ်ကြောင်း ဒီလိုသိမယ်: DApp က website တစ်ခုထက်ပိုပြီး wallet + smart contract + network state ကိုပေါင်းစပ်ထားတဲ့ app architecture ဖြစ်ပါတယ်။

နောက်ဆုံးပြင်ဆင်ရက်

Progress ကို ဤ browser (ဤစက်) တွင်သာ သိမ်းထားပါသည်။ အခြားစက်များနှင့် sync မလုပ်ပါ။

ဤသင်ခန်းစာတွင် အမှားတွေ့ပါက အကြောင်းကြားရန်သင့် email app ကို ဤသင်ခန်းစာလိပ်စာ ဖြည့်ပြီးသားဖြင့် ဖွင့်ပေးပါမည် — သင်ကိုယ်တိုင် ပို့မှသာ ပို့မည်ဖြစ်သည်။