TL;DR
This post explores explains how the AMM hosted at Fixed Forex currently works. Includes sections on;
- Why does the swapping function only accept certain assets?
- Assets accepted for swaps in?
- Assets offered for swaps out?
- How the AMM is funded? Where does liquidity come from?
- Why can’t users swap between ib stablecoins?
- Does the AMM collect fees for vested KP3R holders?
- Alternatives to using the Fixed Forex AMM
- Reporting Issues or Errors when using the AMM
- Directions for additional questions or queries
Any member of the team or community is free to suggest additions, corrections or updates.
Why does the swapping function only accept certain assets?
This is a decision taken by the Keep3r team, due to the AMM being a limited asset AMM. The contracts utilized by the AMM they are available to view here;
Assets accepted for swaps in (get ib token out)?
Currently accepted assets for swapping from USD stables to ib tokens are;
- DAI
- sUSD
Why these two stables? Because;
-
DAI
- is also an over collateralized stable (like ib tokens) that is time tested
- it also has the benefit of being an accepted form of collateral on Iron Bank, with a collateral ratio of 90%. Meaning that it can be used by Keep3r to prove credit worthiness with Iron Bank, if necessary
-
sUSD
- Allows atomic swaps between Synthetix stables (i.e. sUSD to sEUR, etc) as of SIP-120 & the further improvements introduced with SIP-198
- Non-USD Synthetix stables can be easily swapped for ib tokens via the pools on Curve
Assets offered for swaps out (give ib tokens, get USD stable)?
Currently accepted assets for swaps from ib tokens to USD stable allows;
MIM- sUSD (for ibEUR swap only)
Why these stables? Because;
-
MIM
- Note, no longer offered as of June 17th 22 due to Keep3r treasury risk management mitigation of MIM peg risk
- Previously acquired in volume by keep3r through offering MIM to ib token swaps (see link below)
- Protocol had a large reserve of MIM that it could draw down from, to offer an outbound route for ib token holders, however this is not infinate & is limited to level of reserves held by treasury
-
sUSD
- see reasons listed in section above
- Currently limited to ibEUR
- AMM has to route through > ibEUR to sEUR then sEUR to sUSD
- Routing can only be completed during market hours due to limitation of Synthetix system (Market hours are indicated on the kwenta website, exchange section)
Note;
- Keep3r treasury previously allowed swaps from MIM to ib tokens, therefore during this period were able to amass a large reserve that could then be offered for outbound swaps; ib token to MIM.
- In order to acquire MIM via inbound route, the AMM had to borrow an equal value of ib stable tokens from the Iron Bank (the majority of which has now been paid back, see note on outstanding borrows - link below).
- The AMM can only make further loans from the Iron Bank when it either has enough assets to offer a sufficent amount of collateral to meet the conditions for the loan, or it qualifies in meeting the conditions to be granted an uncollateralized loan.
- MIM recieved during this period was deposited into MIM+3CRV with the LP token deposited with Convex so that treasury could gain benefits from farming the position.
*Funds available for swaps out of ib stablecoin tokens;
-
For MIM to be available for users to swap to (from ib tokens) then the Keep3r team has to have MIM available, and must then transfer the funds to the AMM contract.
-
Note, if not enough funds available then this functionality for swapping out will be unavailable & any users attempting to swap will receive an error message.
-
Current funds available in the contract can be viewed on the etherscan page for the contract address or via the same link shared below that details level of borrows on the AMM contract.
How the AMM is currently funded? Where does the liquidity come from?
Liquidity in the AMM comes from two sources;
- USD inbound funds that are provided by users that want to acquire ib stablecoin tokens, when received these assets are held in the Keep3r treasury
- ib tokens offered for swaps are borrowed by the AMM from Iron Bank as a loan
Iron Bank allows the following;
- Protocols can borrow via uncollateralized credit facility if whitelisted, the AMM is such a whitelisted protocol
- Details on how Iron Bank protocol to protocol loans work can be viewed here
Keep3r loaned value;
- Level of outstanding borrow can be viewed here - Iron Bank having considered Keep3r credit worthy to borrow at these levels
- This means any ib stables that the AMM allows as an outbound swap (i.e. user received ib tokens) are borrowed by Keep3r via the AMM to provide to users
- The Keep3r treasury can repay these loans or service this debt via assets received through the AMM
Why can’t users swap between ib tokens?
Functionality isn’t currently live, or enabled via the AMM. It would require the Keep3r treasury to have access to a deep pool of ib tokens on-hand ready to swap.
Does the AMM collect fees for vested KP3R holders?
No, the AMM does not currently collect fees for distribution to vested KP3R token holders but does have the potential to do so in future.
Alternatives available to AMM?
If users are unable to utilize the Fixed Forex AMM to swap then alternatives are available. Deepest liquidity for ib stablecoin tokens can be found on Curve where there are pools for each ib stablecoin paired with USDC
Alternatively curve pools for ib stablecoin & Synthetix stable assets pairs can be used to swap ib stables to their synth twin. Swaps between synth stables are now integrated with 1inch via synthetix atomic swap feature
How to report errors experienced when using the AMM?
Users should post any errors or issues to the Fixed Forex support thread
Directions for additional questions or queries
Please use the comments section below to add any questions or queries regarding ib stable tokens, their mechanisms and how to access them.