Back to All Episodes
Season 2Episode 87

Algo AMM

October 14, 2023
29m
1 Guest

Listen Now

About This Episode

In this episode of DevNTell, Narb interviews Pavel Fedotov, a full-stack blockchain engineer, about his project Algo AMM. Pavel shares his background in data science and his journey into the Web3 space. He explains the concept of prediction markets and the advantages of using Automated Market Makers (AMMs) over traditional order books. Pavel highlights the challenges of market fragmentation and the lack of centralized hubs in prediction markets, and how Algo AMM aims to bridge this gap. He also discusses the role of optimistic oracles, like UMA, and zero-knowledge proofs in enhancing the security and efficiency of prediction markets. The conversation concludes with Pavel's roadmap for Algo AMM, focusing on improving the user experience and expanding into more traditional markets.

Key Takeaways

1

Prediction markets, also known as information markets or idea futures, allow individuals to trade on future outcomes, aggregating collective knowledge for more accurate forecasts.

2

AMMs offer benefits like market depth, reduced slippage, and continuous liquidity provision compared to traditional order books, making them highly suitable for prediction markets.

3

The lack of a centralized hub and market fragmentation are significant hurdles in the current prediction market landscape, which Algo AMM aims to address through its aggregation and bridging features.

4

Optimistic oracles, such as UMA, and zero-knowledge proofs play a crucial role in ensuring the security, transparency, and efficiency of decentralized prediction markets.

5

Improving the user experience by simplifying interactions, such as voting and claiming rewards, is a key focus for Pavel in the future development of Algo AMM.

Featured Guest

PF

Pavel Fedotov

Founder @ Algo AMM

Algo AMM

Episode Transcript

Narb

All right. We're live. GM GM, everyone. Welcome to another great DevNTell. For those who don't know, DevNTell is a 30-minute window for builders to showcase something they're passionate about or have been working on in Web3. It could be an awesome project, a demonstration of testing best practices, automation goodies, smart contracts, project structure, etc. Basically, if you have a passion for something, this is your opportunity to share it with the community. Today, I'm ecstatic to have Pavel. Welcome, Pavel. Thank you so much for taking the time to come on and share Algo AMM with the folks here.

Pavel Fedotov

Absolutely. I'm really, really happy to finally get on the show, guys. I think I've already watched more than two or three episodes, and yeah, I'm really excited to be here.

Narb

Awesome. For folks who aren't familiar with you, would you like to give a brief introduction of who you are, how you got into Web3, and how you found Developer DAO?

Pavel Fedotov

Yeah, absolutely. Before joining Web3 full-time, I worked as a data scientist in a Fortune 500 company. Later, I joined Gitcoin DAO as a data scientist once again. They used to have a whole bounty section for builders like me to essentially get prizes for completing really, really short-term projects. I've got a couple of bounties from Ceramic, from Badger DAO, and yeah, that effectively pushed me to learn more skills other than just Python. From effectively learning skills like JavaScript and Solidity, I completed the Filecoin grant and I've been accepted into the Developer DAO and Pre-Star Capital fellowship. I'm not really sure if I completed it, but I've definitely made the final presentation, and I'm presenting this project today, I think.

Narb

That's awesome. And how was that transition from becoming a data scientist, mostly working on ML models and what not, to actually developing full-stack applications?

Pavel Fedotov

Oh, to be honest, it's a lot more difficult. I think in developing ML, you're restricted to just your local instance, and you don't have to communicate with other nodes, or other people through the web. And this whole communication through web instances creates a whole new level of complexity because, in some cases, people are not able to use your application simply because they only have mobile. In ML, if it works on your computer, it will most likely or probably like 100% work on other applications. It's a very, very simple format that you kind of just explore the model into and then you like import it in anything really, and it will work. In building a full-stack application, for example, Solidity, you're building the Solidity contract for something like Ethereum or Polygon, and they would definitely work very, very similarly. But if you explore it to something like TRON, in TRON they have this whole another added level of complexity, like energy or bandwidth. And this is like, oh my god, this is not the same as just building an ML model or parsing the data. It's a lot more complicated. And there are not a lot of people that kind of have this domain knowledge on each blockchain or each programming language. So yeah, and it's really, really difficult when the community is like, 'We're not welcoming other people. We're just here to kind of stifle everybody,' I guess.

Narb

Yeah, you want to stay away from those kinds of communities. But that's amazing to see your kind of evolution from a data scientist to a data scientist plus full-stack developer now. Really excited to see what you have in store for us with Algo AMM. So let's get right into it, if you don't mind.

Pavel Fedotov

Yeah, definitely. I'll try to present, but I'm not sure if it will work because usually, I have some bugs for no reason. Not today, not today, my friend.

Pavel Fedotov

Great. So I'll probably skip this, but I really enjoyed the Pre-Star Capital and Developer DAO cap, I guess. I've actually got three of them for my family as well.

Pavel Fedotov

So what are prediction markets? And this is probably the topic that I'm going to focus on today with this presentation. Prediction markets are known as information markets or idea futures. These are mechanisms that allow individuals to trade in predictions or judgments on the future outcomes of events. These markets often involve the exchange of cryptocurrencies or other assets based on the likelihood of a particular event occurring. Prediction markets can be used for a variety of purposes including forecasting election outcomes, predicting stock prices, and even driving social engagement. They are often seen as a way to aggregate and utilize collective knowledge and expertise to make more accurate predictions than would be possible through individual forecasting. In particular, I believe that quantified forecasting is an underused tool that can help make better decisions in uncertain and complex worlds.

Pavel Fedotov

So, this is an example of a forecasting market. This is the forecasting market which is available on metaculus.com. The question is really, really relevant to today's development technology: 'When will the first general AI system be devised, tested, and publicly announced?' And the general prediction, or the average, is actually that it will be available in 2032. This is aggregated from around 1,000 forecasters and, yeah, so this is the market prediction on this question.

Pavel Fedotov

Aside from this, prediction markets are really interesting because they provide speculative opportunities. Prediction markets enable participants to speculate on the outcomes of various events such as elections, sports matches, and the performance of financial instruments. This introduces an element of risk and reward allowing individuals to potentially profit from their accurate predictions. It also provides market efficiency because participants engage in buying and selling shares based on their expectations of future outcomes. The price of shares in a prediction market reflects the collective wisdom and beliefs of participants. This efficiency creates opportunities for investors to identify mispriced shares and achieve financial gains. We also have market liquidity, which allows to buy and sell shares easily. This enables to enter and exit positions based on changing circumstances or new information. And it particularly helps with markets being heavily regulated and providing like risk mitigation. Finally, I think this is really, really interesting that it provides a potential for innovation. It helps for example hedge funds to explore markets and gain an edge effectively.

Pavel Fedotov

Prediction markets are actually a very, very interesting tool because I think there is an ideal use case for blockchain technology as they create a decentralized and unbiased source of real-time information. Prediction markets are very, very similar to blockchain oracles in bridging the gap between on-chain and off-chain environments.

Pavel Fedotov

So here is, for example, the problem with traditional prediction markets. And this is the market for AI that I've just shown you. The resolution is really, really complex, and it would take an enormous amount of time just to look through all of it and follow the links and just understand how it should work. And even after you read all of it, you're like, 'Oh my god, what is this, right? How I even should incorporate it into my decision process?'

Pavel Fedotov

So the solution to it, I think one of the solutions is actually to use something like an optimistic oracle, for example, by UMA, which would provide a human element and actually more transparency on the resolution mechanisms for these prediction markets. UMA's optimistic oracle allows to quickly request and receive data information. The optimistic oracle acts as a generalized escalation game between contracts that initiate a price request and UMA's dispute resolution system known as the Data Verification Mechanism, which is also short for DVM. The prices proposed by the optimistic oracle usually are not sent to DVM unless it's disputed. So in short, the DVM is powerful because it encompasses an element of human judgment to ensure contracts are securely and correctly managed when issues arise from the volatile markets. And there is also a really, really interesting aspect of it because UMA's oracle system is constructed with economic guarantees around the cost of corrupting the DVM. It will cost more to corrupt the oracle than the amount someone could profit from corrupting the oracle. So this is effectively a protection from somebody trying to influence the oracle.

Pavel Fedotov

And this is the example of an existing integration with UMA's oracle, it's already integrated into Polymarket. This is the example of UST losing its peg, and it was actually resolved by UMA.

Pavel Fedotov

So this is a really, really interesting aspect that we could further work on in prediction markets in Web3, and this is Zero-Knowledge Proofs combined with machine learning. Zero-Knowledge Proofs can help lift barriers by performing computations off-chain and providing a proof that this computation was correctly executed while shielding private data. The proof can then be verified on-chain for a much smaller computational cost, enabling us to implement on-chain private learning. There is also a really, really interesting example of an on-chain trading bot. I think I'll probably provide the link to the script with all of the links later, but yeah, I think it was already integrated, like Random Forest models already integrated into ZKML and all like very, very basic algorithms are also there. So another use case for ZKML is anomaly detection, which could be trained on smart contract data to be able to automate security procedures such as pausing contracts in a more proactive and preventative way. And finally, ZKML can assist with preserving privacy and compliance with government regulation.

Pavel Fedotov

So now we can finally move on to what I've built, or like what I'm trying to build, and this is the Algo AMM. We currently see two key problems in prediction markets. First, prediction markets are scattered across multiple platforms, which results in market fragmentation. Secondly, there is a lack of a centralized platform that serves as a comprehensive one-stop shop for prediction market enthusiasts. These problems hinder the efficiency and effectiveness of prediction market operations and make it difficult for users to easily access and participate in a comprehensive prediction market ecosystem.

Pavel Fedotov

So, Algo AMM serves as a powerful aggregator that efficiently pulls and bridges prediction liquidity from multiple platforms, creating a centralized hub for users to access various prediction markets. With Algo AMM, users gain the convenience of a one-stop shop, enabling them to seamlessly explore and engage with a wide range of prediction markets, all in one place.

Pavel Fedotov

So how we should actually approach this solution? There are three key aspects to it. First is creating a robust platform. We're building a highly robust and scalable platform that integrates multiple prediction market platforms, enabling seamless access to a wide range of prediction opportunities in one place. Then we are aggregating liquidity. Our unique innovation lies in aggregating prediction market liquidity from various platforms, which consolidates into a single hub, offering users a comprehensive pool of liquidity and enhancing efficiency. And finally, we are bridging prediction networks, creating a unified ecosystem that allows users to easily navigate and trade across multiple markets.

Pavel Fedotov

I think it just comes down to very, very simple that there is market depth, reduced slippage, and continuous liquidity provision. I think there are like multiple, for example, academic papers that say that AMMs could be equated to order books in some cases, but this is just how I guess the world sees AMM over order book. AMMs are just there to provide a constant liquidity provision. And in case of order books, it's really, really difficult for users to actually find somebody to match the price. And what we are planning to do is build something similar to CowSwap but for prediction markets. And in case of prediction markets, there are multiple obstacles in form of different resolution mechanisms and different order books or AMM structures. And we could probably bridge this gap with Algo AMM.

Pavel Fedotov

So our tagline is 'Embrace the Future of Prediction Markets' and we are looking for beta testers. We're also looking to get more feedback, and hopefully, we're also looking for an opportunity to continue just delving into this space.

Narb

Awesome. And is Algo AMM just limited to the Web3 space for prediction markets? Or could it be applied to something like SPY futures, for example?

Pavel Fedotov

To be honest, I have like a degree from, I've studied for three years economics and business. So I'm really, really excited, I would be really, really excited to work on something more traditional. I'm just not sure if I'll be able to kind of get the licensing, right? Or I'm not really even sure like whom to approach in this case. But I think the future is not really there yet in Web3 space. So building something like this, like SPY futures but for Web3 market, I think that would be like really, really interesting, huge essentially. Yeah, I'm just like, I'm not really sure how to go with this idea in traditional markets. And I'm here in Web3 primarily because of this that I can just write code and it's open source, and it's legal, hopefully. In traditional futures market, I'm not really sure that it's legal.

Narb

That's fair as well. Yeah, you don't want to go down a wrong rabbit hole there. But is there a UI or something you can show on algoamm.com?

Pavel Fedotov

Yeah, definitely. I've spent most of the time just translating the code in the contract from like Algorand to Solidity. The first iteration of it was in Algorand in PyTeal. And yeah, this is just a very, very simple... oh, it doesn't work. I wonder why. I think it's because I didn't actually enter. No. That's embarrassing. It worked, it worked. No, it doesn't. You aren't the first one to face this problem, believe me. So, but you mentioned that you started with the Algorand blockchain and then are planning to move to Solidity. What's your reasoning behind that? Why did you start with Algorand?

Pavel Fedotov

Algorand, to be honest, I was really, really excited to just go into the documentation of the whole blockchain. And it said there that actually somebody really, really smart developed the smart contract, and it should definitely work. So yeah, I was really excited to just take part in that space. And after a while, I think the market just went into full bear mode. And yeah, there like I think a couple of DeFi projects moved from Algorand into like Polygon or something like that. So I've tried to trade effectively, but I'm not really sure if it's going to return.

Narb

Yeah, Algorand always at least to me seems like one of those blockchains that has like really, really cool tech running behind it, but they for whatever reason never caught on with developers. But yeah, I mean it makes sense to go towards the Solidity side of things as that's like the dominant language a lot of folks are building on now. And I suppose you mentioned that you are looking for help with testing and potentially building Algo AMM. How can people reach out to you or what in particular are you looking for folks to help you continue building this out?

Pavel Fedotov

Oh, absolutely. To be honest, I'm like really excited to just work with other developers that are interested in the same topics that I'm interested in because I've noticed in this space, right, if you're just like, 'I would like to build something,' people will definitely reach out to you. So to be honest, I'm like really excited for like... I don't really have a lot of expectations necessarily, and I would just want to build something really, really cool in prediction markets or like in DeFi in general. Because I'm pretty sure that there is like a gap in just bridging the prediction markets and improving the transparency, right? Yeah.

Narb

Right. Yeah, excellent. And I guess for folks that are potentially looking to help you out, could you speak a little bit about your roadmap? Like where you see Algo AMM going in the short term and what are your plans for long term?

Pavel Fedotov

Yeah, definitely. First of all, I definitely need to fix that stupid bug. Because I've spent the day making sure it would work. Doesn't. Does work. I'm so embarrassed. It's so sucky. Live code sometimes, it's all right. And it's Friday, and it's Friday. I definitely have weekends. Yeah, yeah, yeah. Definitely for the roadmap, I'm absolutely... I would definitely would want to spend more time in figuring out the backend and like making sure that the liquidity side of things actually is suitable for the current market. And the markets are there and, yeah, I think there are like different curves that you kind of you can fit it into different markets because some of them have more liquidity, some have like essentially none. And I'm not really sure how to approach this task necessarily. Yeah, and I think the next logical step would be just to make that pool work and then just look for user feedback and improve on that. Because I think there's a lot of users that are looking for something like this and yeah. Like I had multiple calls, like looking for feedback from my Twitter kind of friends and they've said the same thing: like we're not going to install new wallet, we're not going to like click on suspicious things, we just want something very, very simple, we just like click, vote, right? We provide a feedback and that's it. So yeah, I'm definitely going to make that pool work, at some interesting questions and hope that people will leave a feedback or just like vote on outcomes.

Narb

That definitely makes sense. I think folks are kind of getting tired of having to do all the low-level wallet creation and transaction signing and what not. And the worst is like when it's like, 'Well, now you have to interact with this wallet, you have to back it up,' so you store somewhere this like phrases and then it's like, 'Well, now you have to actually make sure that the seed phrase is correct, please enter it.' Oh my god. Yeah, exactly. and it's like keeping track of all of that and being super cautious of not to upload it onto the internet, oh my gosh, yes. It's not a way to live. At least that's not how I want to live in the future. But yeah, that's really, that's really great to hear that you want to make the user experience a lot easier for folks not only for the testers but your future user base as well. I think that's going to pay dividends for you going forward.

Narb

I guess we're at almost three minutes left to time. I guess, so if people do indeed want to help you build out Algo AMM, how can they do that? How can they reach out to you?

Pavel Fedotov

Definitely, I think I've opened the DMs on Twitter, hopefully. Hopefully it works because sometimes it doesn't. Twitter just makes a lot of, yeah, like it's really, really inconvenient to interact with Twitter. But I think like definitely the GitHub, I'm not sure if I actually have the email or something like that in my profile. Yeah, I have like the links in my GitHub profile.

Narb

Oh, perfect. Okay, sweet. Yeah, so there's plenty of ways for you all in the crowd to get in touch with Pavel if you want to continue helping him build his really cool project here. And yeah, unfortunately, that kind of brings us to time, but thank you so much for coming on, Pavel. I really appreciate you taking the time to do so and it was really neat to see the beginning stages of Algo AMM and really looking forward to... absolutely. I think I should change the naming because it's like...

Pavel Fedotov

Yeah, it's okay, it's okay. I guess you know, it's not a word that AMM is not a word I say often. Me neither, to be honest. I'm trying to make a business, and I have to pronounce it. I cannot. It's time for you to create a new word to represent it all, right? Yeah. But regardless, yeah, really looking forward to continuing to see you build this out and I'm sure other folks in the DAO are as well.

Narb

And before everybody leaves today, I just want to present you all with the QR code to scan for you to claim your NFT for being an attendee here on DevNTell today. So what you want to do is grab your QR code scanner, scan this code, and you'll have an hour and a half from now to be able to claim your NFT, which will be airdropped to you within a few days. And Pavel, I also have another one for you just for being a speaker, but you're free to claim this one as well. I've already scanned it. All good, all good. And yeah, just with that, want to wish everybody a very happy Friday, a happy weekend, and we'll catch you back here next week. All right all, have a nice one. See ya. Bye.

Listen On

Share This Episode

Share on X

Watch Episodes Live!

Subscribe to our event calendar and never miss a live episode.

View Event Calendar