Questions tagged [dapp-design]
The dapp-design tag has no usage guidance.
89
questions
1
vote
2
answers
1k
views
Why no dapps in the Google Play Store? Why Ethereum not accessible by default in smartphone?
Before I create a decentralized application, I want to know whether it already exists. I thought the first step would be to search the Google Play Store, but it appears dapps are not available on the ...
0
votes
0
answers
7
views
How to record proof of contract exploit on-chain?
Suppose one want to insure from certain contract hacks. Do do that in non custodial manner, we need some way to detect hack on-chain.
I see some obvious ideas, like "if one wallet stores more ...
3
votes
1
answer
5k
views
What is best approach for generating random NFTs?
I am thinking of developing small DApp where user would collect cards (NFT). Each card would have some image and value associated with it. User collects cards by purchasing Pack of Five Cards which ...
7
votes
2
answers
626
views
Native mobile Dapp - Sign transactions with user wallet
I'm starting a new project that involves a mobile Dapp and I have a question regarding signing transactions.
Every mobile Dapp post that I read about offered two solutions:
Use a Dapp browser, such ...
1
vote
2
answers
2k
views
How to display blockchain transaction receipt details in an Ethereum Dapp
In my dapp design, I wish to provide the user with an option to view Blockchain Transaction Receipt Details either by a link to sites like Etherscan or by providing full details on a separate page in ...
0
votes
0
answers
9
views
How is dydx v3's close price formula derived?
https://dydxprotocol.github.io/v3-teacher/#liquidations This formula looks a bit indirect and dydx didn't provide an example
10
votes
2
answers
5k
views
Storing private data on the ethereum blockchain
I plan to make an app utilising Ethereum that will store private data about a user. Eventually, I want this data to be accessible by selected users.
I have seen conflicting answers & discussions ...
0
votes
1
answer
62
views
What is the Web3 approach to storing secret tokens (for example, when need to store the local salt for commit/reveal pattern)?
What is the Web3 approach to storing secret tokens (for example, when need to store the local salt for commit/reveal pattern)?
I'm currently using local storage.
For example in Web2 a back-end layer ...
0
votes
3
answers
1k
views
Best options to host an ethereum react dapp to a custom domain
I'm looking for best options to host an ethereum dapp created using react and drizzle, with the following requirements:
It needs to be hosted in a custom domain (.com / .net / OR .io ) that I have ...
1
vote
2
answers
264
views
How to identify submitted transaction to network?
I am developing an eCommerce application that has on-chain and off-chain components. The off-chain components focus on the compute and storage intensive operation while on-chain smartcontract ensure ...
0
votes
2
answers
18
views
We are developing a todo dApp and when we deploy it to a JavaScriptEVM both in Remix and Hardhat it costs 1.5m gas... Is it ok? Or is it enormous?
This is the contract we are deploying:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.8;
contract ToDoStorage {
struct ToDoList {
uint256 id;
string name;
string[2][]...
0
votes
2
answers
83
views
Why Should I use Ethereum in an Online-Election(Vote) System based on ZKP(Zero-Knowledge Proof)?
I am an undergraduate student studying Ethereum in South Korea.
Currently, I am developing an online election system that can be applied.
At first, I came up with this idea:
The system has an ETC ...
0
votes
2
answers
72
views
TypeError: "send" and "transfer" are only available for objects of type "address payable", not "address" [duplicate]
I have the following code:
pragma solidity ^0.8.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/SafeMath.sol";
contract CoinFlip {
...
6
votes
2
answers
1k
views
Use uint40 for time in Solidity?
My question is: Should I use uint40 for time in Solidity?
All the examples I've seen use uint256 for time, however, I think it's too wasteful -- while using uint32 is maybe a little aggressive due to ...
1
vote
0
answers
45
views
Storage design for a social network
I want to create a social network app using Solidity, but I am having a hard time thinking of the storage design. Using this link:
Are there well-solved and simple storage patterns for Solidity? as a ...
4
votes
3
answers
2k
views
DApps with fiat currency?
Is it possible to build DApp which can accept Fiat currency? Because for an existing business to move to blockchain, the existing users should be able to transition to DApp seamlessly. I would like to ...
2
votes
1
answer
592
views
Next JS versus React. Which to use when for your Dapp? [closed]
This is a broader theoretical question. What advantages does a Next JS Dapp give over a React Dapp? Apart from file-based routing and an option to protect some code on the server side?
In case I am ...
1
vote
1
answer
22
views
How do dapp devs avoid a 'race to the bottom'?
Imagine Alice makes dapp-A, which has a .01% transaction fee. Now imagine the next day Bob forks dapp-A to create dapp-B and changes the transaction fee parameter to .005%. People will use dapp-B over ...
1
vote
2
answers
3k
views
Find word in string solidity
How is it possible to look for if a certain word is part of a string in solidity? let's say someone upload a string to a smart contract, this string must contain the word "solidity" to be accepted by ...
0
votes
1
answer
167
views
How can a smart contract be triggered from an API get request?
I am working on a basic dApp architecture and I need one of the smart contracts to be triggered by the user which will pass a consumer API key (private and needs to stay private) to an Oracle that ...
1
vote
1
answer
661
views
Both web3.eth.accounts.create() and web3.eth.personal.newAccount() not working
I'm making a dApp on reactjs. I wanted to create a new account and have done it trying 2 methods
this.web3.eth.personal.newAccount()
this.web3.eth.accounts.create()
I have attached the code below(...
1
vote
0
answers
201
views
How does Sushi deal with limit orders? (Conceptually)
On Sushi.com it is possible to set limit orders.
From their documentation:
When the user creates a limit order for a purchase or a sale on SushiSwap, the order is sent to an AWS server[...]
And in ...
0
votes
1
answer
19
views
How to prove execution of contract method to a third party?
Let us consider the following setup. Alice executes a method doStuff(...) of a particular smart contract deployed to an EVM blockchain under address 0x0123456789. Execution of that method resulted ...
11
votes
3
answers
8k
views
What is the best practice to store and retreive large data in solidity smart contracts?
Assume, I have an event creation page with some form fields in UI. And I have a smart contract to store the event in events mapping or the public array in some struct format.
struct event{
...
0
votes
1
answer
764
views
Does the etherscan api work with bsc chain?
Does the etherscan api work with bsc chain?
I am trying the code below but it does not work. Yet it works on rinkeby network.
const etherscanProvider = new providers.EtherscanProvider(
56,
...
0
votes
0
answers
334
views
Can you sign a transaction in the front end but process it in a server backend?
Can you sign a transaction in the front end using metamask but send the transaction to the blockchain in the backend like nodejs?
2
votes
1
answer
3k
views
How to verify a signed message and that it hasn't been reused/tampered with?
I have seen this question and others but none answers my qustion.
How can I sign a message and make sure that the public key I recover is actually belongs to the private key that signed the message?
...
0
votes
2
answers
773
views
Split State Storage Contract
This is a follow-up question of Split Contract Design Pitfall
Background: I have split my logic into two contracts A and B. A keeps the state and not ETH. All state change functions are only allowed ...
0
votes
3
answers
35
views
Is there a must use framework to design dapps that works well with Truffle?
I am trying to develop a dapp that works on a web browser that will also contain a website made in a popular UI framework (let's say angular) rather than building a html/css manually.
Right now I'm ...
1
vote
1
answer
115
views
Would this make sense as a smart contract application? Trying to understand features and limitations
I'm starting to read up on Ethereum and smart contracts and some questions are popping up in my mind.
I can understand that smart contracts can be used, for example, to make a bet for/against the ...
1
vote
0
answers
40
views
Where to outsource smart contract developers, and how to manage them as start-up's CEO? [closed]
If someone has an idea for a DApp, but needs to hire programming muscle, where online can reliable and innovative smart contract developers be found for hire and outsourcing? and what etiquette and ...
2
votes
0
answers
192
views
Is it conventional to host your dapp on a subdomain (e.g. app.uniswap.org), and why?
I've noticed the design pattern of having an enter app button from the home/landing page which opens the dapp in a new tab is quite common. This is something that I don't see in Web2 design. Is there ...
0
votes
1
answer
83
views
dApps being required to explicitly ask for access to web3(when using MetaMask)
Injecting web3 into the dapp is done automatically,when using MetaMask. Web pages get access to the Blockchain when using metamask in their browser, to read addresses for tranactions, and other ...
2
votes
1
answer
36
views
How do large Ethereum dapps get iteratively developed?
There are some extremely large projects on the Ethereum blockchain, like Augur. These dapps aren't short 100-line smart contracts, and are not uploaded once to the blockchain and done.
Question: how ...
0
votes
1
answer
113
views
Resubmitting the same transaction
A common concern for dapps using public blockchains is to check that a submitted transaction was included in a block after some time. And, if not, try to resubmit the same transaction (I mean, using ...
0
votes
1
answer
177
views
Dapp Complexity via Multiple Contracts
When I look at some Dapps on github there are many separate contracts that interact with each other (eg, Augur). Thus, though each contract is simple, they refer to so many others that it is quite ...
1
vote
1
answer
56
views
Can Dapp respond to an API evocation which in turn calls an EOA and then evoke a contract?
Can a Dapp (leveraging web3.js) respond to an API evocation from an external system which in turn calls an EOA and then evoke a contract on the blockchain?
External system calls a Dapp
Dapp calls a ...
1
vote
1
answer
129
views
How to get active users of Dapp [closed]
Is it possible to have unique constraint on parameters of an event? I will have a number of users using my Dapp, and I have provided functionality to delete the users. So while reading from the ...
1
vote
3
answers
128
views
Can Ethereum be used as part of a decentralised forum like StackExchange?
Can Ethereum be used as part of a decentralised forum?
0
votes
1
answer
40
views
dApp storage (growth) concern
My dApp allows user to save their URL when purchasing each NFT token. The obvious design would define --
struct NFT {
...
string url;
}
However, URLs can be long. To save gas for users, I ...
1
vote
0
answers
20
views
Is there a standard for modelling smart contracts such as ERM for databases?
I want to document my Dapp including the "data structure" (i.e. the relationship between different contracts). Is there a good way of modelling smart contracts that anyone has used successfully?
0
votes
1
answer
158
views
Ethereum Petabyte Storage Problem
As the need of blockchain systems grows so will be the storage issues and the cost of handling such large amounts of data.
Is ethereum capable of handling petabyte storage or is it upto an
...
1
vote
1
answer
40
views
Scope Issue: Not successfully storing accounts after using web3.eth.getAccounts()
I am having trouble with the following code:
var accounts = []
let accounts = await web3.eth.getAccounts((error, result) => {
accounts = result;
console.log(accounts);
});
console.log(...
1
vote
1
answer
84
views
Ethereum Game design idea
Is it possible to write emacs dunnet game in solidity? Not that there is any reason for the game to be on a blockchain, it is for a class assignment. I tried 2048 game. But it seems to have some ...
2
votes
1
answer
141
views
ERC 20 or ERC 721 for my dapp?
I am currently making a game where you collect gear pieces and upgrade them. There will not be a 1-1 upgrade, but rather 3-1, meaning 3 items may or may not upgrade to 1.
I am aware of the difference ...
3
votes
1
answer
2k
views
Smart contracts for bidding
In a scenario where a contract represents a buyer-seller agreement, sellers need to publish for each new bid a new contract/ or new entry in an array within a single same contract, and then a buyer ...
0
votes
1
answer
623
views
How to deploy a dapp which uses multiple blockchain
I am a newbie and started learning dapp on ethereum.
Up till now, I
wrote smart contracts;
created frontend with html, css and js;
deployed smart dapp on either private network(geth, ganache) or ...
11
votes
2
answers
4k
views
Collecting ERC20 balances from multiple addresses?
I'm building a dApp that involves creating unique accounts for individual users for ERC20 deposits [I keep the addresses and private keys in a centralized database], for popular ERC20 tokens like BNB, ...
2
votes
1
answer
468
views
Masking Ethereum Address in a transaction [duplicate]
I want to hide the ethereum addresses of dApp users so that your transactions will not be traced by one who you have interaction earlier. The use case is actually similar to the application:
Alice ...
0
votes
2
answers
1k
views
Deploy multiple instances of same contract
I am developing a decentralised notary app, using truffle/web3/react. It need to deploy multiple instances of a same contract.
I managed to deploy multiple instances of a contract, MyContract via a ...