WARNING: THIS CODE HAS NOT BEEN AUDITED AND SHOULD NOT BE USED ON THE ALGORAND MAINNET - USE AT YOUR OWN RISK!
AlgoSwap is an automated market maker like UniSwap built on the Pure Proof-of-Stake Algorand Blockchain. It relies on the xy = k
function to maintain exchange rates for liquidity pairs in the market.
See the AlgoSwap Protocol documentation.
TODO
- Test cases
- Anti-frontrunning using hashed commitments: in one block you must commit to making a trade by putting down a deposit (the amount needs to be thought out to properly align incentives), in a later block you would follow through on the commitment by actually making a trade, you can't make a trade unless you've committed to it in a previous block, this should entirely prevent frontrunning bots
AlgoSwap was made possible by a generous grant from the Algorand Foundation, and the hard work of the following individuals:
AlgoSwap is made available under the MIT license.