I am very proud to announce that we have launched the @ammalgam protocol.
I have spent the last 4 years building a simple idea, a dex coupled with a lending protocol to create capital efficiency for dex liquidity providers, and the utility to borrow anything.
There is a lot to say from a technical perspective about the construction of various elements of the protocol. It is complex, this was the cost of building something that can theoretically support borrowing on any token. Decoupling off-chain crypto trading data from lending markets is a critical step to unlock decentralized finance.
Some critical features:
- Dex trading assets are automatically lent out in the integrated lending protocol to earn swap fees and lending fees
- Dex trading assets can be used as collateral to borrow against, unlocking neutral, long, and short market making, and leveraged liquidity.
- Leveraged market making is similar to concentrated liquidity in its effect, but uses borrowed assets rather than a protocol mechanism
- Users can borrow dex liquidity shares to allow for turning impermanent loss into impermanent gain.
- liquidity is fungible allowing for both simpler math for borrowing calculations and easier matching of users needs, similar to the advantages of perps over options.
- Swap fees scale with price change impact rather than swap size to allowing for algorithmically pricing informed vs uninformed order flow to the dex. Additionally making it expensive to manipulate the price
- A series of protections are in place to protect the concept of price from manipulation, using a price range from multiple twap lengths and spot price, pricing assets with the worst price in that range for ltv calculations, and limiting recorded prices in the twap to move 10 ticks per block to ignore outliers.
- Each new loan is checked for its impact to liquidation risk by bucketing the price curve into 25 tick tranches and capping how much potential liquidation risk can be supported in each tranche by pool swap reserves in case of cascading liquidations.
- Debt spanning multiple tranches can be liquidated in chunks, one tranche at a time using a dutch auction that increases the premium as the ltv of that chunk increases. This ensures that massive loans are not at risk of destroying the price by being liquidated all at once (👋 @newmichwill).
Perhaps some will say that the design and concept we put forward is similar to something else. This is likely true in many facets of what we built, we surveyed everything that has been built and took ideas from everywhere, this wouldn't be possible without the free sharing spirit of open source code. As such all contracts are open source and available to view on etherscan.
We spent a tremendous amount of time and effort working to fix all the issues we could find. Perhaps it was enough effort, perhaps it was not. Today marks the start of the final audit and the start of our ability to find product market fit. Today ends one chapter and start the next.
I am looking to get in touch with:
- Creators of tokens
- Vault operators
- Providers of on chain market making liquidity
- Anyone who has used a lending protocol before on chain
- Swap aggregators
- Searchers
- And anyone else who is curious about how to leverage what we built
Vaults are LIVE!
Deposit $USDC and $WETH into Ammalgam vaults, powered by @lagoon_finance.
Maximum yield. Minimum effort.
Deposit now: https://t.co/IHMjk2huoZ