PRüF Staking - Smart Contract Audit Report

Summary

PRüF Staking PRüF is an asset provenance platform. Using PRüF, you can be sure that the products you buy online or on the street are genuine, not fakes or copies. Each item you tokenize with PRüF is privately and provably yours, making it resistant to loss and theft.

We previously reviewed the project's core platform here.

For this audit, we reviewed PRüF's staking contracts at commit 5cbfffef2dd4046d4616cc4e050c01ce0a92fbe6 on GitHub.

    Notes on the EO Staking Contract:
  • Users can stake their tokens in this contract to earn further tokens as rewards.
  • Different staking tiers exist with different reward rates based upon the amount of tokens a user stakes.
  • All deposits must fall into a staking tier; meaning there is an enforced minimum and maximum deposit amount and user's reward rates may differ based on the tier their stake is in.
  • Upon staking, a user's tokens will be locked in the contract for a set amount of time and the user will receive a stake token representing their stake in the contract.
  • Users who hold stake tokens can claim rewards every 24 hours.
  • Users can also increase their stake at any time. When doing so, their rewards will be claimed as well.
  • Upon withdrawing from the contract, the user's stake token will be burned and the user's rewards will also be claimed.
  • The team can update the stake and reward intervals for different tiers at any time. At most, the interval can be set to two days.
  • The team can set addresses to have a "Pauser" role, which can pause deposits to and withdrawals from the contract as well as the claiming of rewards.
  • The team also has the ability to end staking rewards at any time.
  • The team should ensure the seconds_in_a_day is properly set prior to deployment.
  • The team can update the addresses of the contracts used by this contract.

  • Notes on the Pruf Staking Token:
  • The token is an ERC721 token which represents a user's stake.
  • The token can only be minted and burned by addresses with the "Minter" role; designed to be the EO Staking contract.
  • The staking token is minted to a depositer when the user stakes into the EO Staking contract.
  • The team can set addresses to have a "Pauser" role, which can pause transfers of the staking token.

  • Notes on the Pruf Rewards Vault
  • The address with the "Stake Payer" role will have the ability to send utility tokens in the contract to the owner of the stake token.
  • The team can set addresses to have a "Pauser" role, which can pause deposits to and withdrawals from the contract.
  • The team can update the addresses of the contracts used by the vault.

  • Notes on the Pruf Stake Vault
  • This contract holds tokens staked through the EO contract.
  • Addresses with the "Stake Admin" role can move tokens in and out of the contract; designed to be used by the EO contract.
  • The team can set addresses to have a "Pauser" role, which can pause deposits to and withdrawals from the contract.
  • The team can update the addresses of the contracts used by the vault.
Audit Findings Summary:
  • No security issues from external attackers were identified.
  • Solidity 0.8.x is used across all contracts to prevent overflow issues and ReentrancyGuard is used in relevant locations.
  • The logic follows the checks-effects-interactions deisgn pattern to ensure safe execution.
  • Ensure trust in the team as they have notable control in the ecosystem
  • Date: August 10th, 2021
  • Update Date: September 5th, 2021 - Added features to the EO Staking contract and some other updates to streamline logic. Codebase re-reviewed.

Combined Audit Results

Vulnerability CategoryNotesResult
Arbitrary Storage WriteN/APASS
Arbitrary JumpN/APASS
Delegate Call to Untrusted ContractN/APASS
Dependence on Predictable VariablesN/APASS
Deprecated OpcodesN/APASS
Ether ThiefN/APASS
ExceptionsN/APASS
External CallsN/APASS
Integer Over/UnderflowN/APASS
Multiple SendsN/APASS
SuicideN/APASS
State Change External CallsN/APASS
Unchecked RetvalN/APASS
User Supplied AssertionN/APASS
Critical Solidity CompilerN/APASS
Overall Contract Safety PASS


PRUF EO STAKING

Inheritence Chart

Smart Contract Inheritance

Functions Overview


 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public

 + [Int] UTIL_TKN_Interface 
    - [Ext] killTrustedAgent #
    - [Ext] setColdWallet #
    - [Ext] unSetColdWallet #
    - [Ext] isColdWallet #
    - [Ext] AdminSetSharesAddress #
    - [Ext] payForService #
    - [Ext] trustedAgentBurn #
    - [Ext] trustedAgentTransfer #
    - [Ext] takeSnapshot #
    - [Ext] mint #
    - [Ext] pause #
    - [Ext] unpause #
    - [Ext] balanceOfAt #
    - [Ext] totalSupplyAt #
    - [Ext] totalSupply #
    - [Ext] balanceOf #
    - [Ext] transfer #
    - [Ext] allowance #
    - [Ext] approve #
    - [Ext] transferFrom #
    - [Ext] increaseAllowance #
    - [Ext] decreaseAllowance #
    - [Ext] burn #
    - [Ext] burnFrom #
    - [Ext] cap #
    - [Ext] hasRole #
    - [Ext] getRoleMemberCount #
    - [Ext] getRoleMember #
    - [Ext] getRoleAdmin #
    - [Ext] grantRole #
    - [Ext] revokeRole #
    - [Ext] renounceRole #

 + [Int] AC_TKN_Interface 
    - [Ext] mintACToken #
    - [Ext] transferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] ownerOf
    - [Ext] tokenExists
    - [Ext] balanceOf #
    - [Ext] name
    - [Ext] symbol
    - [Ext] tokenURI
    - [Ext] totalSupply
    - [Ext] tokenOfOwnerByIndex
    - [Ext] tokenByIndex

 + [Int] STAKE_TKN_Interface 
    - [Ext] mintStakeToken #
    - [Ext] burnStakeToken #
    - [Ext] transferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] ownerOf
    - [Ext] tokenExists
    - [Ext] balanceOf #
    - [Ext] name
    - [Ext] symbol
    - [Ext] tokenURI
    - [Ext] totalSupply
    - [Ext] tokenOfOwnerByIndex
    - [Ext] tokenByIndex

 + [Int] A_TKN_Interface 
    - [Ext] OO_setStorageContract #
    - [Ext] Admin_resolveContractAddresses #
    - [Ext] mintAssetToken #
    - [Ext] setURI #
    - [Ext] tokenExists
    - [Ext] transferFrom #
    - [Ext] trustedAgentTransferFrom #
    - [Ext] trustedAgentBurn #
    - [Ext] safeTransferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] discard #
    - [Ext] isColdWallet #
    - [Ext] ownerOf #
    - [Ext] balanceOf #
    - [Ext] name #
    - [Ext] symbol #
    - [Ext] tokenURI #
    - [Ext] totalSupply #
    - [Ext] tokenOfOwnerByIndex #
    - [Ext] tokenByIndex #

 + [Int] ID_TKN_Interface 
    - [Ext] mintPRUF_IDToken #
    - [Ext] reMintPRUF_IDToken #
    - [Ext] tokenExists
    - [Ext] transferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] setTrustLevel #
    - [Ext] IdData
    - [Ext] trustedLevel
    - [Ext] trustedLevelByAddress
    - [Ext] ownerOf
    - [Ext] balanceOf #
    - [Ext] name
    - [Ext] symbol
    - [Ext] tokenURI
    - [Ext] totalSupply
    - [Ext] tokenOfOwnerByIndex
    - [Ext] tokenByIndex

 + [Int] AC_MGR_Interface 
    - [Ext] transferName #
    - [Ext] AdminModAssetClass #
    - [Ext] createAssetClass #
    - [Ext] purchaseACnode #
    - [Ext] addUser #
    - [Ext] updateACname #
    - [Ext] updateNodeCAS #
    - [Ext] ACTH_setCosts #
    - [Ext] updateACImmutable #
    - [Ext] getSwitchAt #
    - [Ext] getUserType
    - [Ext] getManagementTypeStatus
    - [Ext] getStorageProviderStatus
    - [Ext] getCustodyTypeStatus
    - [Ext] getExtAC_data
    - [Ext] isSameRootAC
    - [Ext] getAC_name
    - [Ext] resolveAssetClass
    - [Ext] currentACpricingInfo
    - [Ext] getServiceCosts
    - [Ext] getAC_discount

 + [Int] STOR_Interface 
    - [Ext] pause #
    - [Ext] unpause #
    - [Ext] OO_addContract #
    - [Ext] enableDefaultContractsForAC #
    - [Ext] enableContractForAC #
    - [Ext] newRecord #
    - [Ext] modifyRecord #
    - [Ext] changeAC #
    - [Ext] setLostOrStolen #
    - [Ext] setEscrow #
    - [Ext] endEscrow #
    - [Ext] setPrice #
    - [Ext] clearPrice #
    - [Ext] modifyIpfs1 #
    - [Ext] modifyIpfs2 #
    - [Ext] retrieveRecord #
    - [Ext] retrieveShortRecord
    - [Ext] getPriceData
    - [Ext] _verifyRightsHolder
    - [Ext] blockchainVerifyRightsHolder #
    - [Ext] resolveContractAddress
    - [Ext] ContractInfoHash

 + [Int] ECR_MGR_Interface 
    - [Ext] setEscrow #
    - [Ext] endEscrow #
    - [Ext] setEscrowDataLight #
    - [Ext] setEscrowDataHeavy #
    - [Ext] permissiveEndEscrow #
    - [Ext] retrieveEscrowOwner #
    - [Ext] retrieveEscrowData #
    - [Ext] retrieveEscrowDataLight
    - [Ext] retrieveEscrowDataHeavy

 + [Int] RCLR_Interface 
    - [Ext] discard #
    - [Ext] recycle #

 + [Int] APP_Interface 
    - [Ext] transferAssetToken #

 + [Int] APP_NC_Interface 
    - [Ext] transferAssetToken #

 + [Int] EO_STAKING_Interface 
    - [Ext] claimBonus #
    - [Ext] breakStake #
    - [Ext] eligibleRewards #
    - [Ext] stakeInfo #

 + [Int] STAKE_VAULT_Interface 
    - [Ext] takeStake #
    - [Ext] releaseStake #
    - [Ext] stakeOfToken #

 + [Int] REWARDS_VAULT_Interface 
    - [Ext] payRewards #

 + [Lib] EnumerableSet 
    - [Prv] _add #
    - [Prv] _remove #
    - [Prv] _contains
    - [Prv] _length
    - [Prv] _at
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at

 + [Lib] Address 
    - [Int] isContract
    - [Int] sendValue #
    - [Int] functionCall #
    - [Int] functionCall #
    - [Int] functionCallWithValue #
    - [Int] functionCallWithValue #
    - [Int] functionStaticCall
    - [Int] functionStaticCall
    - [Int] functionDelegateCall #
    - [Int] functionDelegateCall #
    - [Prv] _verifyCallResult

 +  Context 
    - [Int] _msgSender
    - [Int] _msgData

 +  AccessControl (Context)
    - [Pub] hasRole
    - [Pub] getRoleMemberCount
    - [Pub] getRoleMember
    - [Pub] getRoleAdmin
    - [Pub] grantRole #
    - [Pub] revokeRole #
    - [Pub] renounceRole #
    - [Int] _setupRole #
    - [Int] _setRoleAdmin #
    - [Prv] _grantRole #
    - [Prv] _revokeRole #

 +  Pausable (Context)
    - [Pub]  #
    - [Pub] paused
    - [Int] _pause #
       - modifiers: whenNotPaused
    - [Int] _unpause #
       - modifiers: whenPaused

 +  ReentrancyGuard 
    - [Pub]  #

 + [Int] IERC165 
    - [Ext] supportsInterface

 + [Int] IERC721 (IERC165)
    - [Ext] balanceOf
    - [Ext] ownerOf
    - [Ext] safeTransferFrom #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] getApproved
    - [Ext] setApprovalForAll #
    - [Ext] isApprovedForAll
    - [Ext] safeTransferFrom #

 +  EO_STAKING (ReentrancyGuard, AccessControl, Pausable)
    - [Pub]  #
    - [Ext] transferERC721Token #
       - modifiers: nonReentrant
    - [Ext] Admin_setTokenContracts #
       - modifiers: isContractAdmin
    - [Ext] setStakeLevels #
       - modifiers: isContractAdmin
    - [Ext] stakeMyTokens #
    - [Pub] claimBonus #
       - modifiers: isStakeHolder,whenNotPaused,nonReentrant
    - [Pub] breakStake #
       - modifiers: isStakeHolder,whenNotPaused,nonReentrant
    - [Pub] eligibleRewards
    - [Pub] checkEligibleRewards
    - [Pub] stakeInfo
    - [Ext] getStakeLevel
    - [Ext] pause #
       - modifiers: isPauser
    - [Ext] unpause #
       - modifiers: isPauser
    - [Prv] newStake #
       - modifiers: whenNotPaused,nonReentrant


PRUF REWARDS VAULT


Inheritence Chart

Smart Contract Inheritance

Functions Overview



 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public

 + [Int] UTIL_TKN_Interface 
    - [Ext] killTrustedAgent #
    - [Ext] setColdWallet #
    - [Ext] unSetColdWallet #
    - [Ext] isColdWallet #
    - [Ext] AdminSetSharesAddress #
    - [Ext] payForService #
    - [Ext] trustedAgentBurn #
    - [Ext] trustedAgentTransfer #
    - [Ext] takeSnapshot #
    - [Ext] mint #
    - [Ext] pause #
    - [Ext] unpause #
    - [Ext] balanceOfAt #
    - [Ext] totalSupplyAt #
    - [Ext] totalSupply #
    - [Ext] balanceOf #
    - [Ext] transfer #
    - [Ext] allowance #
    - [Ext] approve #
    - [Ext] transferFrom #
    - [Ext] increaseAllowance #
    - [Ext] decreaseAllowance #
    - [Ext] burn #
    - [Ext] burnFrom #
    - [Ext] cap #
    - [Ext] hasRole #
    - [Ext] getRoleMemberCount #
    - [Ext] getRoleMember #
    - [Ext] getRoleAdmin #
    - [Ext] grantRole #
    - [Ext] revokeRole #
    - [Ext] renounceRole #

 + [Int] AC_TKN_Interface 
    - [Ext] mintACToken #
    - [Ext] transferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] ownerOf
    - [Ext] tokenExists
    - [Ext] balanceOf #
    - [Ext] name
    - [Ext] symbol
    - [Ext] tokenURI
    - [Ext] totalSupply
    - [Ext] tokenOfOwnerByIndex
    - [Ext] tokenByIndex

 + [Int] STAKE_TKN_Interface 
    - [Ext] mintStakeToken #
    - [Ext] burnStakeToken #
    - [Ext] transferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] ownerOf
    - [Ext] tokenExists
    - [Ext] balanceOf #
    - [Ext] name
    - [Ext] symbol
    - [Ext] tokenURI
    - [Ext] totalSupply
    - [Ext] tokenOfOwnerByIndex
    - [Ext] tokenByIndex

 + [Int] A_TKN_Interface 
    - [Ext] OO_setStorageContract #
    - [Ext] Admin_resolveContractAddresses #
    - [Ext] mintAssetToken #
    - [Ext] setURI #
    - [Ext] tokenExists
    - [Ext] transferFrom #
    - [Ext] trustedAgentTransferFrom #
    - [Ext] trustedAgentBurn #
    - [Ext] safeTransferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] discard #
    - [Ext] isColdWallet #
    - [Ext] ownerOf #
    - [Ext] balanceOf #
    - [Ext] name #
    - [Ext] symbol #
    - [Ext] tokenURI #
    - [Ext] totalSupply #
    - [Ext] tokenOfOwnerByIndex #
    - [Ext] tokenByIndex #

 + [Int] ID_TKN_Interface 
    - [Ext] mintPRUF_IDToken #
    - [Ext] reMintPRUF_IDToken #
    - [Ext] tokenExists
    - [Ext] transferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] setTrustLevel #
    - [Ext] IdData
    - [Ext] trustedLevel
    - [Ext] trustedLevelByAddress
    - [Ext] ownerOf
    - [Ext] balanceOf #
    - [Ext] name
    - [Ext] symbol
    - [Ext] tokenURI
    - [Ext] totalSupply
    - [Ext] tokenOfOwnerByIndex
    - [Ext] tokenByIndex

 + [Int] AC_MGR_Interface 
    - [Ext] transferName #
    - [Ext] AdminModAssetClass #
    - [Ext] createAssetClass #
    - [Ext] purchaseACnode #
    - [Ext] addUser #
    - [Ext] updateACname #
    - [Ext] updateNodeCAS #
    - [Ext] ACTH_setCosts #
    - [Ext] updateACImmutable #
    - [Ext] getSwitchAt #
    - [Ext] getUserType
    - [Ext] getManagementTypeStatus
    - [Ext] getStorageProviderStatus
    - [Ext] getCustodyTypeStatus
    - [Ext] getExtAC_data
    - [Ext] isSameRootAC
    - [Ext] getAC_name
    - [Ext] resolveAssetClass
    - [Ext] currentACpricingInfo
    - [Ext] getServiceCosts
    - [Ext] getAC_discount

 + [Int] STOR_Interface 
    - [Ext] pause #
    - [Ext] unpause #
    - [Ext] OO_addContract #
    - [Ext] enableDefaultContractsForAC #
    - [Ext] enableContractForAC #
    - [Ext] newRecord #
    - [Ext] modifyRecord #
    - [Ext] changeAC #
    - [Ext] setLostOrStolen #
    - [Ext] setEscrow #
    - [Ext] endEscrow #
    - [Ext] setPrice #
    - [Ext] clearPrice #
    - [Ext] modifyIpfs1 #
    - [Ext] modifyIpfs2 #
    - [Ext] retrieveRecord #
    - [Ext] retrieveShortRecord
    - [Ext] getPriceData
    - [Ext] _verifyRightsHolder
    - [Ext] blockchainVerifyRightsHolder #
    - [Ext] resolveContractAddress
    - [Ext] ContractInfoHash

 + [Int] ECR_MGR_Interface 
    - [Ext] setEscrow #
    - [Ext] endEscrow #
    - [Ext] setEscrowDataLight #
    - [Ext] setEscrowDataHeavy #
    - [Ext] permissiveEndEscrow #
    - [Ext] retrieveEscrowOwner #
    - [Ext] retrieveEscrowData #
    - [Ext] retrieveEscrowDataLight
    - [Ext] retrieveEscrowDataHeavy

 + [Int] RCLR_Interface 
    - [Ext] discard #
    - [Ext] recycle #

 + [Int] APP_Interface 
    - [Ext] transferAssetToken #

 + [Int] APP_NC_Interface 
    - [Ext] transferAssetToken #

 + [Int] EO_STAKING_Interface 
    - [Ext] claimBonus #
    - [Ext] breakStake #
    - [Ext] eligibleRewards #
    - [Ext] stakeInfo #

 + [Int] STAKE_VAULT_Interface 
    - [Ext] takeStake #
    - [Ext] releaseStake #
    - [Ext] stakeOfToken #

 + [Int] REWARDS_VAULT_Interface 
    - [Ext] payRewards #

 + [Lib] EnumerableSet 
    - [Prv] _add #
    - [Prv] _remove #
    - [Prv] _contains
    - [Prv] _length
    - [Prv] _at
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at

 + [Lib] Address 
    - [Int] isContract
    - [Int] sendValue #
    - [Int] functionCall #
    - [Int] functionCall #
    - [Int] functionCallWithValue #
    - [Int] functionCallWithValue #
    - [Int] functionStaticCall
    - [Int] functionStaticCall
    - [Int] functionDelegateCall #
    - [Int] functionDelegateCall #
    - [Prv] _verifyCallResult

 +  Context 
    - [Int] _msgSender
    - [Int] _msgData

 +  AccessControl (Context)
    - [Pub] hasRole
    - [Pub] getRoleMemberCount
    - [Pub] getRoleMember
    - [Pub] getRoleAdmin
    - [Pub] grantRole #
    - [Pub] revokeRole #
    - [Pub] renounceRole #
    - [Int] _setupRole #
    - [Int] _setRoleAdmin #
    - [Prv] _grantRole #
    - [Prv] _revokeRole #

 +  Pausable (Context)
    - [Pub]  #
    - [Pub] paused
    - [Int] _pause #
       - modifiers: whenNotPaused
    - [Int] _unpause #
       - modifiers: whenPaused

 +  ReentrancyGuard 
    - [Pub]  #

 + [Int] IERC165 
    - [Ext] supportsInterface

 + [Int] IERC721 (IERC165)
    - [Ext] balanceOf
    - [Ext] ownerOf
    - [Ext] safeTransferFrom #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] getApproved
    - [Ext] setApprovalForAll #
    - [Ext] isApprovedForAll
    - [Ext] safeTransferFrom #

 +  REWARDS_VAULT (ReentrancyGuard, AccessControl, Pausable)
    - [Pub]  #
    - [Ext] Admin_setTokenContracts #
       - modifiers: isContractAdmin
    - [Ext] payRewards #
       - modifiers: whenNotPaused,nonReentrant,isStakePayer
    - [Ext] transferERC721Token #
       - modifiers: nonReentrant
    - [Ext] pause #
       - modifiers: isPauser
    - [Ext] unpause #
       - modifiers: isPauser


PRUF STAKE TKN


Inheritence Chart

Smart Contract Inheritance

Functions Overview


 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public

 + [Int] UTIL_TKN_Interface 
    - [Ext] killTrustedAgent #
    - [Ext] setColdWallet #
    - [Ext] unSetColdWallet #
    - [Ext] isColdWallet #
    - [Ext] AdminSetSharesAddress #
    - [Ext] payForService #
    - [Ext] trustedAgentBurn #
    - [Ext] trustedAgentTransfer #
    - [Ext] takeSnapshot #
    - [Ext] mint #
    - [Ext] pause #
    - [Ext] unpause #
    - [Ext] balanceOfAt #
    - [Ext] totalSupplyAt #
    - [Ext] totalSupply #
    - [Ext] balanceOf #
    - [Ext] transfer #
    - [Ext] allowance #
    - [Ext] approve #
    - [Ext] transferFrom #
    - [Ext] increaseAllowance #
    - [Ext] decreaseAllowance #
    - [Ext] burn #
    - [Ext] burnFrom #
    - [Ext] cap #
    - [Ext] hasRole #
    - [Ext] getRoleMemberCount #
    - [Ext] getRoleMember #
    - [Ext] getRoleAdmin #
    - [Ext] grantRole #
    - [Ext] revokeRole #
    - [Ext] renounceRole #

 + [Int] AC_TKN_Interface 
    - [Ext] mintACToken #
    - [Ext] transferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] ownerOf
    - [Ext] tokenExists
    - [Ext] balanceOf #
    - [Ext] name
    - [Ext] symbol
    - [Ext] tokenURI
    - [Ext] totalSupply
    - [Ext] tokenOfOwnerByIndex
    - [Ext] tokenByIndex

 + [Int] STAKE_TKN_Interface 
    - [Ext] mintStakeToken #
    - [Ext] burnStakeToken #
    - [Ext] transferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] ownerOf
    - [Ext] tokenExists
    - [Ext] balanceOf #
    - [Ext] name
    - [Ext] symbol
    - [Ext] tokenURI
    - [Ext] totalSupply
    - [Ext] tokenOfOwnerByIndex
    - [Ext] tokenByIndex

 + [Int] A_TKN_Interface 
    - [Ext] OO_setStorageContract #
    - [Ext] Admin_resolveContractAddresses #
    - [Ext] mintAssetToken #
    - [Ext] setURI #
    - [Ext] tokenExists
    - [Ext] transferFrom #
    - [Ext] trustedAgentTransferFrom #
    - [Ext] trustedAgentBurn #
    - [Ext] safeTransferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] discard #
    - [Ext] isColdWallet #
    - [Ext] ownerOf #
    - [Ext] balanceOf #
    - [Ext] name #
    - [Ext] symbol #
    - [Ext] tokenURI #
    - [Ext] totalSupply #
    - [Ext] tokenOfOwnerByIndex #
    - [Ext] tokenByIndex #

 + [Int] ID_TKN_Interface 
    - [Ext] mintPRUF_IDToken #
    - [Ext] reMintPRUF_IDToken #
    - [Ext] tokenExists
    - [Ext] transferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] setTrustLevel #
    - [Ext] IdData
    - [Ext] trustedLevel
    - [Ext] trustedLevelByAddress
    - [Ext] ownerOf
    - [Ext] balanceOf #
    - [Ext] name
    - [Ext] symbol
    - [Ext] tokenURI
    - [Ext] totalSupply
    - [Ext] tokenOfOwnerByIndex
    - [Ext] tokenByIndex

 + [Int] AC_MGR_Interface 
    - [Ext] transferName #
    - [Ext] AdminModAssetClass #
    - [Ext] createAssetClass #
    - [Ext] purchaseACnode #
    - [Ext] addUser #
    - [Ext] updateACname #
    - [Ext] updateNodeCAS #
    - [Ext] ACTH_setCosts #
    - [Ext] updateACImmutable #
    - [Ext] getSwitchAt #
    - [Ext] getUserType
    - [Ext] getManagementTypeStatus
    - [Ext] getStorageProviderStatus
    - [Ext] getCustodyTypeStatus
    - [Ext] getExtAC_data
    - [Ext] isSameRootAC
    - [Ext] getAC_name
    - [Ext] resolveAssetClass
    - [Ext] currentACpricingInfo
    - [Ext] getServiceCosts
    - [Ext] getAC_discount

 + [Int] STOR_Interface 
    - [Ext] pause #
    - [Ext] unpause #
    - [Ext] OO_addContract #
    - [Ext] enableDefaultContractsForAC #
    - [Ext] enableContractForAC #
    - [Ext] newRecord #
    - [Ext] modifyRecord #
    - [Ext] changeAC #
    - [Ext] setLostOrStolen #
    - [Ext] setEscrow #
    - [Ext] endEscrow #
    - [Ext] setPrice #
    - [Ext] clearPrice #
    - [Ext] modifyIpfs1 #
    - [Ext] modifyIpfs2 #
    - [Ext] retrieveRecord #
    - [Ext] retrieveShortRecord
    - [Ext] getPriceData
    - [Ext] _verifyRightsHolder
    - [Ext] blockchainVerifyRightsHolder #
    - [Ext] resolveContractAddress
    - [Ext] ContractInfoHash

 + [Int] ECR_MGR_Interface 
    - [Ext] setEscrow #
    - [Ext] endEscrow #
    - [Ext] setEscrowDataLight #
    - [Ext] setEscrowDataHeavy #
    - [Ext] permissiveEndEscrow #
    - [Ext] retrieveEscrowOwner #
    - [Ext] retrieveEscrowData #
    - [Ext] retrieveEscrowDataLight
    - [Ext] retrieveEscrowDataHeavy

 + [Int] RCLR_Interface 
    - [Ext] discard #
    - [Ext] recycle #

 + [Int] APP_Interface 
    - [Ext] transferAssetToken #

 + [Int] APP_NC_Interface 
    - [Ext] transferAssetToken #

 + [Int] EO_STAKING_Interface 
    - [Ext] claimBonus #
    - [Ext] breakStake #
    - [Ext] eligibleRewards #
    - [Ext] stakeInfo #

 + [Int] STAKE_VAULT_Interface 
    - [Ext] takeStake #
    - [Ext] releaseStake #
    - [Ext] stakeOfToken #

 + [Int] REWARDS_VAULT_Interface 
    - [Ext] payRewards #

 + [Lib] EnumerableSet 
    - [Prv] _add #
    - [Prv] _remove #
    - [Prv] _contains
    - [Prv] _length
    - [Prv] _at
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at

 + [Lib] Address 
    - [Int] isContract
    - [Int] sendValue #
    - [Int] functionCall #
    - [Int] functionCall #
    - [Int] functionCallWithValue #
    - [Int] functionCallWithValue #
    - [Int] functionStaticCall
    - [Int] functionStaticCall
    - [Int] functionDelegateCall #
    - [Int] functionDelegateCall #
    - [Prv] _verifyCallResult

 +  Context 
    - [Int] _msgSender
    - [Int] _msgData

 +  AccessControl (Context)
    - [Pub] hasRole
    - [Pub] getRoleMemberCount
    - [Pub] getRoleMember
    - [Pub] getRoleAdmin
    - [Pub] grantRole #
    - [Pub] revokeRole #
    - [Pub] renounceRole #
    - [Int] _setupRole #
    - [Int] _setRoleAdmin #
    - [Prv] _grantRole #
    - [Prv] _revokeRole #

 + [Lib] Counters 
    - [Int] current
    - [Int] increment #
    - [Int] decrement #

 +  ReentrancyGuard 
    - [Pub]  #

 + [Int] IERC165 
    - [Ext] supportsInterface

 + [Int] IERC721 (IERC165)
    - [Ext] balanceOf
    - [Ext] ownerOf
    - [Ext] safeTransferFrom #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] getApproved
    - [Ext] setApprovalForAll #
    - [Ext] isApprovedForAll
    - [Ext] safeTransferFrom #

 + [Int] IERC721Metadata (IERC721)
    - [Ext] name
    - [Ext] symbol
    - [Ext] tokenURI

 + [Int] IERC721Enumerable (IERC721)
    - [Ext] totalSupply
    - [Ext] tokenOfOwnerByIndex
    - [Ext] tokenByIndex

 + [Int] IERC721Receiver 
    - [Ext] onERC721Received #

 +  ERC165 (IERC165)
    - [Pub] supportsInterface

 + [Lib] EnumerableMap 
    - [Prv] _set #
    - [Prv] _remove #
    - [Prv] _contains
    - [Prv] _length
    - [Prv] _at
    - [Prv] _tryGet
    - [Prv] _get
    - [Prv] _get
    - [Int] set #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] tryGet
    - [Int] get
    - [Int] get

 + [Lib] Strings 
    - [Int] toString
    - [Int] toHexString
    - [Int] toHexString

 +  ERC721 (Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable)
    - [Pub]  #
    - [Pub] supportsInterface
    - [Pub] balanceOf
    - [Pub] ownerOf
    - [Pub] name
    - [Pub] symbol
    - [Pub] tokenURI
    - [Pub] baseURI
    - [Pub] tokenOfOwnerByIndex
    - [Pub] totalSupply
    - [Pub] tokenByIndex
    - [Pub] approve #
    - [Pub] getApproved
    - [Pub] setApprovalForAll #
    - [Pub] isApprovedForAll
    - [Pub] transferFrom #
    - [Pub] safeTransferFrom #
    - [Pub] safeTransferFrom #
    - [Int] _safeTransfer #
    - [Int] _exists
    - [Int] _isApprovedOrOwner
    - [Int] _safeMint #
    - [Int] _safeMint #
    - [Int] _mint #
    - [Int] _burn #
    - [Int] _transfer #
    - [Int] _setTokenURI #
    - [Int] _setBaseURI #
    - [Prv] _checkOnERC721Received #
    - [Prv] _approve #
    - [Int] _beforeTokenTransfer #

 +  ERC721Burnable (Context, ERC721)
    - [Pub] burn #

 +  Pausable (Context)
    - [Pub]  #
    - [Pub] paused
    - [Int] _pause #
       - modifiers: whenNotPaused
    - [Int] _unpause #
       - modifiers: whenPaused

 +  ERC721Pausable (ERC721, Pausable)
    - [Int] _beforeTokenTransfer #

 +  STAKE_TKN (ReentrancyGuard, Context, AccessControl, ERC721Burnable, ERC721Pausable)
    - [Pub]  #
       - modifiers: ERC721
    - [Ext] mintStakeToken #
       - modifiers: isMinter,nonReentrant
    - [Ext] burnStakeToken #
       - modifiers: isMinter,nonReentrant
    - [Pub] transferFrom #
       - modifiers: nonReentrant,whenNotPaused
    - [Pub] safeTransferFrom #
       - modifiers: whenNotPaused
    - [Pub] safeTransferFrom #
       - modifiers: nonReentrant,whenNotPaused
    - [Pub] pause #
    - [Pub] unpause #
    - [Int] _beforeTokenTransfer #


PRUF STAKE VAULT


Inheritence Chart

Smart Contract Inheritance

Functions Overview


 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public

 + [Int] UTIL_TKN_Interface 
    - [Ext] killTrustedAgent #
    - [Ext] setColdWallet #
    - [Ext] unSetColdWallet #
    - [Ext] isColdWallet #
    - [Ext] AdminSetSharesAddress #
    - [Ext] payForService #
    - [Ext] trustedAgentBurn #
    - [Ext] trustedAgentTransfer #
    - [Ext] takeSnapshot #
    - [Ext] mint #
    - [Ext] pause #
    - [Ext] unpause #
    - [Ext] balanceOfAt #
    - [Ext] totalSupplyAt #
    - [Ext] totalSupply #
    - [Ext] balanceOf #
    - [Ext] transfer #
    - [Ext] allowance #
    - [Ext] approve #
    - [Ext] transferFrom #
    - [Ext] increaseAllowance #
    - [Ext] decreaseAllowance #
    - [Ext] burn #
    - [Ext] burnFrom #
    - [Ext] cap #
    - [Ext] hasRole #
    - [Ext] getRoleMemberCount #
    - [Ext] getRoleMember #
    - [Ext] getRoleAdmin #
    - [Ext] grantRole #
    - [Ext] revokeRole #
    - [Ext] renounceRole #

 + [Int] AC_TKN_Interface 
    - [Ext] mintACToken #
    - [Ext] transferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] ownerOf
    - [Ext] tokenExists
    - [Ext] balanceOf #
    - [Ext] name
    - [Ext] symbol
    - [Ext] tokenURI
    - [Ext] totalSupply
    - [Ext] tokenOfOwnerByIndex
    - [Ext] tokenByIndex

 + [Int] STAKE_TKN_Interface 
    - [Ext] mintStakeToken #
    - [Ext] burnStakeToken #
    - [Ext] transferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] ownerOf
    - [Ext] tokenExists
    - [Ext] balanceOf #
    - [Ext] name
    - [Ext] symbol
    - [Ext] tokenURI
    - [Ext] totalSupply
    - [Ext] tokenOfOwnerByIndex
    - [Ext] tokenByIndex

 + [Int] A_TKN_Interface 
    - [Ext] OO_setStorageContract #
    - [Ext] Admin_resolveContractAddresses #
    - [Ext] mintAssetToken #
    - [Ext] setURI #
    - [Ext] tokenExists
    - [Ext] transferFrom #
    - [Ext] trustedAgentTransferFrom #
    - [Ext] trustedAgentBurn #
    - [Ext] safeTransferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] discard #
    - [Ext] isColdWallet #
    - [Ext] ownerOf #
    - [Ext] balanceOf #
    - [Ext] name #
    - [Ext] symbol #
    - [Ext] tokenURI #
    - [Ext] totalSupply #
    - [Ext] tokenOfOwnerByIndex #
    - [Ext] tokenByIndex #

 + [Int] ID_TKN_Interface 
    - [Ext] mintPRUF_IDToken #
    - [Ext] reMintPRUF_IDToken #
    - [Ext] tokenExists
    - [Ext] transferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] safeTransferFrom #
    - [Ext] setTrustLevel #
    - [Ext] IdData
    - [Ext] trustedLevel
    - [Ext] trustedLevelByAddress
    - [Ext] ownerOf
    - [Ext] balanceOf #
    - [Ext] name
    - [Ext] symbol
    - [Ext] tokenURI
    - [Ext] totalSupply
    - [Ext] tokenOfOwnerByIndex
    - [Ext] tokenByIndex

 + [Int] AC_MGR_Interface 
    - [Ext] transferName #
    - [Ext] AdminModAssetClass #
    - [Ext] createAssetClass #
    - [Ext] purchaseACnode #
    - [Ext] addUser #
    - [Ext] updateACname #
    - [Ext] updateNodeCAS #
    - [Ext] ACTH_setCosts #
    - [Ext] updateACImmutable #
    - [Ext] getSwitchAt #
    - [Ext] getUserType
    - [Ext] getManagementTypeStatus
    - [Ext] getStorageProviderStatus
    - [Ext] getCustodyTypeStatus
    - [Ext] getExtAC_data
    - [Ext] isSameRootAC
    - [Ext] getAC_name
    - [Ext] resolveAssetClass
    - [Ext] currentACpricingInfo
    - [Ext] getServiceCosts
    - [Ext] getAC_discount

 + [Int] STOR_Interface 
    - [Ext] pause #
    - [Ext] unpause #
    - [Ext] OO_addContract #
    - [Ext] enableDefaultContractsForAC #
    - [Ext] enableContractForAC #
    - [Ext] newRecord #
    - [Ext] modifyRecord #
    - [Ext] changeAC #
    - [Ext] setLostOrStolen #
    - [Ext] setEscrow #
    - [Ext] endEscrow #
    - [Ext] setPrice #
    - [Ext] clearPrice #
    - [Ext] modifyIpfs1 #
    - [Ext] modifyIpfs2 #
    - [Ext] retrieveRecord #
    - [Ext] retrieveShortRecord
    - [Ext] getPriceData
    - [Ext] _verifyRightsHolder
    - [Ext] blockchainVerifyRightsHolder #
    - [Ext] resolveContractAddress
    - [Ext] ContractInfoHash

 + [Int] ECR_MGR_Interface 
    - [Ext] setEscrow #
    - [Ext] endEscrow #
    - [Ext] setEscrowDataLight #
    - [Ext] setEscrowDataHeavy #
    - [Ext] permissiveEndEscrow #
    - [Ext] retrieveEscrowOwner #
    - [Ext] retrieveEscrowData #
    - [Ext] retrieveEscrowDataLight
    - [Ext] retrieveEscrowDataHeavy

 + [Int] RCLR_Interface 
    - [Ext] discard #
    - [Ext] recycle #

 + [Int] APP_Interface 
    - [Ext] transferAssetToken #

 + [Int] APP_NC_Interface 
    - [Ext] transferAssetToken #

 + [Int] EO_STAKING_Interface 
    - [Ext] claimBonus #
    - [Ext] breakStake #
    - [Ext] eligibleRewards #
    - [Ext] stakeInfo #

 + [Int] STAKE_VAULT_Interface 
    - [Ext] takeStake #
    - [Ext] releaseStake #
    - [Ext] stakeOfToken #

 + [Int] REWARDS_VAULT_Interface 
    - [Ext] payRewards #

 + [Lib] EnumerableSet 
    - [Prv] _add #
    - [Prv] _remove #
    - [Prv] _contains
    - [Prv] _length
    - [Prv] _at
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at

 + [Lib] Address 
    - [Int] isContract
    - [Int] sendValue #
    - [Int] functionCall #
    - [Int] functionCall #
    - [Int] functionCallWithValue #
    - [Int] functionCallWithValue #
    - [Int] functionStaticCall
    - [Int] functionStaticCall
    - [Int] functionDelegateCall #
    - [Int] functionDelegateCall #
    - [Prv] _verifyCallResult

 +  Context 
    - [Int] _msgSender
    - [Int] _msgData

 +  AccessControl (Context)
    - [Pub] hasRole
    - [Pub] getRoleMemberCount
    - [Pub] getRoleMember
    - [Pub] getRoleAdmin
    - [Pub] grantRole #
    - [Pub] revokeRole #
    - [Pub] renounceRole #
    - [Int] _setupRole #
    - [Int] _setRoleAdmin #
    - [Prv] _grantRole #
    - [Prv] _revokeRole #

 +  Pausable (Context)
    - [Pub]  #
    - [Pub] paused
    - [Int] _pause #
       - modifiers: whenNotPaused
    - [Int] _unpause #
       - modifiers: whenPaused

 +  ReentrancyGuard 
    - [Pub]  #

 + [Int] IERC165 
    - [Ext] supportsInterface

 + [Int] IERC721 (IERC165)
    - [Ext] balanceOf
    - [Ext] ownerOf
    - [Ext] safeTransferFrom #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] getApproved
    - [Ext] setApprovalForAll #
    - [Ext] isApprovedForAll
    - [Ext] safeTransferFrom #

 +  STAKE_VAULT (ReentrancyGuard, AccessControl, Pausable)
    - [Pub]  #
    - [Ext] transferERC721Token #
       - modifiers: nonReentrant
    - [Ext] Admin_setTokenContracts #
       - modifiers: isContractAdmin
    - [Ext] takeStake #
       - modifiers: isStakeAdmin,nonReentrant,whenNotPaused
    - [Ext] releaseStake #
       - modifiers: isStakeAdmin,nonReentrant,whenNotPaused
    - [Ext] stakeOfToken
    - [Ext] pause #
       - modifiers: isPauser
    - [Ext] unpause #
       - modifiers: isPauser