Feature Highlight: Vault Simulations

Superform is a permissionless marketplace to list yield vaults and get instant cross-chain distribution. It sounds easy, but being permissionless is hard. Let’s dig into how Superform makes this a safe and powerful UX for users.

Simulations are a key feature to ensure the vaults you deposit into are operational. Permissionless vault listing has great benefits—like giving users a wide variety of yield opportunities—but too often users chasing the highest yields are left wondering if the vault is safe or if their transaction will succeed. Simulations address these issues.

There are two broad types of simulations that Superform runs:

  1. Pre-addition vault simulations

  2. Post-addition Superform simulations

Pre-addition vault simulations

Before vaults are added to the Superform Protocol using the App (i.e. creating a Superform), where anybody can also add metadata, various checks are run to ensure expected vault behavior. The final step is a simulation that will:

  1. Create a fork of the blockchain where the vault is being added

  2. Call createSuperform on SuperformFactory with the vault address and Form it’s being added to (see https://docs.superform.xyz/periphery-contracts/superformfactory#creating-superforms-adding-vaults)

  3. Simulate a roundtrip deposit and withdrawal into the vault

These vault checks will return 1) Failed 2) Warning or 3) Succeed. Some vaults may return warnings that actually are compliant with Superform and operational. Vaults that pass the checks can be instantly listed on Superform.

Post-addition Superform simulations

Once vaults are added to Superform, they become Superforms. Similar to how new pools on Uniswap are created to trade tokens, these Superforms become the intermediary contract that processes deposits/withdrawals of tokens into vaults.

There are five modes behind this simulation tool:

  1. deposit: simulates a deposit of underlying tokens into a vault

  2. withdrawal: simulates a burn of SuperPositions, withdrawing shares from the vault

  3. roundtrip: creates a fork and simulates a deposit, followed by a withdrawal of those shares

  4. deposit_withdrawal: simulates a deposit and a withdrawal separately

  5. smart: a combination of the above methods that appropriately tests all vaults

All a user has to do is hit ‘simulate’ and gets all of these at once to ensure the vault is working as intended. All five modes override a users actual balance and approvals and include various transactions the user might not have made already to ensure a full test suite is performed.

Various vaults might pass deposit tests but fail the withdrawal step, so it’s important to run these simulations before depositing! The Superform App will automatically route you through the smart simulation route with overrides, but other types can be used to isolate certain behavior.

Get Started

Superform is continuously improving this tool to ensure every user yields safely. Make sure to run this prior to depositing into vaults.

Try Superform:

Subscribe to Superform
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.