MoonDefi is a protocol on Ethereum for swapping ERC20 tokens without the need for buyers and sellers to create demand. MoonDeFi Protocol (”MoonDeFi”) has served as trustless and highly decentralized financial infrastructure.
MoonDefi (beta) is an on-chain system of smart contracts on the Ethereum blockchain, implementing an automated liquidity protocol based on a “constant product formula".
Each MoonDefi (beta) pair stores pooled reserves of two assets, and provides liquidity for those two assets, maintaining the invariant that the product of the reserves cannot decrease. Traders pay a 30-basis-point fee on trades, which goes to liquidity providers. The contracts are non-upgradeable.
MoonDefi is a new implementation based on the same formula, with several new highly-desirable features. Most significantly, it enables the creation of arbitrary ERC20/ERC20 pairs, rather than supporting only pairs between ERC20 and ETH. It also provides a hard-ened price oracle that accumulates the relative price of the two assets at the beginning of each block. This allows other contracts on Ethereum to estimate the time weighted average price for the two assets over arbitrary intervals. Finally, it enables \ ash swaps" where users can receive assets freely and use them elsewhere on the chain, only paying for (or returning) those assets at the end of the transaction.