Omniscia Bluejay Finance Audit

Bond Implementation Security Audit

Audit Overview

We were tasked with auditing the codebase of Bluejay Finance and in particular their unique bond and algorithmic token implementation based on the Olympus DAO protocol with a novel price stabilization mechanism interfacing with both TWAP and Chainlink oracle types.

Over the course of the audit, we identified certain race conditions that can materialize, a deviation from the EIP-20 standard in the Staked Token implementation as well as multiple centralization concerns that have been outlined in detail within the report.

We advise the Bluejay Finance team to provide an alleviation for all our minor-and-higher severity findings as well as consider all informational level exhibits to increase the legibility, optimization, and overall quality of the codebase.

Post-Audit Conclusion

The Bluejay Finance team provided adequate responses for each exhibit identified and produced a response document detailing why some exhibits remained undealt with at the code level.

Additionally, all optimizational exhibits were considered by the Bluejay Finance team and all were assimilated into the codebase as advised, greatly optimizing its overall operational gas cost.

Contracts Assessed

Files in ScopeRepositoryCommit(s)
BondRouter.sol (BRR)bluejay-core18b6fc56b4,
f7baba33a3,
70e0f04c13
BluejayToken.sol (BTN)bluejay-core18b6fc56b4,
f7baba33a3,
70e0f04c13
BondGovernor.sol (BGR)bluejay-core18b6fc56b4,
f7baba33a3,
70e0f04c13
BaseBondDepository.sol (BBD)bluejay-core18b6fc56b4,
f7baba33a3,
70e0f04c13
ExponentMath.sol (EMH)bluejay-core18b6fc56b4,
f7baba33a3,
70e0f04c13
MerkleDistributor.sol (MDR)bluejay-core18b6fc56b4,
f7baba33a3,
70e0f04c13
PreBluejayToken.sol (PBT)bluejay-core18b6fc56b4,
f7baba33a3,
70e0f04c13
PriceFeedOracle.sol (PFO)bluejay-core18b6fc56b4,
f7baba33a3,
70e0f04c13
PriceStabilizer.sol (PSR)bluejay-core18b6fc56b4,
f7baba33a3,
70e0f04c13
StakedToken.sol (STN)bluejay-core18b6fc56b4,
f7baba33a3,
70e0f04c13
StablecoinToken.sol (STE)bluejay-core18b6fc56b4,
f7baba33a3,
70e0f04c13
StablecoinEngine.sol (SEE)bluejay-core18b6fc56b4,
f7baba33a3,
70e0f04c13
StabilizingBondDepository.sol (SBD)bluejay-core18b6fc56b4,
f7baba33a3,
70e0f04c13
Treasury.sol (TRE)bluejay-core18b6fc56b4,
f7baba33a3,
70e0f04c13
TwapOracle.sol (TOE)bluejay-core18b6fc56b4,
f7baba33a3,
70e0f04c13
TreasuryBondDepository.sol (TBD)bluejay-core18b6fc56b4,
f7baba33a3,
70e0f04c13
WhitelistSalePublic.sol (WSP)bluejay-core18b6fc56b4,
f7baba33a3,
70e0f04c13
WhitelistSalePrivate.sol (PAC)bluejay-core18b6fc56b4,
f7baba33a3,
70e0f04c13

Audit Synopsis

SeverityIdentifiedAlleviatedPartially AlleviatedAcknowledged
0000
272700
13904
8800
2200

During the audit, we filtered and validated a total of 10 findings utilizing static analysis tools as well as identified a total of 40 findings during the manual review of the codebase. We strongly recommend that any minor severity or higher findings are dealt with promptly prior to the project's launch as they introduce potential misbehaviours of the system as well as exploits.

pie title Total Issues "Unknown" : 0 "Informational" : 27 "Minor" : 13 "Medium" : 8 "Major" : 2

The list below covers each segment of the audit in depth and links to the respective chapter of the report: