BAMM (Borrow Automated Market Maker)
BAMM (Borrow Automated Market Maker) is a decentralized lending and borrowing protocol that provides liquidity pools for exchanging two or more tokens with fixed maturity periods. Borrow AMM also enables liquidity providers to swap their tokens for other tokens, enhancing liquidity. BAMM aims to create a more versatile and efficient DeFi ecosystem for managing liquidity, earning interest, and accessing capital.
Unlike other AMMs, Borrow AMM allows lending and borrowing with fixed maturity periods, and pays fees and rewards to liquidity providers. BorrowAMM has emerged, combining the functionalities of a Money Market and an Automated Market Maker. The term ‘borrow AMM’ refers to the ability of traders to borrow concentrated liquidity positions from a public pool (the float pool) and utilize them in their own private pool (the Swapper) without requiring permission.
Technical Background of BAMM
Borrow AMM is based on the idea of using a mathematical function to determine the prices and quantities of tokens in a liquidity pool. The function is called an exchange function, and it defines the relationship between the inputs (tokens) and the outputs (prices) of the AMM. Different types of AMMs use different exchange functions, such as constant product, constant mean, constant sum, hybrid, or dynamic functions. The exchange function also determines the properties of the AMM, such as slippage, arbitrage, impermanent loss, and capital efficiency.
One of the main challenges of designing an exchange function is to balance the trade-off between liquidity and price impact. Liquidity refers to the ease of trading tokens in the AMM, and price impact refers to the change in price caused by a trade. Ideally, an AMM should have high liquidity and low price impact, but these two goals are often conflicting. For example, a constant product AMM has high liquidity but also a high price impact, while a constant sum AMM has low liquidity but also a low price impact. An appropriate exchange function should try to optimize both liquidity and price impact for different types of tokens and trades.
Another challenge in designing an exchange function is to account for the volatility and correlation of the tokens in the pool. Volatility refers to the degree of variation in the price of a token over time, and correlation refers to the degree of similarity in the price movements of two tokens. Volatility and correlation affect the risk and return of the liquidity providers, who supply tokens to the AMM and earn fees and rewards. An appropriate exchange function should try to minimize the risk and maximize the return of the liquidity providers, while also ensuring that the AMM is always solvent and arbitrage-free.
Difference between BAMM and other AMMs
The difference between Borrow AMM and other AMMs is as follows:
- Borrow AMM allows lending and borrowing with fixed maturity periods. This means that liquidity providers can lend or borrow their tokens for a specific period of time. This way, liquidity providers can earn fees and rewards, and borrowers can use the tokens they want at a low cost. Other AMMs mostly provide liquidity indefinitely or have variable loan terms.
- Borrow AMM enables liquidity providers to swap their tokens for other tokens. For example, if a liquidity provider participates in an ETH and USDT pool, they can swap ETH for USDT. This allows liquidity providers to adapt to the price fluctuations of the tokens and enhance liquidity. Other AMMs either prevent liquidity providers from changing the tokens they participate in the pool or charge additional fees.
- Borrow AMM applies user-defined fees. This means that liquidity providers can set the fee rate they want. This allows liquidity providers to optimize their profits and increase their competitiveness. Other AMMs apply fixed fees or determine the fees at the protocol level.
Pros and Cons of Borrow AMM
- Borrow AMM can provide more capital efficiency and flexibility for both lenders and borrowers. Lenders can earn fees and rewards by lending their tokens for a fixed period of time, and borrowers can access the tokens they need at a low cost. Borrowers can also choose the maturity period and the fee rate that suits their needs.
- Borrow AMM can reduce the risk of impermanent loss and interest rate volatility for lenders. Impermanent loss is the loss of potential profit when the price of the tokens in the pool changes. Interest rate volatility is the fluctuation of the interest rate over time. Borrow AMM can mitigate these risks by locking in the interest rate and the exchange rate at the time of the loan initiation.
- Borrow AMM can create new opportunities and use cases for DeFi. Borrow AMM can enable fixed-term lending and borrowing, which can be useful for hedging, arbitrage, leverage, and speculation. Borrow AMM can also support non-fungible loans, which can allow users to borrow or lend unique assets, such as NFTs, domains, or identities.
- Borrow AMM can be more complex and risky than other AMMs. Borrow AMM involves more parameters and variables, such as maturity period, fee rate, collateral ratio, and liquidation threshold. Borrow AMM also requires more coordination and synchronization among the participants, such as lenders, borrowers, liquidators, and arbitrageurs. Borrow AMM can expose users to various risks, such as default risk, liquidity risk, and smart contract risk.
- Borrow AMM can face regulatory and legal challenges. Borrow AMM can be considered as a form of lending and borrowing, which can be subject to different laws and regulations in different jurisdictions. Borrow AMM can also raise issues of compliance, taxation, and consumer protection. Borrow AMM can encounter difficulties in enforcing contracts and resolving disputes, especially when dealing with cross-chain or cross-platform transactions.
- Borrow AMM can face competition and compatibility issues. Borrow AMM can face competition from other DeFi protocols that offer similar or better services, such as Aave, Compound, or Maker. Borrow AMM can also face compatibility issues with other DeFi protocols or standards, such as ERC-20, ERC-721, or EIP-1559. Borrow AMM can require more integration and interoperability efforts to achieve network effects and user adoption.
Providers of BAMM
Borrow AMM is a relatively new concept in the DeFi space, and there are not many crypto finances or companies that provide it. Notable players like Frax Finance, GammaSwapLabs, infinitypool, Timeswap, SushiSwap, and Panoptic_xyz are already making strides in this space.
- Frax Finance: Frax Finance is a fractional-algorithmic stablecoin protocol that aims to create a more capital-efficient and innovative stablecoin ecosystem. Frax Finance is planning and actively coding to launch Borrow AMM (BAMM) in 2023, which will be integrated with frxETH V2, a liquid staking token that enables users to run validators in a decentralized and permissionless way. BAMM built by the core team of Frax Finance allows users to use leverage on any token without the need of oracles. By now adding the ability to borrow from an LP pool in a safe manner, BAMM is the first instance of a primitive that encompasses all parts of The DeFi Trinity in a truly decentralized manner that anyone can tap into. 
- Timeswap: Timeswap is an AMM-based lending and borrowing protocol that operates on Ethereum, Arbitrum, Polygon, and other networks. It offers fixed maturity and non-fungible loans, similar to Borrow AMM. Timeswap claims to be the first AMM to enable fixed-term lending and borrowing.
- SushiSwap: SushiSwap is a popular AMM and decentralized exchange that operates on multiple blockchains. SushiSwap is developing a new feature called Kashi, which will allow users to create custom lending and borrowing markets with any pair of tokens. Kashi will use a novel AMM design called BentoBox, which will enable isolated risk, flexible fees, and leverage.
BAMM (Borrow Automated Market Maker)
How was your experience?
Give this wiki a quick rating to let us know!