What Can I Do With Useless Tokens? Cleanedapp — ETHParis Hackathon Winner

Sergio Pavlin
SmartDec Cybersecurity Blog
5 min readAug 22, 2019

--

Better late than never! In this paper, I describe our decentralized application called Cleanedapp. With this application, SmartDec team won ETHParis Hackaton by ETHGlobal on March 10, 2019. The video with the presentation is available here.

Cleanedapp is a decentralized application with a static frontend. It allows a user to burn useless tokens and leave postmortem messages. It’s something like decentralized Twitter when you pay any token you want to write down your message.

Use-cases

The ICO mania left us with a huge variety of useless tokens.

Many stakeholders in these failed projects would like to express themselves. For example, in our dapp people can post short exclamations, such as “this was a scam!”, or “it was fun while it lasted”, or “shut down, bc regulation”. However, they have to burn their tokens as proof that the project is dead.

Another, perhaps, more constructive example are postmortems. These are longer, more insightful texts that are probably posted by someone who was involved in the project. To post such a lengthy text a person is required to burn a significant amount of tokens (for example 51%). This serves as a proof that at some point they were “in charge”. They can attach a text to the act of burning, which explains what went wrong, why the proposed system did not work, why it was shut down, and why the tokens are deemed useless and are destroyed.

Finally, there are cases, when tokens are burned in healthy projects. In situations similar to what Numer.ai and Gnosis had when the dev team has an unnecessary large stake in total token supply, the team can choose to burn tokens to release control over the market. They can do this through our dapp, attaching an accompanying text to the act.

What it does

Cleanedapp allows a user to post a comment about a particular token but only after burning a certain amount of that token.

This gives credibility to the user’s claims. Random people can not post random information unless they are willing to burn tokens for it. In particular, the person making a claim attaches an opinion that a token is useless (or harmful). The higher the percentage of the total supply of the token the user burn, the longer is the text that the user can post and the higher this post appears on the page.

Whenever the full amount of tokens on a particular address is burned, there is memory freed on the blockchain, which is a useful “gardening” effect.

This system can also be used as an oracle. If a lot of a particular token was burned, chances are it is useless (although there are notable exceptions mentioned below).

How to use it

As simple as it can be for a decentralized application:

  • Load your MetaMask.
  • Follow this link.
  • Select a token that you want to burn or add a new one to Cleanedapp’s list.
  • Set the amount of tokens to be cleaned up.
  • Express yourself!

Now everyone sees what you think about this token!

How it works

Cleanedapp is a dApp which consists of the following parts:

  • The smart contract, which burns tokens and saves messages on Ethereum blockchain.
  • Frontend — the website, which shows burned tokens, left messages and allows to leave new messages and burn tokens making transactions via MetaMask. It consists of the static files: the developer can host these files in different ways like on AWS, SKALE, or Swarm. The user can also buy some useless token with 0x instant in the frontend.
    The user can also interact with the app simply by sending transactions to smart contracts, using a favorite frontend. In any case, the tokens are burnt forever and the claim is recorded forever.
  • Chainlink is used as an oracle to prevent the burning of self-made tokens (something like DDoS protection).

What the smart contract does

To burn tokens the user approves them to the smart contract followed by calling burn() function. The user’s message is an argument in the event.

Pipeline:

  • If the token was not burned before, it needs to call for a bury() function in the smart contract.
  • After the call the smart contract checks this token with Chainlink oracle — it checks that this token is presented on exchanges.
  • If this check returns true or this token was burned before, the user needs to approve some amount of these token to burn.
  • After that, the function burn() can be called, where the address of the token and the message are the arguments.
  • As a result — the tokens will be transferred to the smart contract address and emitted an event Burned(address(token), user, amount, message).
  • If this action transfers all user’s tokens, the smart contract increases the number of cleaned slots.

Main Contract: https://etherscan.io/address/0xd5d8b6a9f14a5437e1fc999a861d1a8878524968#code

List of tokens: https://etherscan.io/address/0xc7c06ac46f2b66e00960944882f9c35eec54bba0#readContract

Sponsors

  • Chainlink is used to create an oracle that tells that a token was once in active use by the community. This protects the system from getting flooded by empty tokens that were created with the only purpose to be burned.
  • 0x Instant is used for buying tokens.
  • ENS is used as a name service.
  • SKALE is used for hosting static frontend.

I thank all the sponsors’ teams for their support and the interest in our project! They were available always during the hackathon, answered our questions, and helped us to integrate the solutions. We learned a lot about all of these projects!

And of course, we thank ETHGlobal team for the wonderful experience! Everything was perfect: place, food, people around! We highly recommend taking part in such events!

This article was created by SmartDec, a security team specialized in static code analysis, decompilation and secure development.

Feel free to use SmartCheck, our smart contract security tool for Solidity and Vyper, and follow us on Medium, Telegram and Twitter. We are also available for smart contract development and auditing work.

--

--

COO at SmartDec, ITsec and blockchain researcher, co-host at Basic Block podcast, non-fiction fan.