# Cross chain swap problem
## Context
I have written an interchain test for XCS feature on [Fee-abstraction](https://github.com/notional-labs/fee-abstraction). Everything was good but I found that XCS feature would have a problem when we try to send a big amount of coin that the liquidity can't handle.
## Details
### Setup detail
The testing code [here](https://github.com/notional-labs/fee-abstraction/blob/ducnt/ictest/tests/interchaintest/packet_foward_test.go).
I create 3 chain feeabs(stake) - osmosis(uosmo) - gaia(uatom) and ibc transfer channel between them.
On Osmosis, I setup XCS feature with all requirement contract and information and create a Liquidity Pool Osmosis(stake)/Osmosis(uatom) [here](https://github.com/notional-labs/fee-abstraction/blob/be9f1dfc73a27b80eb50f9ed81caf0808a9cc1ea/tests/interchaintest/packet_foward_test.go#L363).
On Feeabs, I setup all requirement information to create a MEMO for Osmosis's XCS feature [here](https://github.com/notional-labs/fee-abstraction/blob/be9f1dfc73a27b80eb50f9ed81caf0808a9cc1ea/tests/interchaintest/packet_foward_test.go#L478-L496).
After that, I will send a XCS msg from Feeabs to Osmosis. The msg will send feeabs(uatom) from feeabs module account to Osmosis and swap with pool Osmosis(stake)/Osmosis(uatom) to get stake back to feeabs module account.
Everthing was good with the amount [1000000stake](https://github.com/notional-labs/fee-abstraction/blob/be9f1dfc73a27b80eb50f9ed81caf0808a9cc1ea/tests/interchaintest/packet_foward_test.go#L457).
### Issue detail
The problem is when I try to send a bigger amount (1_000_000_000), the pool don't enough liquidity the swap will catch this [state](https://github.com/osmosis-labs/osmosis/blob/e44d04f216b7057d4d5f0680d88cc99db58d13b6/x/gamm/keeper/swap.go#L64). It mean that the swap msg from `swaprouter` contract not success.
What I'm expect here is the cross-chain-swap contract will send back the amount of coin that I've sent before. But it isn't and the ack of the ibc-transfer still return a success `{"result":"eyJjb250cmFjdF9yZXN1bHQiOm51bGwsImliY19hY2siOiJleUp5WlhOMWJIUWlPaUpCVVQwOUluMD0ifQ=="}`
=> So the amount I sent loss