liquidity icon indicating copy to clipboard operation
liquidity copied to clipboard

Add more descriptive comments for the ratio of assets in the pool and the swap price

Open jaybxyz opened this issue 4 years ago • 0 comments

Summary

There is a demand for more descriptive comments for the ratio of assets in the pool and the swap price. Developers who just start to play with the liquidity module may not have much knowledge about the DEX pricing calculation. For them, it will be helpful to have more descriptive comments around how to calculate order price when creating a swap transaction and how to obtain the swap price.

Proposal

I propose to write more descriptive comments in both swap cli command and sample swap script.

https://github.com/tendermint/liquidity/blob/33a5ca6c4d0f6e0c462349ab1cf89cccceaeb9e3/x/liquidity/client/cli/tx.go#L237-L270

https://github.com/tendermint/liquidity/blob/33a5ca6c4d0f6e0c462349ab1cf89cccceaeb9e3/scripts/sample-swap.sh#L49-L58


For Admin Use

  • [x] Not duplicate issue
  • [x] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned

jaybxyz avatar Jul 14 '21 01:07 jaybxyz