Quick start for Vault Developers
Welcome to Flap Vault. Please follow the steps below to build your Vault.
Permissionless vault creation β You can create and deploy your own vaults and vault factories without any permission or registration. Vault factories no longer need to be registered in the VaultPortal before they can be used to launch tokens, and users can use any vault they want when launching a token.
1. Start with the example repo
Work through the FlapVaultExample repository for a complete, working example of a vault and vault factory implementation. It is the fastest way to understand the patterns you need to follow.
Quick-start Vault example: src/FreeCoinBeacon.sol
2. Confirm your design if needed
You can implement any vault logic you want β there is no gatekeeping if you don't need the low-risk badge. If you are unsure whether your Vault design, decentralization model, or implementation meets Flap's standard for the low-risk badge specifically, feel free to reach out before building too much and we can help review and improve your plan. Even if you do want the badge, you don't need to lock in your design up front β you can launch on the beacon proxy pattern and upgrade later if something needs to change.
3. Run a basic self-check
After building your Vault, use the Vault spec checker for a basic review before you move on to writing tests.
4. Write integration tests
We highly recommend writing integration tests before submitting for audit.
Reference test: test/FreeCoinBeacon.mainnet.t.sol
5. Test on BNB / Robinhood Testnet
You can also test your Vault on BNB Testnet or Robinhood Testnet: https://testnet.flap.sh
6. Audit and low-risk badge
Audit is optional β you can launch without one. However, if you want a low-risk badge, your Vault must pass an audit from our partner audit company.
Current cost: 0.5 BNB / 0.16 ETH per factory.
If you launch your token using the recommended beacon proxy pattern, you don't have to complete the audit before launch β you can launch first and do the audit afterwards. If the audit finds an issue, the vault can be upgraded through the beacon to fix it. See Building Upgradeable Vaults β Beacon Proxy Pattern for details.
7. Bespoke UI
If you want a custom UI, use the flap-vault-component-template. See Building a Vault UI for a full walkthrough: the four-file package boundary, manifest binding, SDK usage, the mandatory risk-status display, and the check/package/handoff pipeline.
After your Vault audit passes, you can submit the UI for review.
8. Optional: align on your launch plan with us
If you would like our support, you can align with the Flap team on your launch setup, such as whether to lock the CA, make the factory exclusive to a specific developer address, when to bind the UI, and when to display the low-risk badge.
Feel free to reach out to the Flap team anytime during the process.
Telegram: @I0ene @JingYixiaozhang @cedricflap
Further reading
Review the Vault & VaultFactory specification for the full interface definitions and how to build your own vaults and vault factories.
Read the Flap Tax Vault documentation for an overview of the vault concept and VaultPortal integration.
Explore registered (i.e. verified by Flap) vaults in the Registered Vaults page to see available vault factories and their configuration schemas.
Learn about the Gift Vault family and how to integrate X proof-based revenue routing.
Building a custom UI? See Building a Vault UI for the full walkthrough based on the flap-vault-component-template.
Available vault types
Flap currently supports the following official vault types:
Split Vault - Distributes BNB revenue across multiple recipients based on configurable basis points (percentage shares)
Gift Vault - Routes revenue based on X (Twitter) proof verification, with a fallback that varies by version (buyback & burn for V1, holder dividends for V2)
Common workflows
Launch a token with a custom vault β You can launch a token and set the fund recipient wallet to your smart contract. If it follows the spec defined in the Vault & VaultFactory specification, its info will be automatically available on our website and partner websites. No registration is required.
Build a vault factory for others β If you have an idea to build a vault to be used by others, you can build a
VaultFactoryBaseV2and take a portion of the tax as a commission in each vault you create. ImplementvaultDataSchema()so the UI can automatically render a launch form for your vault type. See the Vault & VaultFactory specification for full details.
Last updated