Links

Swapping

Cashmere StableSwap aims to eliminate slippage in the market for high-value swaps while maintaining flexibility and stability. Stablecoins pegged to the dollar are currently supported by us (i.e., FRAX, BUSD, USDT, DAI, USDC and TUSD).
Cashmere can swap any asset to any chain without bridging asset. You can swap your assets internally or between networks.
Cashmere uses Layerzero's cross-chain interoperability messaging service.
Cashmere is the unique application that has stableswap and asset aggregator in one application at the same time.
Stableswap uses Cashmere's own liquidity directly and becomes a Layer1 & Layer2 solution.
On the other hand, the aggregator uses all liquidity pools in all networks and offers the lowest slippage to the user.
There are a few variables to look at before starting the trade:
  • Network's native token is required for each transaction's gas fees.
  • For liquidity provision, a 0.04 percent swapping fee (dubbed "haircut") is paid.
  • Depending on the pool's compensation ratio, we may charge deposit or withdrawal fees.
  • It is currently not possible to trade tokens that are not listed on Cashmere by importing their contract addresses.
  • While the exchange rate for tokens in StableSwap is fixed, it's possible that some of them will become unfixed due to unforeseen circumstances. Cashmere monitors real-time data feeds via a trusted pricing oracle like Chainlink and will stop trading if a large variation is discovered.
​
The swap slippage is given by:
Si→j=Si+(−Sj)=Si−SjS_{i \rightarrow j}=S_i+(-S_j )=S_i-S_j
and
Si=g(c’i)−g(ci)c’i−ciS_i = \dfrac{g(c’_i) - g(c_i)}{c’_i - c_i}
ri′+rir'_i + r_i
where r(i) is the original compensation and r'(i) is the final compensation.
If the swap amount is small, the slippage can be given by
Si→j=g’(ci)−g’(c’i)S_{i \rightarrow j} = g’(c_i) - g’(c’_i)

​

We take the compensation ratio of USDT at 1.10 and the USDC at 0.90 Working this out, we’d get:

USDT:

g′(1.10)=−0.00002∗71.108=0.06%g'(1.10) = -\dfrac{0.00002*7}{1.10^8} = 0.06\%

USDC:

g′(0.90)=−0.00002∗70.908=0.03%g'(0.90) = -\dfrac{0.00002*7}{0.90^8} = 0.03\%
Hence we have
SUSDC→USDT=0.06%−0.03%=+0.03%S_{USDC \rightarrow USDT} = 0.06\% - 0.03\% = +0.03\%

Positive Slippage

Cashmere enables users’ positive arbitrage to balance compensation ratio. The swap slippage defined above can make the compensation ratios close to each other. Also, it can encourage users to positive slippage. Mathematically, for any swap from token
ii
to token
jj
,
​
This represents the marginal slippage when someone is performing a small amount of swap at this compensation ratio. And yes, the slippage is positive and user can benefit from the swap!
Slippage Positive Arbitrage System Diagram
​