Launch token through VaultPortal

VaultPortal builds on top of Portal to add Vault functionality for tax tokens. It creates a tax token and its associated Vault in a single transaction.

Use VaultPortal when you need a Vault-backed tax token. For standard tokens or tax tokens without Vaults, use Portal instead.

For the VaultPortal contract address, see VaultPortal deployed addresses.

Key interfaces

The main entrypoint is newTaxTokenWithVault:

/// @notice Create a new tax token with an associated vault in a single transaction
/// @param params The parameters for creating the tax token and vault
/// @return token The address of the newly created tax token
function newTaxTokenWithVault(NewTaxTokenWithVaultParams calldata params)
    external
    payable
    returns (address token);

NewTaxTokenWithVaultParams extends the V5 token parameters with vault-specific fields:

struct NewTaxTokenWithVaultParams {
    string name;
    string symbol;
    string meta;
    IPortalTypes.DexThreshType dexThresh;
    bytes32 salt;
    uint16 taxRate;
    IPortalTypes.MigratorType migratorType;
    address quoteToken;
    uint256 quoteAmt;
    bytes permitData;
    bytes32 extensionID;
    bytes extensionData;
    IPortalTypes.DEXId dexId;
    IPortalTypes.V3LPFeeProfile lpFeeProfile;
    uint64 taxDuration;
    uint64 antiFarmerDuration;
    uint16 mktBps;
    uint16 deflationBps;
    uint16 dividendBps;
    uint16 lpBps;
    uint256 minimumShareBalance;
    address vaultFactory;
    bytes vaultData;
}

How to launch

  1. Choose a registered vault factory. Vault factories are registered in VaultPortal. Each factory defines its own vaultData schema. See Registered vaults.

  2. Prepare metadata and core token parameters. Use the same metadata flow as Portal, and set taxRate > 0 for tax tokens.

  3. Encode vaultData for the selected factory. The vaultData bytes are factory-specific. Always follow the factory’s schema (see Registered vaults).

  4. Call newTaxTokenWithVault. The contract emits FlapTaxVaultTokenCreated with the token, vault, and vault factory addresses.

circle-info

Each vault factory can define a different vaultData schema. Always validate the factory and its expected payload before encoding.

Find the salt (vanity suffix)

VaultPortal uses CREATE2 through Portal, so the salt must produce a token address with the required suffix (tax tokens end with 7777).

Follow the same salt-finding flow as launch-token-through-portal.md, including the CREATE2 prediction logic and token implementation selection.

Reading vault info

You can query vault information after launch:

  • getVault(taxToken) returns the full vault info and reverts if not found.

  • tryGetVault(taxToken) returns (found, info) without reverting.

Last updated