# MIM Protocol Research
---
## How does MIM and its ecosystem work, across the board?
Abracadabra lending protocol offers CDPs. By depositing collateral, user can mint $MIM (which has utility across multiple other protocols) or use that $MIM to leverage their initial collateral position (like up to ~10X). Leveraged positions are automatically looped through BentoBox (Sushi's multicall deposit contract).
## What are the components of the system?
- Capped risk (X $MIM available per 'cauldron'; isolated CDP market)
- BentoBox (Sushi): loop borrow->sell->deposit->borrow in one tx to create leveraged position onchain.
- DegenBox (proprietary): autocompounding strat (with mgmt fee and limited withdrawals) for interest-bearing collateral (ie LUSD autocompounds LQTY rewards back into LUSD).
- Diverse 5/9 multisig signers ([docs](https://docs.abracadabra.money/tokens/tokenomics#the-mim-token)): abracadabra, yearn, cream, curve, arrakis, stakedao, bastion
- Moved their [Medium](https://abracadabramoney.medium.com/) blog to [Mirror](https://mirror.xyz/0x5744b051845B62D6f5B6Db095cc428bCbBBAc6F9):
> This account is under investigation or was found in violation of the Medium Rules.
## Notable integration throughout the ecosystem
The success of MIM and its adoption was/is due to a lot of different integrations:
- use popular tokens for collateral (UST, Yearn, Curve, Stargate, Spookyswap, etc.)
- utility on popular protocols (Curve, Convex, Votium)
- anyswap bridge to have MIM available on mainnet, bsc, fantom, avalanche, arbitrum and optimism.
## Fees
For simple fees simulation refer to this Jupyter notebook:
https://github.com/Badger-Finance/badger-influence-analytics/blob/master/notebooks/ebtc_research/mim_ebtc_research.ipynb
There are several types of fees
- Liquidation fee - This is the discount a liquidator gets when buying collateral flagged for liquidation
- Borrow fee -This fee is added to debt every time MIM is borrowed. As an example, if you borrow 1000 MIMs your debt will be increased to 1000.5 MIMs but you will actually receive 1000 MIM. These 0.5 MIMs will be distributed to sSPELL holders
- Interest fee - This is the annualized percent that your debt will increase each year. The interest fee is later distributed to sSPELL holders
### Leveraged fees
- Fee is charged on leveraged MIM amount.
- This means that if you borrow 100MIM with 5x leverage, X% fees will be charged on 500MIM amount
- Fee percent remain unchanged

### Some points and thoughts
- **How does protocol make revenue?**
One option is that revenue can be extracted from borrow fee: the more users borrow MIM, the more fees they are paying. Those fees are distributed to sSPELL holders. That would mean that Treasury™ should hold a large portion of sSPELL to receive borrow fees.
**For example**, MIM team holds 30% of all SPELL tokens, which can possible lead to 30% protocol fees capture(if SPELL is staked to sSPELL):

Alternative staking method introduced in [AIP8](https://forum.abracadabra.money/t/aip-8-an-update-on-abracadabra-fee-distribution-introducing-mspell-staking-pools/3218) is mSPELL, which distributes the fees directly in MIM (so without autocompounding into SPELL again).
- **Why does borrow fee exist?**
The more you borrow, the more fees you pay. Assuming this is done to keep protocol more stable, disincentivizing clients to open more and more positions?
## FEESability
abracabadra did in last 15 months:
- roughly $100m in fees
- 45% initial borrowing fee
- 22% interest
- liquidations only 2.6%
- 88% from mainnet (avalanche second chain; 7%)
- 26% by ust cauldron
- almost all earned during hype season (sept21-feb22), barely any fees after ust meltdown
so: borrow fee > interest > liquidations and very hype driven
problem with borrow fees is that it is charged by the protocol, no way to monetise for badger dao. this would imply that protocol and leverage product need to be one and the same, which doesnt fit findings so far (in regards to immutability, autonomy etc.)
coming back to original assumption of $10m tvl in year 1 (see [llama cdp leaderboard](https://defillama.com/protocols/CDP)), even with everyone leveraging at 5x, borrow fees collected will be $50m * .5% = $250k.
*all stats come from official powerbi dashboard: https://app.powerbi.com/view?r=eyJrIjoiZjFlZmJkNjAtN2Q5Mi00NTVhLWExYTQtNDJhNGU1NjA2OTAwIiwidCI6IjYyZTU1MTgwLTQzNmQtNDYyZC1hMWIwLTZkMTg2NjRlZDAxNSJ9