How to Bet on the Presidential Election with Balancer / Uniswap
29 Sept 2020 · 8:03
A Bankless tutorial from DeFi Dad walks through using Augur Foundry to tokenize outcomes of the 2020 U.S. presidential election into ERC-20 tokens, then wrapping and providing liquidity for them on Uniswap and Balancer. The video demonstrates how Augur's prediction market framework combines with automated market makers to let anyone create and trade a liquid market around a real-world event.
Speakers
Topics
Transcript
[Music] hi everyone this is d5 dad and this is another bankless tutorial tonight is the first debate in the u.s presidential election so we thought it would be interesting to do a tutorial on how to take advantage of the auger foundry uh application this allows me to tokenize uh outcome shares in a prediction market and all that mumbo
jumbo just means that if i want to participate in an auger prediction market normally i have to go to the auger application but when we mint tokens which have a claim on whether uh you believe the outcome will be yes or no in terms of will donald trump win the 2020 u.s presidential election it should be easier to participate and gain exposure by simply buying a token so there is a balancer pool with die and what's referred to as the why trump as in yes trump and uh and trump as in no trump and then there's also a pool in uniswap
with the wide trump pairing so in balancer you can have up to three tokens which is awesome because it allows for i think in this case liquidity amidst die and then the two different outcomes in uniswap you would need two different pools here uh one is for uh the y trump token and then another liquidity pool for the n trump token so long story short if i want to participate in this market if others do the service of minting these tokens or minting these these these shares in the outcome of this prediction market
and if they provide that liquidity on uniswap or balancer i then can buy those tokens if i want to bet on the outcome of the market so this tutorial really could be over for anyone who simply wants exposure to the outcome of this market all you have to do is go to this balancer pool or this uniswap pool i'll link them both in the show notes you would just buy the token so if the market resolves you know after the election is decided uh and it resolves yes as in trump wins the election each y trump token settles for one die and each n trump as in no trump
pays out at zero so if it resolves no each of the n trump tokens will settle for one die and the y trump tokens lose and hence it pays out zero so let's go back to the auger foundry and i'm going to walk through how to mint these outcomes shares in the prediction market so right now there's only one prediction market available here in the auger foundry please be aware this is not audited according to the blog post by the augur team so don't put any money into this that you're not 100 percent willing to lose so i'll meet 10 shares so let's go to mint
that's going to be two metamask transactions per usual so let's check what the gas prices so according to the ether scan gas tracker a price of 88 way will get this through in nine minutes or less i'm going to go ahead and put this up to 90 just to be safe and then i'm going to put the permission here to just 10 die that way there's not unlimited permission to spend my die all right so it's about one minute later and this is the second transaction that's coming through uh bear in mind i'm doing this as an
experiment you can imagine if i were uh doing this with any sort of intent of like making a profit uh i would want to consider how much i'm actually minting here at 10 shares compared to what is my gas price at 10 of ether so gas prices are still around 88 way to get it through in less than 10 minutes so i'll put this through at 90 way just to be safe and let's go ahead and confirm all right looks like my shares were minted successfully according to the little pop-ups here let's check and see what this looks like when we refresh
so you can see here under holdings of erc 1155 which is a newer token standard i'm not going to really go into it much but just know that this is what enables us to take advantage of tokenizing the outcome of a prediction market and so i can see here that i'm holding uh 10 yes 10 no at this point so i'm going to go ahead and wrap my shares i'll use the same gas price or close to it as before and we'll hit confirm all right so that first transaction or the third one that i've done here uh the third one was to give approval to
wrap my shares it's that usual like give approval to spend something on ethereum so this should be the final transaction and let's see i'm going to put through a gas price of let's do a little bit less at 85 way all right so the wrapping's done so i now have uh converted these tokenized outcomes in the market for will donald trump win the 2020 u.s presidential election i've tokenized those into erc20 tokens which means that i could provide uh those tokens as liquidity on balancer
or uniswap and so the next step beyond having minted those tokenized outcomes for the prediction market is i can click add liquidity and then i've currently got 10 of these the y trump and n trump and i could i could add these then as liquidity so i could add the maximum let's say of this maximum of this oh and uh this will allow you then to do that as a single asset as well all right that's all i've got for you today i hope you find this helpful if you have any questions about uh how to participate or take advantage of this new auger foundry tool
please go to the bankless discord you can ask questions there you can also comment on the youtube video and we'll do our best to answer your questions there please check out the other tutorials in the bankless tutorials playlist and then please also subscribe to my own youtube channel at d5dad.com would love to have you come there and check out all the other tutorials that i've created [Music] you