#Soroswap: Forking the UniswapV2 protocol in Soroban

12 messages · Page 1 of 1 (latest)

south ice
#

Hello! 7907win11emojipartying

I am happy to announce the version 0.0.1 of the Soroswap.Finance protocol, an open-source AMM in Soroban.
With the help of SCF I am and I will be able to support this project, hire devs and be ready to have a running AMM in Soroban for the mainnet launch.

In the last weeks I worked in adapting the liquidity_pool contract that already exist in the stellar/soroban-examples repo in order to implement the token interface (so every liquidity_pool) contract will behave as a token itself, just as how Uniswap does.

In the Soroswap language (and because we want to make the protocol similar to UniswapV2), this contract is called the Pair contract.

Also, wrote a rust-soroban version of the Factory contract that allows users to create one Pair contract for every (token_a, token_b) or (token_b, token_a) tuple .

I also wrote some basic documentation with instructions to clone and test the contracts using rust and the soroban CLI.
Check them out at: https://docs.soroswap.finance/ and in a 7 chapers series in dev.to: https://dev.to/esteblock/series/22986

I will be happy to answer any questions, receive comments, suggestions, etc...

This project is 100% open-source, so all it code it's available in https://github.com/soroswap
Webpage: https://soroswap.finance/
Twitter: https://twitter.com/soroswap

ember spindle
#

nice!

frail condor
#

This is awesome @south ice! Is there any feedback on the developer experience you want to share with the soroban devs?

south ice
#

Hello, thanks @frail condor .
So, as a developer, more comprehensive error messages in the soroban CLI would be great. Currently, if a contract panics in Rust, the reason for the panic is not passed to the CLI user. This makes it difficult to debug and fix errors through the CLI...

And I am saying this because tests in rust where running perfect, but I was having problems while experimenting with the CLI... and this leads into my second experience:

I started from the lastest commit in soroban-examples, which uses soroban sdk version 0.7.0, but with an specific rev version.... which is kind of confusing, because that rev version was not the stable version being used by the quickstart image.

Later on, I realize that the release version of rs-soroban-sdv v0.7.0 was the 8abd3353c728f09ee1c8a2544f67a853e915afc2 version and not the one in the latest commit of the soroban-examples contracts.

If you go to https://github.com/stellar/soroban-examples/blob/main/liquidity_pool/Cargo.toml you'll see that uses soroban-sdk = { version = "0.7.0", git = "https://github.com/stellar/rs-soroban-sdk", rev = "9383a6ae6f21c24cfe74a53759949b2c83d53e78"}

But now I learned that I should pay more attention to the rev version, even if in Cargo.toml sets an specific version (in this case v0.7.0)

#

Also I would add that Address v/s BytesN<32> it's an issue (there is a thread about this: #1103075731715653672 message), and for me it's strange not being able to set on rust from which account to call functions while testing. I want to test that a function will panic if a non authorized user calls a function with user.require_auth. Thread: #1105892103646613706 message

frail condor
#
  1. Errors in CLI - cc @verbal cosmos @tribal cairn
  2. Version mismatch between futurenet and the main branch on soroban-examples - we're on it. Starting from the next release main will be locked to the deployed version and changes will go into a staging branch.
  3. Address/BytesN<32> - we're on it.
  4. Auth testability. We've made some changes that are making it to the upcoming release. would love to hear if they solve this issue for you.

keep the feedback coming - it's super helpful! Looking forward to hear about the developer experience of using the js client and rpc

verbal cosmos
dreamy blade
#

@south ice Hey, super excited for this! Did you mean to post this in the #1082054199187083264 channel for SCF?

south ice
#

Hi. I don't have access to that channel 😮

dreamy blade
#

@south ice Go to #1080932872833216573 and add Community Fund role to get access! Discord mods wanted to keep the Community Fund channel opt-in, that's why 😄

south ice
#

Great! I will post this there then 🙂

#

@dreamy blade I did it, but I still don't have permission to post there. Can you help me with that?
Thanks