Smart Contracts

As transparently seen on the blockchain.

The USDTDaily smart contract has 3 write functions, 3 read functions, and 2 private functions.

The HPASS smart contract is a fork of BANKKEYNFT.

The smart contracts have already been tested on a VM environment.

USDTDaily and HPASS smart contract links:

USDT Daily: https://bscscan.com/address/0xbbD54D98cf0dD06F194E565521268aB71eD5b56B

HPASS NFT: https://bscscan.com/address/0x1c94C211cCe344938FBAe1f942d046d558D1587f

Write Functions

deposit(uint amount, address ref)

  • receives the amount to be deposited into the smart contract. user must have sufficient balance and allowance set for the contract

  • referral address will default to the dev address if no deposit has been made on the ref address

  • sets user claimable to the current getUserClaimable()

  • sets user checkpoint to block.timestamp

compound()

  • simulates withdraw() and deposit() without any fees

    • calls getUserClaimable()

    • sets user checkpoint to block.timestamp

claim()

  • claim the user's withdrawable amount returned from getUserClaimable()

  • sends the claimable amount to the user

  • sets user checkpoint and claim checkpoint to block.timestamp

  • sets user claimable to 0

Read Functions

getUserClaimable()

  • Gets user current claimable, including referral bonuses

  • calls hasPass() for additional Daily APR

getUserInfo()

  • Gets user total deposit amount and last claim checkpoint

getContractInfo()

  • Gets the current USDT balance of the contract, total users and total deposits

Private Functions

hasPass()

  • calls the nftPass.balanceOf() of NFT smart contract

isActive(address addr)

  • checks if the user has already deposited atleast once

Last updated