project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5

Read My Diary

READ MY DIARY is a platform where the more you read, the more you earn and also receive exclusive NFTS on being the First selective readers of particular diary. Publish, read diaries of strangers through READ MY DIARY and receive NFTS.

Read My Diary

Created At

ETHOnline 2022

Winner of

trophy

🏊‍♂️ IPFS & Filecoin — Pool Prize

Project Description

In today's world, many people still write diaries and are active diary keepers. A lot of natural resource is used in making these diaries. Why shouldn't we make a platform for these people, so that their daily little effort could bring a funds into their pockets and also save trees.

READ MY DIARY is the exact platform that I've built for these people to publish and read strangers diaries and receive funds and NFTS for being a consistent reader.

READ MY DIARY works as follows :-

  1. PUBLISH A user enters the platform, and decides to rather publish his own or read someone's diary. For Publishing he/she has to enter details like Diary Name, Diary Description, Page Fee (fee every reader has to pay per page), Total NFTs (No. of NFTs to be distributed to the first come readers).

  2. WRITE To write pages for your diary, you have to pay a pre defined fee which is defined in the smart contract, which is equal for every author. Note you can only write a page once in a day, this is to prevent unwanted writing and also maintain the purpose of writing diary.

  3. READ For reading someone else's diary you again have to pay page fees defined by the author of that diary and the more pages you read the more you will earn the profit.

  4. NFTs You can also receive NFT of a diary for becoming part of its first determined group of readers.

  5. DISTRIBUTION OF FUNDS No here comes the most complicated but interesting part. Every diary has its funds which are the writing fees in total that the author paid and the reading fees paid by all the readers of the diary. The Author has the authority to distribute funds whenever he wants, it also has a deadline where if Author fails to distribute funds, the distribution takes place automatically. Distribution is done in a very Mathematical way, Suppose Writing Fee = $5 Reading Fee = $1 The diary has 6 pages in total The diary has 40 readers in total where, 15 readers read only 1 page 10 readers read only 2 pages 5 readers read 3 pages 5 readers read 4 pages 4 readers read 5 pages 1 reader read all the 6 pages Total Funds = $5 * 6 + $(151 + 102 + 53 + 54 + 45 + 16) = $30 + $96 = $126 50% of Total Funds will be given to author while the other 50% will be distributed amongst all readers. But not equally because I want to distribute the funds in such a way that the readers who read the most pages should receive more as comparable to readers who only read one page. So for that we need a BOOSTING FACTOR, Let's calculate BOOSTING FACTOR Total Readers Funds = 50% of Total Funds = $126/2 = $63

15 readers of 1 page => { (Fee spent by each reader of n page)/(Total Funds) * 100% = $1/$126 * 100% = 0.79% 0.79% * (Total Readers Funds)/100% = 0.79% * $63/100% = $0.5 0.5 * (Total no. n Page Readers) = $0.5 * 15 = $7.5 of 15 readers

Ratio Coefficient for 1 page = 1/6 , for 2 pages = 2/6 ....and for 6 pages = 6/6

$7.5 * (Ratio Coefficient of n page) = $1.25 of 15 Readers } Similarily we find this value for every page reader and we sum it. $1.25 + $1.72 + $1.93 + $3.44 + $4.30 + $1.55 = $14.19 = BOOSTERS SUM

BOOSTING FACTOR => Total Readers Funds / Boosters Sum = $63 / $14.19 = 4.43

Now that we've got BOOSTING FACTOR we will multiply the value with BOOSTING FACTOR So for 15 readers of 1 page => $1.25 * BOOSTING FACTOR = $1.25 * 4.43 = $5.53 of 15 readers so for each reader, $5.53 / 15 = $0.36 $0.36 is the funds returned to each reader of only 1 page which means each reader paid $1 but received $0.36 on distribution of funds

Lets calculate loss or profit of all readers => 15 readers of 1 page = $1.25 * 4.43 = $5.53/15 = $0.36 = -64% 10 readers of 2 page = $1.72 * 4.43 = $7.61/10 = $0.76 = -61% 5 reader of 3 page = $1.93 * 4.43 = $8.55/5 = $1.70 = -43% 5 reader of 4 page = $3.44 * 4.43 = $15.23/5 = $3.04 = -23% 4 reader of 5 page = $4.30 * 4.43 = $19.05/4 = $4.76 = -4% 1 reader of 6 page = $1.55 * 4.43 = $6.86/1 = $6.86 = +14%

So as you can see through this data, if you read more pages then you can earn profit through distribution funds. I've checked it by entering multiple data values and observed that there can be a scenario where no reader earns profit but they are segregated in such a way that they receive funds according to the pages they've read.

Tired uffff... Thank You

How it's Made

I made this project as a solo developer using multiple technologies. For deploying and testing of smart contract I used REMIX IDE, Reactjs and Tailwind css for building the frontend, Rainbow Kit and Wagmi Ethers for connection of wallet and smart contract, Figma for UI/UX designing of the dapp.

Sponsor Technologies

  1. Polygon => I used Polygon for deploying smart contract and using its native token for reading, writing and distributing funds.
  2. IPFS/FILECOIN => A selected number of first readers of a particular diary can receive NFT in their wallet using IPFS/Filecoin.

The thing that I've done worth mentioning is finding the perfect formula for the distribution of funds to the readers and authors. It is formulated in such a way that no matter what's the no. of readers or pages the reader who read only 1 page receives funds which is always less than the funds received by the reader who read all pages. Which means the trend of funds always increases as we go higher in terms of readers of page. To get more Idea, visit to the below link https://www.notion.so/READ-MY-DIARY-5d246a64a1af4109878080fd3d5b7110

background image mobile

Join the mailing list

Get the latest news and updates