Decentralized perpetuals with blazing-fast settlement, backed by @Polychain, BH Digital, SIG, and Tower Research.
Target | Type | Severity | Reward |
---|---|---|---|
https://github.com/hackenproof/bluefin-exchange-contracts-sui Copy Copied
!! Only smart contracts residing in the bluefin _ foundation folder (excluding test.move and test_coin.move) are in scope. The rest is there to make testing easier !! Please contact our support team to get access to scope. | Smart Contract | Critical | Bounty |
https://github.com/hackenproof/elixir_bluefin_integration Copy Copied
Please contact our support team to get access to scope. | Smart Contract | Critical | Bounty |
!! Only smart contracts residing in the bluefin _ foundation folder (excluding test.move and test_coin.move) are in scope. The rest is there to make testing easier !!
Please contact our support team to get access to scope.
Please contact our support team to get access to scope.
Only the following impacts are accepted within this bug bounty program. All other impacts are not considered as in-scope, even if they affect something in the assets in scope table.
The following activities are prohibited by this contest event:
For more information, check: https://learn.bluefin.io/docs/
We use Discord as official communication channel: https://bit.ly/3OBQ1QH Join the channel, and create #support ticket to be added for conversation.
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:
The quickest way to install Sui is using the binaries delivered with every release. If you require more control over the install process, you can install from source. To take advantage of containerization, you can utilize the Docker images in the docker folder of the sui repository.
If you use Homebrew, you can install Sui with the following commands:
brew tap mystenlabs/tap
brew install mystenlabs/tap/sui
Each Sui release provides a set of binaries for several operating systems. You can download these binaries from GitHub and use them to install Sui.
The Sui binary takes several minutes to download and install files, so make sure you allocate enough time for it to complete. Actual time to complete depends on your network connection and computer specifications.
Use the following command to install Rust and Cargo on macOS or Linux:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Reference the relevant sections that follow to install each prerequisite individually, or run the following to install them all at once:
sudo apt-get install curl git-all cmake gcc libssl-dev pkg-config libclang-dev libpq-dev build-essential
More information about SUI CLI installation:
https://docs.sui.io/guides/developer/getting-started/sui-install
1.Clone the Bluefin project and navigate to its folder:
git clone https://github.com/hackenproof/bluefin-exchange-contracts-sui.git && cd bluefin-exchange-contracts-sui
2.Clone submodules with the following command:
yarn submodules
3.Navigate to library-sui
submodule directory and build it with yarn
:
cd submodules/library-sui && yarn build
4.From the project root directory execute yarn
to install dependencies.
5.Create SUI wallet:
sui client new-address secp256k1
6.Create .env
file using .env.example
provided. Specify the DEPLOYER\_SEED
(secp256k1) and DEPLOY_ON
(See submodules/library-sui/networks.json for available networks to deploy) The Deployer account must be in sui-client addresses.
cp .env.example .env
After this please follow the following schemes for deploying on testnet/mainnet/local.
In the .env
file set DEPLOY\_ON
parameter to local
or testnet
and ENV
to DEV
Example:
DEPLOY_ON = testnet
ENV = DEV
Join SUI Discord server through the following link: https://discord.gg/sui
Navigate to Sui #devnet-faucet or #testnet-faucet Discord channels and send the following message to receive testnet SUI tokens to cover gas costs
!faucet your_sui_wallet_address
Run following commands to deploy entire project to the testnet
yarn deploy:pyth
yarn deploy
For deploying project to testnet with real pyth or mainnet, please check the official Bluefin documentation:
https://github.com/hackenproof/bluefin-exchange-contracts-sui/tree/main?tab=readme-ov-file#for-deploying-on-testnet-with-real-pyth-1
1.Fund deployer using yarn faucet --account <acct_address>
2.Fund testing accounts using yarn fund:test:accounts
3.Deploy the package using yarn deploy
, Every time any change is made to package, it will need to be re-deployed before running tests
4.Run tests using yarn test
File | Lines of Code |
---|---|
error.move | 282 |
evaluator.move | 320 |
events.move | 56 |
exchange.move | 933 |
funding_rate.move | 164 |
library.move | 199 |
margin_bank.move | 460 |
margin_math.move | 88 |
order.move | 375 |
perpetual.move | 774 |
position.move | 264 |
roles.move | 523 |
signed_number.move | 174 |
test.move | 98 |
test_coin.move | 28 |
vaults.move | 124 |
isolated_adl.move | 292 |
isolated_liquidation.move | 427 |
isolated_trading.move | 456 |
error_pyth.move | 5 |
event.move | 27 |
i64.move | 115 |
price.move | 40 |
price_feed.move | 41 |
price_identifier.move | 17 |
price_info.move | 241 |
pyth.move | 43 |
bluefin_vault.move | 502 |
constants.move | 38 |
distributor.move | 202 |
errors.move | 67 |
events.move | 196 |
maths.move | 12 |
roles.move | 160 |
signed_number.move | 50 |
Total Lines of Code | 7793 |