- Published on
Introducing the new Teia platform smart contracts
- Authors
- Name
- NoRulesJustFeels
- @FeelsNoRules
the new teia smartcontract and the new community multisig contract - an introduction
Editor's notes/updates
Jan26 2022: Due to the recent reactivation of "hicetnunc.xyz", we will change the name "v3" for our Teia community marketplace contract in order to avoid possible confusion with hicetnuncs contract naming convention. pls note that hicetnunc.xyz was still discontinued when this blogpost and the articles linked in it where drafted.
Feb05 22: Both smart contracts passed the audit. you can read the official statement about the contracts completed audit on twitter on github you can find the full audit report
Introducing the new teia platform smart contracts
Read the teia community marketplace smart contract and Hic Et Nunc multi-sig smart contract articles for a technical deep dive.
On Nov 11, the Hic Et Nunc (HEN) founder and leading developer, @crzypatchwork, shut down the hicetnunc.xyz site. Since the HEN code is open-sourced, the HEN community launched an alternate marketplace at https://hicetnunc.art/.
The hicetnunc.art marketplace uses the existing HEN v2 smart contracts, so the platform fees are still going to its admin, @crzypatchwork. He attempted to reduce the fee from 2.5% to 0%, but it wasn’t possible due to a technical issue with the smart contract, so he reduced it to 1%.
Since the HEN community wants to keep the marketplace alive, it needs funding for running costs like IPFS pinning and maintaining the platform. A new community marketplace smart contract was created to send all platform fees to an account controlled by the community. The main developer of the community marketplace smart contract is @jagracar, with help from community members in the Teia Community Discord.
The existing minting smart contract, discussed in Hic Et Nunc Smart Contracts (Part 1), will still be used for minting, and the new marketplace will still be swapping OBJKT NFT’s. The new marketplace GUI will still support v2 swaps but will use the community contract for all new swaps. @xat, a community member, already has changes ready to support the community contract in hicdex, the indexer used by HEN (you can read more about how hicdex works).
Along with a new community marketplace contract, a multi-signature contract (or multi-sig for short) was developed. A multi-sig is a smart contract that allows several users to manage and divide responsibility for funds. The multi-sig would enable the Teia community to manage the platform fees collected by the community marketplace contract. @jagracar created a web GUI to invoke the various multi-sig features.
The Teia community is also formalizing a decentralized autonomous organization (DAO). Since this process will take time, the multi-sig features were expanded to act as a proposed basic DAO contract in the meantime.
The Tezos Foundation introduced the smart contract developers to an auditing firm, inference ag, which agreed to an independent audit of the community marketplace and multi-sig contracts. Once the audit is complete, the new community marketplace and multi-sig contracts will be deployed.
Comparing the new Teia community marketplace smart contract to the Hic Et Nunc v2 marketplace smart contract
The new Teia community smart contract is based on the Hic Et Nunc v2 marketplace smart contract designed by crzypatchwork. The v2 contract enabled the most successful NFT market on the Tezos blockchain and opened opportunities for various other marketplaces. The new Teia marketplace contract includes multiple changes based on lessons learned since the v2 launch and supports new blockchain features. The new contract was also independently audited to reduce the chances of a smart contract exploit, which required better comments, documentation, and testing.
new teia community marketplace | HEN marketplace (v2) |
---|---|
Fees go to a community-controlled multi-sig account | Fees received and rate controlled by crzypatchwork |
Audited by inference ag | Not audited |
Ability to pause swaps and collects (to help with a transition to a new contract or to protect against an exploit; requires approval by the multi-sig users) | No ability to pause the contract |
The roles of the manager and the fee recipient are separated | Manager account is also the fee recipient |
Changing the manager account is protected with a two-phase commit | Manager account is changed in a single step |
Support for multiple FA2 (NFT) tokens | Only supports OBJKT tokens |
Additional checks in the code to protect against bad parameter values | |
Error codes (part of the TZIP-16 contract metadata spec) | No error codes |
Detailed comments for all entrypoints, parameters, and each code step | Some comments in the collect entrypoint |
Expanded contract metadata | |
Ability to update contract metadata | Static contract metadata |
Support contract views to provide informative functions that can be invoked by other smart contracts | Does not support views (wasn’t available on Tezos at the time) |
Comprehensive tests | Limited tests |