Bluefin is a decentralized spot and derivatives exchange on Sui.
| Target | Type | Severity |
|---|---|---|
https://github.com/hackenproof-public/bluefin-dex-contracts-v3 Copy Out of Scope: * Anything outside the sources folder * test_coin.move file in the sources folder * deleverage() function inside exchange.move Please contact our support team in Discord to get access to scope. | Smart Contract | Critical |
Out of Scope: * Anything outside the sources folder * test_coin.move file in the sources folder * deleverage() function inside exchange.move Please contact our support team in Discord to get access to scope.
We are looking for evidence and reasons for incorrect behavior of the smart contract, which could cause unintended functionality:
Please note: Minor or theoretical loss vectors — such as small rounding errors — do not qualify as critical, even if they technically result in direct fund movement. This definition is consistent with HackenProof’s Smart Contract Vulnerability Classification, and final decisions on severity will be made in collaboration with the project team.
We are happy to thank everyone who submits valid reports which help us improve the security. However, only those that meet the following eligibility requirements may receive a monetary reward:
Before starting, ensure you have the following installed on your system:
| Requirement | Version | Installation Link |
|---|---|---|
| Git | Latest | git-scm.com |
| Node.js | v18.x or v20.x | nodejs.org |
| Yarn | Latest | yarnpkg.com |
| Rust | Latest (for Sui CLI) | rustup.rs |
Choose the installation method that works best for your platform:
macOS (Recommended)
brew install sui
All Platforms (via Cargo)
cargo install --locked --git https://github.com/MystenLabs/sui.git --branch devnet sui
Verify Installation
sui --version
# Expected output: sui 1.x.x
Set up your project workspace:
# Create and enter project directory
mkdir bluefin-dex-v3-workspace
cd bluefin-dex-v3-workspace
# Clone all required repositories
git clone https://github.com/hackenproof-public/bluefin-dex-contracts-v3.git
git clone https://github.com/hackenproof-public/library-sui.git
git clone https://github.com/hackenproof-public/pro-tests.git
# Navigate to main project
cd bluefin-dex-contracts-v3
Expected Directory Structure:
bluefin-dex-v3-workspace/
├── bluefin-dex-contracts-v3/ # 📁 Main contracts project
├── library-sui/ # 📁 Sui TypeScript SDK
└── pro-tests/ # 📁 Extended test suite
Create symbolic links to connect dependencies:
# From inside bluefin-dex-contracts-v3/
ln -sf ../library-sui ./library-sui
ln -sf ../pro-tests ./pro-tests
Install all Node.js packages:
# Install main project dependencies
yarn install
# Install library-sui dependencies
cd library-sui && yarn install && cd ..
💡 **Node.js Version Issues? **If you encounter compatibility errors, switch to Node.js 20:
nvm install 20 && nvm use 20
Initialize Sui for devnet development:
sui client
Configuration Prompts:
Request SUI tokens for testing:
sui client faucet
Verify you received tokens:
sui client gas
# You should see ~10 SUI tokens
Create your .env file:
cat > .env << 'EOF'
DEPLOY_ON=devnet
DEPLOYER_PHRASE=your_12_word_recovery_phrase_here
WALLET_SCHEME=ED25519
EOF
⚠️ Replace your_12_word_recovery_phrase_here with the actual recovery phrase from Step 5.
Build the project components in order:
# Build library-sui SDK first
cd library-sui && yarn build && cd ..
# Build smart contracts
yarn build
Deploy contracts and run setup:
# Deploy contracts
yarn deploy
# Execute genesis transaction
yarn genesis
# Setup test environment
yarn setup:tests
💰 Low on SUI? Request more tokens: sui client faucet
Execute the test suite:
yarn test
Expected Output:
Test Executor
✓ Scenario 10-a: Tests a previous reversion when match price and oracle price are wide.
1 passing (11s)