# Discussion: AMM Functionality

**URL:** <https://gov.yearn.fi/t/discussion-amm-functionality/12638>\
**Category:** Fixed Forex\
**Created:** [11 July 2022 20:05 UTC](https://gov.yearn.fi/t/discussion-amm-functionality/12638 "2022-07-11T20:05:58Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![SeaSaltyFunk](https://dub1.discourse-cdn.com/flex013/user_avatar/gov.yearn.fi/seasaltyfunk/32/3959_2.png) [@SeaSaltyFunk](https://gov.yearn.fi/u/SeaSaltyFunk)\
**Post date:** [11 July 2022 20:48 UTC](https://gov.yearn.fi/t/discussion-amm-functionality/12638/2 "2022-07-11T20:48:41Z")

</div>

**Suggestion;**  
I’d like to kick things off, with a suggestion to modify the ibAMM (0x58d288812A2d67F520335e99A9718c04B8f2a3D4) to allow for direct swaps from sUSD to **ANY** sXXX stable asset of the following sXXX types;

- **sEUR** ; 0xD71eCFF9342A5Ced620049e616c5035F1dB98620
- **sCHF** ; 0x0F83287FF768D1c1e17a42F44d644D7F22e8ee1d
- **sGBP** ; 0x97fe22E7341a0Cd8Db6F6C021A24Dc8f4DAD855F
- **sAUD** ; 0xF48e200EAF9906362BB1442fca31e0835773b8B4
- **sKRW** ; 0x269895a3dF4D73b077Fc823dD6dA1B95f72Aaf9B
- **sJPY** ; 0xF6b1C627e95BFc3c1b4c9B825a032Ff0fBf3e07d

**Motivation;**  
This change will have no impact on any treasury held assets, nor will it have any impact on ibXXX assets loaned. It wouldl benefit protocol in two notable ways;

1. Ease of use for end-users vs having to utilize an external service (such as Kwenta)

2. With treasury controlled curve directing emissions [due to return to incentivizing ibXXX+sXXX stable curve pools](https://twitter.com/SeaSaltyFunk/status/1546062817438072832?s=20&t=eammMxCZG_pcwIIznRVY9g) & with pools currently being off-peg - this would allow;

- end-users ease of access to the pools on the Synthtix stable side
- benefit restoration of peg due to the fact that any user entering the pool single-sided via the under-balanced asset will receive a bonus for depositing into the pool

Due to need for re-peg of pools, would recommend these swap options are offered at no additional fee. Due to the atomic exchange capabilities enabled by Synthetix users will [incur base fees as per SCCP-190](https://sips.synthetix.io/sccp/sccp-190/) & may be subject to change in future SCCPs although will incur no slippage

As these changes will help user-enablement to restore peg on ibXXX+sXXX pools - then it follows that peg valuations being within a tight range is also likely to restore confidence in any potential borrowers of ibXXX assets from Iron Bank - which should be considered a critical need for [generating revenues for vested KP3R token holders](http://gov.yearn.fi/t/explainer-guide-keep3r-revenues/12616)

**Execution;**  
Can be enabled by modifying current contract to;

- List address for each Synth detailed above
- ‘quote\_snx’ for sUSD to sXXX
- ‘swap\_snx’ via ‘snx.exchangeAtomically’
- return sXXX to sender

Should also include notice on web frontend of hours of operation

**Timing;**  
Ideally, this change would be enabled in time for incentives returning to ibXXX+sXXX pools, due on 14th July

**Technical Reference;**

- Fixed Forex ib\_amm contract at;
  - 0x58d288812A2d67F520335e99A9718c04B8f2a3D4

- Atomic Swap info via Synthetix at;
  - [SIP-89](https://sips.synthetix.io/sips/sip-89/) for (now historical) Virtual Synths
  - [SIP-120](https://sips.synthetix.io/sips/sip-120/) for Atomic Exchange Functions on L1
  - [SIP-198](https://sips.synthetix.io/sips/sip-198/) for Update to Atomic Exchange Function which allows trading at pure chainlink price
  - [SIP-220](https://sips.synthetix.io/sips/sip-222/) for Update on Exchange Fee System

- Synthetix fee updates;
  - [SCCP-190](https://sips.synthetix.io/sccp/sccp-190/) for Update Fees & Atomic Volatility Circuit Breaker Parameters

**_Note_;**

- SIP = Synthetix Improvement Proposals
- SCCP = Synthetix Configuration Change Proposals  
These are the formal mechanisms Synthetix uses for making changes to the protocol. SIPs are usually smart contract level changes, whilst SCCPs are usually configuration variables

**Additional Considerations;**  
Functionality could be further enhanced by enabling inbound routing via [the sUSD pool on curve](https://curve.fi/susdv2) which would mean the following assets could be accepted as inbound swaps;

- DAI
- USDC
- USDT

Therefore routing all DAI/USDC/USDT via the pool & swapping to sUSD before quoting and exchanging atomically to the sXXX asset

If added, this should include passthrough of curve incurred fees and notice of slippage to user

---

_[View the full topic](https://gov.yearn.fi/t/discussion-amm-functionality/12638)._
