###### Abstract  
Smart contracts and cryptocurrency wallets are foundational components of decentralized applications (dApps) on blockchain platforms such as Ethereum. While these technologies enable secure, transparent, and automated transactions, their integration also introduces complex security challenges. This study presents a security-oriented analysis of smart contract and wallet integration, focusing on BlockScribe--a decentralized Ethereum-based application for digital record certification. We systematically identify and categorize security risks arising from the interaction between wallet interfaces and smart contract logic. In particular, we analyze how user authorization flows, transaction design, and contract modularity affect the security posture of the entire dApp. To support our findings, we conduct an empirical evaluation using static analysis tools and formal verification methods, examining both contract-level vulnerabilities and integration-level flaws. Our results highlight several overlooked attack surfaces in wallet-contract communication patterns, including reentrancy amplification, permission mismanagement, and transaction ordering issues. We further discuss implications for secure dApp development and propose mitigation strategies that improve the robustness of wallet-contract ecosystems. This case study contributes to a deeper understanding of integration-layer vulnerabilities in blockchain-based systems and offers practical guidance for developers and auditors aiming to strengthen smart contract security. s 26 July 2  
this ecosystem is the integration of cryptocurrency wallets [4], such as MetaMask [5] and Trust Wallet [6]. These wallets allow users to authorize transactions, manage cryptographic keys, and interact directly with on-chain contracts. These wallets have become essential tools for end users and serve as the primary bridge between client-side applications and decentralized infrastructure. In 2022, the number of users of cryptocurrency wallets surpassed 80 million worldwide, underlining their central role in the experience of blockchain users [7]. Smart contracts and decentralized applications (dApps) on Ethereum have introduced innovative ways to execute secure automated transactions. However, integrating smart contracts with browser-based wallets such as MetaMask introduces new attack vectors, including user interaction flaws, key management risks, and front-end logic vulnerabilities. This paper presents a security-oriented case study of BlockScribe, a decentralized Ethereum application (dApp) that combines Solidity-based smart contracts with MetaMask wallet interactions. We analyze practical risks that arise from this integration and identify security flaws related to access control, gas usage, user input, and cryptographic assumptions. Building on this, we propose practical design guidelines for developers building Ethereum-based dApps, particularly those involving wallet-based user authorization workflows. However, despite the maturity of the Ethereum protocol, the integration of smart contracts with user-facing wallet interfaces continues to expose applications to significant security and usability challenges. These include phishing attacks, inadequate input validation, transaction replay issues, improper access control, and user error in private key management. Many of these vulnerabilities are not caused by flaws in the underlying blockchain itself but by misconfiguration or an oversimplified design of the application layer. The motivation for this study is the recognition that secure design practices for Ethereum-based applications remain underdocumented and inconsistently applied. In particular, developers often lack concrete guidance on how to assess and mitigate risks introduced by wallet integration, especially in browser-based web interfaces. Although many tools detect individual vulnerabilities in smart contracts, few studies holistically evaluate contract-wallet interactions in a realistic application context.