Inspect A Tax Token
Overview
You can get the tax info of any tax token using the Tax Token Helper contract. Our website uses this contract to get tax info for tokens and show them to users:

Tax Token Helper
BNB Mainnet
0x53841c73217735F37BC1775538b03b23feFD8346
BNB Testnet
0xD64441e5FcD02D342B8cf6eBA10Ef6E40d0dA90f
Robinhood Mainnet
0xb10bD2672aE63735d677164A54B573a016f0203C
getTaxTokenInfo vs getTaxTokenInfoV2
The contract exposes two query functions. Use the table below to decide which one to call.
getTaxTokenInfo
getTaxTokenInfoV2
Return type
TaxTokenInfo
TaxTokenInfoV2
Tax rate fields
Single taxRate
Separate buyTaxRate and sellTaxRate
Marketing address
marketingWallet (plain address)
vaultInfo.addr + full MarketingWalletInfo
Vault metadata
None
isVault, factory, riskLevel, isOfficialVault
AI oracle flag
None
isAIConsumer
Dividend reward token
Not available
dividendToken (address(0) = native gas token)
Recommended for
Legacy integrations
All new integrations
Using getTaxTokenInfo
getTaxTokenInfo is the original query function. Call it when you only need the core tax breakdown and cumulative statistics:
Using getTaxTokenInfoV2
getTaxTokenInfoV2 is the recommended function for all new integrations. It returns everything getTaxTokenInfo returns, plus richer metadata about the marketing wallet and dividend token.
Reading vault risk level
riskLevel maps to the IVaultPortalTypes.RiskLevel enum:
0
UNVERIFIED (default for non-vaults)
1
LOW_RISK
2
LOW_MEDIUM_RISK
3
MEDIUM_RISK
4
HIGH_RISK
Detecting AI-powered vaults
isAIConsumer is true when either:
The vault's category in VaultPortal is
TYPE_AI_ORACLE_POWERED, orThe marketing wallet is a smart contract (not an EOA or EIP-7702 delegate) that has submitted at least one request through
FlapAIProvider.
V1 tax token caveats
For V1 tax tokens (TOKEN_TAXED), both functions populate only a subset of fields: marketBps (always 10000, meaning 100% goes to the marketing/funds-recipient wallet), buyTaxRate/sellTaxRate (or taxRate), vaultInfo.addr/marketingWallet, quoteToken, and totalQuoteSentToMarketing.
The totalQuoteSentToMarketing field may be zero for older V1 tokens. If that is the case, we provide a backend to get the totalQuoteSentToMarketing for V1 Tax tokens:
Note: you only need this fallback when
totalQuoteSentToMarketingreturned bygetTaxTokenInfois zero for V1 Tax tokens. For V2 Tax tokens, thetotalQuoteSentToMarketingis always accurate.
how to inspect a tax token's vault
When using getTaxTokenInfoV2, vault metadata is already included in the vaultInfo field of TaxTokenInfoV2 — no separate VaultPortal call is needed for the basic case.
For deeper, vault-type-specific data, you can still query VaultPortal directly. Use the VaultPortal tryGetVault method to get basic vault information; the returned description gives a human-readable summary of the vault. For details on the fields returned by tryGetVault, refer to Get Vault Info.
If you want vault-type-specific data, compare the vaultFactory returned by tryGetVault against the known registered vault factories and then query the vault using its own interface. The list of registered vault factories and their interfaces is available at developers/token-launcher-developers/registered-vaults.md.
How to determine whether a token or a factory has low risk
riskLevel (the IVaultPortalTypes.RiskLevel enum: UNVERIFIED(0), LOW_RISK(1), LOW_MEDIUM_RISK(2), MEDIUM_RISK(3), HIGH_RISK(4)) exists at two places: the vault factory and the individual token. A token's risk level either comes from its factory (inherited automatically at launch) or from its own independent audit — and only one of those two paths emits an event on the token itself.
Indexing which factory created a token
Since inheriting risk from a factory emits no event on the token, you need a separate way to know that a given token came from a given factory in the first place — otherwise you have nothing to join the factory's risk level against.
The event to watch:
FlapTaxVaultTokenCreated(address indexed token, address indexed vault, address indexed vaultFactory), emitted exactly once when the token is launched throughnewTokenV6WithVault/newTokenV7WithVault. All three parameters are indexed, so you can filter byvaultFactoryto find every token launched from a specific factory, or look up a single token to find itsvaultFactory.Keep a
token → vaultFactorymap from this event. Combine it with thefactory → riskLevelmap fromFlapTaxVaultFactoryRegistered(below) to derive each token's inherited risk level —token's risk =riskLevelofvaultFactoryat the time of creation, unless a laterAuditReportSubmittedoverrides it for that specific token.
Getting a factory's risk level
Indexing: listen for
FlapTaxVaultFactoryRegistered(address factory, bool enabled, bool official, RiskLevel riskLevel). Every emission carries the factory's full current state, not a delta — just overwrite whatever you had stored for thatfactory.Direct query (no indexing needed): call
VaultPortal.vaultFactories(factory), which returns(bool enabled, bool official, RiskLevel riskLevel, bytes29 reserved)— a single always-current on-chain read.
Getting a token's own risk level
A token's own risk level can be set independently of its factory — for example, upgrading a specific token from UNVERIFIED to LOW_RISK after it passes its own audit, regardless of what its factory's rating is.
The event to watch:
AuditReportSubmitted(address indexed taxToken, address indexed auditor, RiskLevel riskLevel, string ipfsCid). This is the only event that fires when a token's own stored risk level changes — including the "not low risk → low risk" transition. Overwrite your stored value for thattaxTokenevery time it fires.Remember: this event only fires for independent, per-token audits. It does not fire when a token simply inherits its risk level from its factory at launch (see the warning above) — those tokens need to be picked up via the factory's
FlapTaxVaultFactoryRegisteredevent instead.
Getting the current risk level without indexing anything
If you don't want to run an indexer and just need the current status for one token right now, there are two equivalent single-call options — both always return the live value, whether it came from factory inheritance or an independent audit:
Option A — TaxTokenHelper.getTaxTokenInfoV2 (recommended; see the getTaxTokenInfoV2 section above):
This one call also gets you the rest of the tax breakdown at the same time.
Option B — direct VaultPortal.tryGetVault, if you don't need the tax breakdown:
Summary
What's a factory's current risk level?
FlapTaxVaultFactoryRegistered event, or VaultPortal.vaultFactories(factory)
Which factory did a token launch from?
FlapTaxVaultTokenCreated event (token → vaultFactory)
Did a specific token's own risk level just change?
AuditReportSubmitted event
Did a token become low risk just by inheriting from its factory?
No event on the token — join FlapTaxVaultTokenCreated (which factory) with FlapTaxVaultFactoryRegistered (that factory's risk level)
I don't want to index anything, just tell me the current status
TaxTokenHelper.getTaxTokenInfoV2(token).vaultInfo.riskLevel or VaultPortal.tryGetVault(token)
Last updated