stellar-vault
Generate a tokenized vault contract that issues fungible token shares for an underlying asset, with configurable access control, pausing, and upgradeability.
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. The default of 0 is already safe: it makes such attacks non-profitable. 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. |