As part of a group academic project we are writing a DApp that will host reviews on the Ethereum blockchain. We have run into a problem regarding reviews that are slanderous or contain profanities. We were wondering how we could possibly still handle the moderation of such reviews while still maintaining the idea that the history of reviews cannot be changed/removed.

Has anyone had a similar problem to this, and did you manage to come up with a viable solution? Thanks.

1 Answer 1


I made a DApp that has an on-chain chatbox. I allowed myself to censor chat messages publicly by putting the chat message index into a mapping like this:

mapping(uint256 => bool) public chatMessageCensored;

function censorChatMessage(uint256 messageIndex)
    require(msg.sender == administrator);
    chatMessageCensored[messageIndex] = true;

Before the UI displays a chat message, it first checks the chatMessageCensored mapping. If the chat message has been censored, it replaces it with a special note which says:

Censored by administrator

This way you maintain the permanence of the message because you're not actually deleting it from the contract state, and you simultaneously allow the administrator to hide it from most users. Most users aren't going to go through the effort of manually checking the contract state.

I don't know how your contract is written exactly, but instead of the mapping(uint256 => bool) you could add a bool censored to your struct Review.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.