Hunt prep
Before you test Cork Protocol
What 18 disclosed reports say about Cork Protocol: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 14 | 0 | – | – | $0 |
| Smart contracts lesson | 2 | 0 | – | – | $0 |
| DoS lesson | 1 | 0 | – | – | $0 |
| Misconfiguration lesson | 1 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
Incorrect redeemAmount Is Accounted Due To Not Accounting For The Exchange Rate
The issue was fixed by the protocol team.
Disclosed
-
Wrong accounting of locked RA when repurchasing DS+PA with RA
The protocol team fixed this issue by not accounting the fee when users provide RA.
Disclosed
-
Attackers will steal the reserve from the `Vault` by receiving `ra` in `FlashSwapRouter::__swapDsforRa()`
The FlashSwapRouter::__flashSwap() should be modified to accept a caller argument, allowing it to send the Ra to the owner (the Vault) when selling the reserve.
Disclosed
-
Admin will not be able to upgrade the smart contracts, breaking core functionality and rendering the upgradeable contracts useless
The notDelegated modifiers should be removed from the affected functions.
Disclosed
-
Rebasing tokens are not supported contrary to the readme and will lead to loss of funds
The protocol should either disallow rebasing tokens as assets or implement a mechanism to synchronise the tracked balances with the actual token balances.
Disclosed
-
Lack of slippage protection leads to loss of protocol funds
The protocol was fixed by implementing slippage protection and setting a deadline for liquidity removal and swaps.
Disclosed
-
LV token holders receive proportional fees, when they shouldn't
The protocol was fixed by implementing an exchange rate for the LV token.
Disclosed
-
Incoming Redemption Assets not being tracked when repurchase is called
The protocol team fixed this issue in a pull request, but the recommended fix of using lockFrom instead of lockUnchecked may cause issues if a fee is involved.
Disclosed
-
Users will steal excess funds from the Vault due to `VaultPoolLib::redeem()` not always decreasing `self.withdrawalPool.raBalance` and `self.withdrawalPool.paBalance`
Replace the read-only helper with one that actually updates the withdrawal pool balances, as shown in the mitigation.
Disclosed
-
`VaultPoolLib::reserve()` will store the `Pa` not attributed to user withdrawals incorrectly and leave in untracked once it expires again
The PA should be distributed to users according to their LV shares, or redeemed for RA and added as liquidity to the newly issued DS.
Disclosed
-
Attacker Can Decide The Initialization Ratio Of The AMM Pair
The protocol should add initial liquidity itself when creating the pool, or restrict initialization to a trusted party, to prevent an attacker from setting the initial price.
Disclosed
-
Admin new issuance or user calling `Vault::redeemExpiredLv()` after `Psm::redeemWithCt()` will lead to stuck funds when trying to withdraw
The protocol team fixed this issue in a pull request.
Disclosed
-
The UUPS proxie standard is implemented incorrectly, making the protocol not upgradeable
The issue was fixed by implementing a call to upgradeToAndCall in ModuleCore, though the team later stated they do not intend to keep the contracts upgradeable on mainnet.
Disclosed
-
Providing liquidity to the AMM does not check the return value of actually provided tokens leading to locked funds
The protocol team fixed this issue by checking the return values of addLiquidity and handling any discrepancies, as shown in the provided PRs/commits.
Disclosed