Abstract
Curve Finance invented the first stableswap-focused algorithm. However, its algorithm involves (1) solving complex polynomials and (2) requiring assets in the pool to have the same size of liquidity. This paper introduces a new stableswap algorithm–Wombat, to address these issues. Wombat uses a closed-form solution, so it is more gas efficient and adds the concept of asset-liability management to enable single-side liquidity provision, which increases capital efficiency. Furthermore, we derive efficient algorithms from calculating withdrawal or deposit fees as an arbitrage block. Wombat is named after the short-legged, muscular quadrupedal marsupials native to Australia. As Wombats are adaptable and habitat-tolerant animals, the invariant created is also adaptable and tolerant to liquidity changes.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Angeris, G., & Chitra, T. (2020). Improved price oracles: Constant function market makers. SSRN Electronic Journal.
Hayden, A. (2019). Uniswap birthday blog–v0.
Michael, E. (2019). stableswap–efficient mechanism for stablecoin liquidity.
Othman, A., Sandholm, T., Pennock, D. M., & Reeves, D. M. (2013). A practical liquidity-sensitive automated market maker. ACM Transactions on Economics and Computation (TEAC), 1(3), 1–25.
Platypus Team. (2021). Platypus AMM technical specification.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Appendices
A Screenshots of Uniswap and Curve
B Proof of Theorem 2
Proof
If \(r^*=1\), then \(D=\left( \sum _{k\in \mathcal {T}}L_k\right) (1-A)\) by Eq. (5), \({r^*}'=1\) by Eq. (6), and \(D'=\left( \delta ^L_i+\sum _{k\in \mathcal {T}}L_k\right) (1-A)\) by Eq. (7). Hence, Eq. (8) becomes
If \(\delta ^L_i<0\) and \(\delta ^A_i\ge 0\), then the left hand side (LHS) of Eq. (13) is positive while the right hand side (RHS) is negative, a contradiction. Similarly, if \(\delta ^L_i>0\) and \(\delta ^A_i\le 0\), then the LHS is negative while the RHS is positive, a contradiction again. Hence, \(\delta ^L_i\) and \(\delta ^A_i\) always share the same sign.
To compare \(\delta ^L_i\) and \(\delta ^A_i\), we first rewrite Eq. (9) as
Therefore, Eq. (10) yields
Note that
and
Furthermore, by the AM-GM inequality, we have \(r_i+\dfrac{1}{r_i}\ge 2\), so
where the equality holds if and only if \(r_i=1\). As a result,
If \(\delta ^L_i<0\), then
so \(\delta ^A_i-\delta ^L_i\ge 0\), with the equality holds if and only if \(r_i=1\); if \(\delta ^L_i>0\), then
so \(\delta ^A_i-\delta ^L_i\le 0\), again with the equality holds if and only if \(r_i=1\).
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Lie, J.H., Wong, T.W.H., Lee, A.Yt. (2023). Wombat—An Efficient Stableswap Algorithm. In: Pardalos, P., Kotsireas, I., Guo, Y., Knottenbelt, W. (eds) Mathematical Research for Blockchain Economy. MARBLE 2022. Lecture Notes in Operations Research. Springer, Cham. https://doi.org/10.1007/978-3-031-18679-0_13
Download citation
DOI: https://doi.org/10.1007/978-3-031-18679-0_13
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-18678-3
Online ISBN: 978-3-031-18679-0
eBook Packages: Economics and FinanceEconomics and Finance (R0)