Cover photo

Week 2 of Ethindia Fellowship

Ahh,it’s already the week 2 of Ethindia ,i was just started with my fellowship yesterday, time sure flies for me.

So this week i have completed two challenges of Speed run Ethereum and completed the reading of safe documentation of gnosis chain.

Task 2-Token Vendor

  • In this task, i created a smart contract for my own token (Berries~for all the One Piece fans).

  • Users can buy these tokens with ethers.

  • You can buy 100 tokens per Eth and deposit the tokens and get your eth back, also if i set the price to $1,then did i just created a perfectly stable coin which will never loose it’s pegging(strange).

  • so this was the token vendor contract using which you can buy and sell tokens to the contract.

Task 3- Dice Game

  • 💬 Dice Game is a contract that allows users to roll the dice to try and win the prize. If players roll either a 0, 1, or 2 they will win the current prize amount. The initial prize is 10% of the contract's balance, which starts out at .05 Eth.

  • 🧤 Every time a player rolls the dice, they are required to send .002 Eth. 40 percent of this value is added to the current prize amount while the other 60 percent stays in the contract to fund future prizes. Once a prize is won, the new prize amount is set to 10% of the total balance of the DiceGame contract.

  • I have programmed the smart contract RiggedRoll in such a way that the contract will only roll the dice if the probability of winning is high, pre calculated risk.

  • Submission link for Task 2(Dice Game) :

    https://eif_tokenvendor.surge.sh/

  • Submission link for Task 3(TokenVendor):

https://badpleasure.surge.sh/

  • With this i also explored multisig wallet(it’s a wallet which requires multiple signatures before making a transaction for safety purposes) and how to create one using safe :p

    That’s all for this week, Sayonara, see you next week.