Abstract
We propose the Universal Token Swapper (UTS), a smart contract acting as a payment processor between buyers and merchants in a multi-token environment for EVM compatible blockchains. UTS gives merchants the ability to accept any token by performing instant conversions. This way, the buyer does not have to convert the tokens before a payment and the merchant is not subject to financial ruins if he does not want bear the risk on speculation on the value of the token received. In addition, UTS can be implemented to follow any regulation by linking the contract to on-chain oracles, bringing regulatory compliance to DeFi and helping merchants take advantage of the new possibilities.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
A bonding curve is a mathematical curve that describes a relationship between price and token supply. Generally the bonding curve formula is such that the price increases as the supply of the token increases. While counter-intuitive, that’s obvious once considered that in a bonding curve based token an increase of the supply occurs only as a consequence of an increase in demand [15].
- 3.
Essentially the formula is \(price(tokenA)*price(tokenB)=k\) where k is constant, hence the name.
- 4.
It is possible to practice automated trading strategies, but decisions are made by off-chain algorithms that trigger on-chain trades.
- 5.
See for example https://dune.xyz/phabc/usdt---banned-addresses for a list.
- 6.
We also evaluated the functions pause and unpause. Both require about 27, 000 gwei for the gas. The beforeSwap and afterSwap functions were not reported as they depend on the implementation by M.
References
Nakamoto, S.: Bitcoin: a peer-to-peer electronic cash system, p. 9. Whitepaper (2008)
Back, A., et al.: Enabling blockchain innovations with pegged sidechains, p. 25. Whitepaper (2014)
Wood, G.: Ethereum: a secure decentralised generalised transaction ledger. Yellowpaper 151, 1–32 (2014)
Szabo, N.: Formalizing and securing relationships on public networks. First Monday (1997)
Buterin, V.: Chain interoperability. R3 Research Paper (2016)
Nolan, T.: Alt chains and atomic transfers. https://bitcointalk.org/index.php?topic=193281.msg2224949#msg2224949
Herlihy, M.: Atomic cross-chain swaps. In: Proceedings of the 2018 ACM Symposium on Principles of Distributed Computing, pp. 245–254. ACM, Egham, United Kingdom (2018)
Adams, H., Zinsmeister, N., Salem, M., Keefer, R., Robinson, D.: Uniswap v3 core. Whitepaper (2021)
Sushi Team. The sushiswap project (2020)
1inch Team. The 1inch API v3.0 (2021)
Werner, S.M.: SoK: Decentralized finance (DeFi). CoRR, abs/2101.08778 (2021)
Lin, L.X., et al.: Deconstructing decentralized exchanges. Stanford J. Blockchain Law Policy 2, 58–77 (2019)
ethernet. Etherdelta smart contract overview. Githubn (2018)
Hsieh, Y.C., Hsueh, C.W., Wu, J.L.: The exchange center: a case study of hybrid decentralized and centralized applications in blockchain. In: 2018 1st IEEE International Conference on Hot Information-Centric Networking (HotICN) (2018)
Hertzog, E., Benartzi, G., Benartzi, G.: Bancor protocol. Whitepaper (2017)
Buterin, V.: On path independence (2017)
Daian, P., Sirer, E.G.: Bancor is flawed (2017)
Xu, J., Vavryk, N., Paruch, K., Cousaert, S., et al. Sok: Automated market maker (AMM) based decentralized exchanges (DEXs). Technical report (2021)
Wang, Y.: Automated market makers for decentralized finance (DeFi). CoRR, abs/2009.01676 (2020)
Bartoletti, M., Chiang, J.H., Lluch-Lafuente, A.: A theory of automated market makers in DeFi. In: Damiani, F., Dardha, O. (eds.) COORDINATION 2021. LNCS, vol. 12717, pp. 168–187. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-78142-2_11
Matcha Team. The matcha documentation (2020)
Wronka, C.: Financial crime in the decentralized finance ecosystem: new challenges for compliance. J. Finan. Crime 30, 97–113 (2021)
Padilla, R.: DeFi, law and regulation. Technical report, Mimeo (2020)
Ushida, R., Angel, J.: Regulatory considerations on centralized aspects of DeFi managed by DAOs. In: Bernhard, M., et al. (eds.) FC 2021. LNCS, vol. 12676, pp. 21–36. Springer, Heidelberg (2021). https://doi.org/10.1007/978-3-662-63958-0_2
Breidenbach, L., et al. Chainlink 2.0: Next steps in the evolution of decentralized oracle networks. Whitepaper (2021)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 International Financial Cryptography Association
About this paper
Cite this paper
Barbàra, F., Sanino, A., Schifanella, C. (2023). UTS: The Universal Token Swapper. In: Matsuo, S., et al. Financial Cryptography and Data Security. FC 2022 International Workshops. FC 2022. Lecture Notes in Computer Science, vol 13412. Springer, Cham. https://doi.org/10.1007/978-3-031-32415-4_39
Download citation
DOI: https://doi.org/10.1007/978-3-031-32415-4_39
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-32414-7
Online ISBN: 978-3-031-32415-4
eBook Packages: Computer ScienceComputer Science (R0)