Algo AMM allows you trade on the outcomes of events, and follow the odds to garner accurate insights about the future.
Liquidity Providers supply stable coins in return for the liquidity shares. The liquidity lets users to buy or sell Voting Shares, which are redeemed for 1 unit of the stable asset if the outcome is resolved as correct, and become worthless if it’s incorrect.
The core feature of the app is that we protect the owners of Voting shares by keeping the reserves of stable assets, primarily in case of liquidity drain.
The goal is, by harnessing the power of free markets to aggregate collective knowledge and provide the general public with an unbiased source of truth in regards to the likelihood of certain significant events happening in the future.
Automated Market Maker
Constant Function Automated Market Maker (AMM) contract provides configuration options and creates a market for an event that has a binary outcome.
Liquidity Pool provides a foundation for users to purchase and redeem spawned tokens once the event has been resolved. The Liquidity Pool supports a constant reserve ratio for stable price discovery and protection from liquidity drain. The liquidity provided allows to spawn two tokens in equal amount in 25%/25% proportion of the liquidity supplied.
The purchase price for each token is determined by equation: x + y = k. Where x is the amount of A tokens in the AMM, y is the amount of B tokens in the AMM.
Once the event has occured the price for one token should resolve to 1, while 0 for another.
Liquidity Shares and Voting Shares can only be released after the creator of the contract moderated the outcome.
We chose Algorand as the blockchain for smart contracts. We built the smart contracts with Python libraries PyTeal and Py-algorand-sdk. PyTeal is a python library for generating TEAL programs. PyTeal is used for writing smart contracts on the Algorand blockchain.
Long Video Overview of the smart contracts: https://youtu.be/uePtNvBP3oQ
Vercel hosts the demo application.