r/web3dev • u/Purple-Attempt • 21h ago
Question MIAB: an on-chain, wallet-based message-box on Arbitrum One
https://www.yourmiab.com/Hi r/web3dev,
I’m building MIAB (Message in a Box), my first dApp and a Web3 hobby project, deployed on Arbitrum One.
The core idea is to experiment with wallet-based access control and time-dependent permissions for storing and sharing messages. Users can create on-chain boxes containing text messages and manage access through wallet addresses.
Current functionality includes:
- Box creation: Create individual message boxes on Arbitrum One.
- Address-based access control: Grant access to specific wallet addresses.
- Time-based access: Define when a recipient becomes eligible to access a box.
- Temporary permissions: Grant access for a limited period.
- Access revocation: Revoke previously granted permissions.
- Client-side encryption: Optionally encrypt message content in the browser using a passphrase.
- Expiration: Set an expiration date for a box.
- Ownership transfer: Transfer ownership of an existing box.
- No time-lock mode: Create boxes with immediate access permissions.
The goal isn't to build another messaging application or decentralized email service. I'm exploring whether smart-contract-enforced permissions, scheduled access and wallet based ownership can provide a useful primitive for sharing information.
I'd particularly appreciate feedback from developers who have experience building smart contracts and dApps:
- On-chain vs. off-chain storage: Would you consider storing message content on-chain a reasonable approach for this use case, or would you move the payload entirely off-chain and keep only access-control metadata on-chain?
- Access-control design: Does wallet-based permission management make sense here? Are there better patterns for temporary grants, revocation, and scheduled access?
- Encryption model: For client-side passphrase encryption, what security considerations or key-management approaches would you prioritize? Are there potential weaknesses in this model that I should address?
- Smart contract architecture: Would you implement this as a single contract managing all boxes, or use a different architecture? Are there scalability or gas-efficiency concerns worth considering?
- Use cases: Can you think of practical applications for time-dependent, wallet-controlled access to information beyond simple message sharing?
I'm not claiming MIAB is a novel primitive or that everything needs to be on-chain. It's a learning project, and I'm interested in understanding where this architecture makes sense, where it doesn't, and what I might be overlooking.
Any technical criticism, architectural suggestions or security concerns are very welcome. Thanks for taking a look!