# Candy Shop
> Make money buying candies
Candy shop creates a lottery mechanism on top of uniswap(or other DEX's) where for every trade you do you get candies. The more candies you have the more probability you have to win the "big bowl of sugar"
## How do you buy a candy
Whenever someone tries to swap an asset using uniswap/balancer/curve you pay a small fees(proportional to the size of swap) to buy a candy. Whenever you buy a candy you automatically enroll yourself into a lottery.
#### Can my daddy buy a candy for me
Oh yeah for sure! A liquidity provider or any individual can incentivise trading on a particular pool by offering to give candies(proportional to the swap size) to all the traders for free by donating the interest from lending protocols on a fixed sum to buy the candies for the traders. The increase in trading fees will profit the LP's and bring in more traders and liquidity which benefits everyone!
Liquidity providers put up free candies => brings in traders who want to grab the "big bowl of sugar" => creates more fees for LP's => brings in more traders and LP's => creates bigger "big bowl of sugar"
---
WIP below
## How to make sure that the "big bowl of sugar" is big enough
Due to the low cost of pariticipating in the lottery and the big prize a lot of orders will flow into the candy shop. Whenever there is a big swap we can self arbitrage the pool and reduce slippage for the big swapper and give more returns to the "big bowl of sugar".
Uniswap and other AMM based DEX's work on arbitrguers making sure that the price is the same as in the real world. Slippage makes the DEX's non ideal for swapping big amounts because of huge amount of money lost in slippage to arbitraguers. Here we can arb the big trade in a single transaction making sure the big swapper gets a better deal and the candy shop makes money to add to the "big bowl of sugar"
### Explanation of how this will work in boring words
1. Assuming pool size for DAI/USDT = 5 million USD
2. Someone wants to give 1 million worth of DAI and buy 1 million worth of DAI
3. This transaction if hits the uniswap pool directly will cause a slippage of lets say X%
4. The candy shop will have stable coin reserves which are being lent out on lending protocols. (USDC/USDT/DAI)
5. When this transaction hits "candy-shop" we do the original trade on uniswap, then we do a arb trade using the pools on uniswap. All the profits from arbing are split beween the originals swapper and the candy shop.
> Note: We create a synthetic token called `CS` when someone submits DAI/USDC/USDT to the candy shop pool. Later when they want to remove liquidity they can remove by burning CS and turning it into one of the tokens available, it may not be the original asset they deposited.
## Open issues
1. Free rider problem for LP's you profit off a particular LP becoming a sugar daddy.
## Implementation spec
This is the idea doc, more implementation details can be found [here](https://hackmd.io/pjOA1IPyS9WXYcE39d0RKw)