near-sdk-contract-tools
near-sdk-contract-tools copied to clipboard
RFC: Backed token / Treasury manager component
For smart contracts that manage multiple NEP-141 tokens in a treasury and issue a backed token. Inspired by the Skyward Finance hack. Should work well in conjunction with the existing NEP-141 infrastructure in this package (optional).
- Provides mint and redeem actions. Each action could be exposed / limited / permissioned by the contract author as desired.
- Mint action is backed by something (token, NEAR native, etc.). This would be specified by the contract author, probably via some sort of hook.
- Redeem action would return the backing asset(s) to the redeemer.
- Mechanism for controlled / limited release (e.g. time release, cliff / vest schedule, etc.)
Request for comments
- Design suggestions
- Should the component that would solve the Skyward issue be a "backed token" (i.e. NEP-141 extension of sorts) or a "treasury manager" (contract-agnostic multi-token (NEP-141 only?) manager)
- Is this component in-scope for this project? It is definitely a little bit more "niche" in use-case, but I think if the component is sufficiently generalized, it could be useful for implementing:
- Arbitrary token lockups (cliff/vest schedule)
- Backed tokens (single- and multi-asset)
- DAO treasuries