Skip to main content
The WHBAR contract is a key component of the SaucerSwap protocol, enabling the conversion of native HBAR into wrapped HBAR, and vice versa, thereby inheriting the HTS functionality needed to interact with smart contracts on Hedera. It is specifically designed to be called by the SaucerSwap V1 and V2 core and periphery contracts, as well as the WhbarHelper contract (described in this section). WHBAR is not intended for direct use by developers in other applications due to its specialized nature.

WHBAR contract security advisory

Accounts that use the WHBAR contract directly and meet the following risk conditions expose themselves to loss of funds. The vulnerability described in this notice has existed since a 2023 network update. For funds to be at risk, specific conditions must exist:
  • An account has an open WHBAR allowance granted outside of an atomic transaction.
  • The account is actively holding WHBAR tokens.
  • No protective mechanisms (like those used by SaucerSwap or WhbarHelper contracts) are in place.
For more information, see the WHBAR contract security advisory blog post.

Next steps

Wrap HBAR for WHBAR

Deposit HBAR and receive WHBAR at 1:1.

Unwrap WHBAR for HBAR

Withdraw WHBAR back to native HBAR.

Contract deployments

WHBAR and WhbarHelper IDs for mainnet and testnet.