# BSC Contracts

## Portfolio Contracts (deprecated)

* **Permanent Portfolio**: 0x24D22cA076Dc055A6b0faD59678d91BA4C948000

## Vault Contracts

1. **ApolloX Vault:** 0xd56d8Dfd3A3D6F6dafc0b7b6945F6E7AB138706e

## Portfolio Contracts (v2, got exploited)

* **Permanent Portfolio**: 0xD188492217F09D18f2B0ecE3F8948015981e961a

## Vault Contracts (v2)

1. **ApolloX Vault:** 0x9Ad45D46e2A2ca19BBB5D5a50Df319225aD60e0d

## Security Incident

1. V2 contract got exploited on 3/5 and 3/6 ([txn1](https://bscscan.com/tx/0x541260769bd8c389a5896fb46982ff4f8821a8b22b6e1e4399bf01e841fb9ce4), [txn2](https://bscscan.com/tx/0x9983ca8eaee9ee69629f74537eaf031272af75f1e5a7725911d8b06df17c67ca)) and lost around $10760
   1. cracker's [address](https://debank.com/profile/0xff61ba33ed51322bb716eab4137adf985644b94d)
2. We've compensated all the losses to our users, and our co-founders took the losses themselves. Here are the transactions through which we paid back our users:
   1. [txn1](https://arbiscan.io/tx/0x2ca790c16af0dac48c8f44b2fae98423164d17ac32e812b62af56117951ac4ef)
   2. [txn2](https://arbiscan.io/tx/0xe365eda955d5fa48c2aceee6375cb6600c02587a74c434c036b069900933bf5e)
   3. [txn3](https://arbiscan.io/tx/0x6f3155dcad603017fd49d17112ccabba6c7645acc99c1fc1c7c655fb2a408989)
   4. [txn4](https://arbiscan.io/tx/0x53ad636d6559439c83eea1543e95bf2730a909fcc2119f283d233717ca992124)
   5. [txn5](https://arbiscan.io/tx/0x5c7a92902435dda8b521eea5706cf73a81497a7154b82c3f2f5a0126b1f5076a)
   6. [txn6](https://arbiscan.io/tx/0x8e6dfbf7b660a2c9e5d4dbdb595948bf4506ff70492f9fdb2c582c9a7ae8d9e7)

### Operations Notes:

1. If we integrate new protocols into the stablecoin vault, we would allocate some funds from the existing protocol (e.g. ApolloX) to the new protocol. But the shares would stay flat
2. Example: 1share: 5.5alp+4.5vela = 5.5 \* *0.05454545454545454+ 4.5 \** 0.15555555555555556 10U: 5.4alp+4.6vela = 5.4 \* *0.05454545454545454+ 4.6 \** 0.15555555555555556
3. 本來是以 ALP 的 shares 當作單位，mint 多少 ALP shares 等於你拿到多少 portfolio shares；現在新增的 pancakeswap protocol 的話，可以看看現在 ALP 佔 portfolio 幾%, 去推算應該叫 mint 多少 shares 給他。e.g. 如果 mint 50 個 ALP 然後目前 portfolio 會買 50% 的 ALP, 那代表應該 mint 給 user 100 個 shares。以此類推可以適用於任何比例的 portfolio 去動態調整 mint shares 的邏輯

🚀 Your Web3 S\&P500! 🛡️ <https://all-weather-protocol.on-fleek.app/>
