2854 - docs: add NEP-621 Tokenized Vault standard#3057
Open
matiasbenary wants to merge 4 commits into
Open
Conversation
denbite
requested changes
Jun 25, 2026
| description: "Learn how Tokenized Vaults (NEP-621) are defined on NEAR" | ||
| --- | ||
|
|
||
| A **tokenized vault** is a smart contract that accepts deposits of an underlying [fungible token (FT)](../ft/standard) and, in exchange, issues **shares** that represent proportional ownership of the assets held by the vault. |
|
|
||
| <Tip> | ||
|
|
||
| NEP-621 defines the **interface** and the **expected behavior** of a vault contract, but it does not dictate how the internal logic (yield strategy, fees, accounting) should be implemented. |
Contributor
There was a problem hiding this comment.
use less bold emphasis - everywhere in the file, use only when it's actually needed
| withdraw(asset_amount: string, max_shares_deducted: string?, receiver_id: string?): string | ||
| ``` | ||
|
|
||
| Upon a successful withdrawal, the vault **must** emit a [`VaultWithdraw`](#events) event. Because transactions on NEAR are **non-atomic**, a vault should either: |
Contributor
There was a problem hiding this comment.
let's move VaultWithdraw event description into the "Events" section below
|
|
||
| When implementing a vault, keep the following risks in mind: | ||
|
|
||
| - **Exchange rate manipulation (inflation attacks):** if the vault has a permissionless donation mechanism, an attacker can donate assets to inflate the share price and steal value from later depositors. Mitigate by seeding a non-trivial initial deposit and/or using a virtual decimal offset on issued shares (demonstrated in the reference implementation). |
Contributor
There was a problem hiding this comment.
make sure that when you say "reference implementation", it has a link to it, so a reader isn't left wondering where it's
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2854