Subscribe to lizgeorge
Share Dialog
<100 subscribers

EIF Fellowship challenges for the week :
Challenge : Build a Dex
The challenge was to build a simple decentralized exchange with one token pair (ERC20 and ETH). It helped to understand the concept of Reserves , Automated Market Makers (AMM) where reserves will provide liquidity to swap between the tokens. Tutorial also helped to explore into the Constant formulae (x * y = K) used in Uniswap v2.
x * y = k, Where x and y are the balance of the assets in the pool.
Given Δx (Input value), to swap Δx for Δy, Uniswap V2 will perform the following calculation:
** (x + Δx ) * (y + Δy) = k**
** Δy = y - k/(x + Δx )**
We wrote two functions for swapping from each asset to other, ethToToken() and tokenToEth().
Deployed App : DEX Contract
Verified contract address : Contract
Challenge : State Channel Application
State channels is a scaling solution in cases where a fixed set of participants want to exchange value-for-service at high frequency.
For the challenge, the service provider is a Guru who provides wisdom to each client Rube through a one-way chat box. Each character of text that is delivered is expected to be compensated with a payment in ETH. The Guru provides the service in exchange for signed vouchers which can later be redeemed on-chain.
The challenge helped in understanding the signature and its onchain verification using ecrecover function.
Deployed App : State Channel Application
Verified contract address : Contract