Disclaimer: This is a summary of patterns we have observed during our research and should not be considered any form of technical or investment advice. Also, the given “known examples” do not imply they are the best implementations of the said pattern or any superior to any other implementation of the pattern not listed.
Security aspects like authentication based on digital signatures are core components of blockchain design. Also, blockchain provides high integrity and availability. However, we still need to make sure smart contracts and their interaction follow certain best practices to ensure the overall security of a blockchain-based application. Therefore, this section discusses patterns that mainly concern the security aspect of blockchain-based applications.
- Multiple Authorisation – Given a pool of n addresses that could authorise a transaction, get a subset m of them to authorise a transaction by signing the respective transaction (m ≤ n).
- Off-Chain Secret Enabled Dynamic Authorisation – Use a secret created off-chain to bind the authority for a transaction dynamically
- Embedded Permission – Restrict invocation of individual functions in the smart contract to a permissioned set of accounts by embedding permission controls into the contract
- Hot and Cold Wallet Storage – A party maintains keys in 2 wallets, one to store frequently used keys and another to store infrequently used keys.
- Key Shards – Split a key into several different pieces and restored using enough pieces
- Time-Constrained Access – A content holder can share a link to the content user that is used to access the content only within the specified time window
- One-Off Access – A content holder can share a link to the verifier that is used to access the content only once
- X-Confirmation – Wait for a sufficient number of blocks as confirmations to ensure that a transaction added into blockchain is immutable with high probability
- Security Deposit – A user sets aside a certain amount of money as a security deposit