BinaryVault Smart Contract Module in Bunzz

The BinayVault module for a Binary Game product holds one underlying token in it for certain time.

You can access this Module and the code here:

How to Use

  1. Deploy smart contract via Bunzz. When deploying, the deployer must set default values of the name, symbol of the Position NFT, underlyingToken, config and admin addresses.
  2. Admin can call pauseVault, unpauseVault, whitelistMarket, setConfig and setAdmin functions to update those configuration variables of the Vault.
  3. Binary Market can call claimBettingRewards function to claim the reward for specific user.
  4. Users can call addNewLiquidityPosition, addLiquidityPosition, removeLiquidityPosition, removeLiquidity and mergeAllPositions functions to manage the bet & liquidity deposited for that specific game.
  5. Users can call getSharesOfUser, getUnderlyingToken, tokensOfOwnerIn, explicitOwnershipsOf and explicitOwnershipOf to manage the position NFTs & shares.



  • claimBettingRewards
  • transferFrom
  • unpauseVault
  • whitelistMarket
  • addNewLiquidityPosition
  • addLiquidityPosition
  • approve
  • removeLiquidityPosition
  • safeTransferFrom
  • safeTransferFrom
  • mergeAllPositions
  • mergePositions
  • pauseVault
  • removeLiquidity
  • setApprovalForAll
  • setConfig
  • setAdmin


  • adminAddress
  • balanceOf
  • totalShareSupply
  • totalSupply
  • underlyingToken
  • whitelistedMarkets
  • config
  • explicitOwnershipOf
  • explicitOwnershipsOf
  • feeAccrued
  • getApproved
  • symbol
  • tokenURI
  • tokensOfOwner
  • tokensOfOwnerIn
  • getSharesOfUser
  • getUnderlyingToken
  • isApprovedForAll
  • name
  • nextTokenId
  • ownerOf
  • paused
  • shareBalances
  • supportsInterface

You can access this Module and the code here:

If you still haven’t signed up to Bunzz, what are you waiting for?

Sign up here and get your smart contracts deployed in 5 minutes through our great GUI.

Share this article: