Stellar Vault
stellar-vaultMake a tokenized vault that issues Fungible Token shares for an underlying asset, similar to ERC-4626.
Instructions
Make a tokenized vault that issues Fungible Token shares for an underlying asset, similar to ERC-4626.
Returns the source code of the generated contract, formatted in a Markdown code block. Does not write to disk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| info | No | Metadata about the contract and author | |
| name | Yes | The name of the contract | |
| access | No | The type of access control to provision. Ownable is a simple mechanism with a single account authorized for all privileged actions. Roles is a flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts. | |
| symbol | Yes | The short symbol for the token | |
| pausable | No | Whether privileged accounts will be able to pause specifically marked functionality. Useful for emergency response. | |
| upgradeable | No | Whether the contract can be upgraded. | |
| decimalsOffset | No | Virtual decimals offset added to the underlying asset decimals to derive the vault share decimals, used to mitigate inflation (donation) attacks via virtual shares. With the default of 0, diluting a single deposit is never profitable, but an attacker holding most of the shares can profit once enough deposits land at an inflated price. Higher values make attacks orders of magnitude more costly, at the cost of virtual shares absorbing a tiny portion of the value accrued to the vault. Must be between 0 and 10. | |
| explicitImplementations | No | Whether the contract should use explicit trait implementations instead of using the default ones provided by the library. |