Virtual Smart Contract: Bringing Smart Contracts To Hive
We recently got an announcement of the building of a smart chain system for Hive. This is an exciting step and one of a number of projects of this nature that is taking place.
Virtual Smart Contract (VSC) is a layer 2, sidechain, to Hive. This will provide smart contract capabilities while being tied to the main chain.
In this article we will dive into the particulars of the system.
Target Markets
The target markets of the system and what will be the focus of support are:
- games
- NFTs
- multi-sig contract needs
Developers who are interested in these areas for their projects will find VSC to be able to provide decentralized smart contract needs.
Node System And Horizontal Scaling
The goal is to have each smart contract supported by 50 nodes. There will be multi-sig of nodes for each contract. This is a Javascript based VM, at least to start, as compared to EVMs utilizing Solidity. Eventually, the VM could be upgraded to include other languages such C++.
This is a separate node system from Hive. The transactions on VSC are run off chain and utilize IPFS for storage. Hive serves as the anchor chain with the IPFS hash being placed on chain as a custom JSON. Here is where the immutability of Hive is important. Once the hash is recorded, it will not be removed from the database.
Scaling can occur since not every node in VSC is required to run every contract. Nodes will determine which ones they want. It is likely that a smart contract could be designed and then a node system set up around that.
Here we see the ability to keep scaling both in number of nodes and contracts. Ethereum and the associated forks has all smart contracts running on each node. Adding more nodes doesn't scale directly since it is simply running a duplicate copy of the same data.
We can think of this in terms of vertical versus horizontal. With EVMs, all new contracts are stacked on top of the existing nodes. With VSC, news nodes can be added as more contracts are added.
How It Works
A user engages with a smart contract application. When a transaction takes place, the user pays a fee (more on this below). The validators process the transaction according to the contract. Once validated, it is put into IPFS and the hash posted to Hive.
The full settlement occurs when the Hive witnesses make the block the custom JSON is located in irreversible (on average 1.6 seconds).
This removes the heavy lifting from Hive and places it off-chain. Over time, a network of this nature can enhance the scalability of Hive as more is processed off-chain, leaving the most vital features to the blockchain.
Advantages
Most are somewhat familiar with the EVMs. There are some constraints to that while VSC brings advantages.
EVMs are a constrained environment in that memory is restricted which makes advanced functions difficult It also uses specific APIs.
VSC:
- can offer a large database of records without much cost
- query all databases providing robust search
- create more complicated technology
- streamline lower level protocols and provide standardization for things such as NFTs
In short, VSC can replace the back end operations for many projects helping to reduce costs and running them all through a smart contract.
Hive Backed Dollar (HBD)
VSC uses the Hive Backed Dollar (HBD) for all transaction fees. When a user engages with a smart contract, he or she has to pay a small amount of HBD. This is no different than paying ETH or BNB when using the contracts on those chains.
To start, the system will mirror that. It will be on a per transaction basis. The fees are the incentive mechanism for the node operators.
This is a major use case for HBD. To start, it means that each node and user will require a Hive account to interact. While the applications are free incorporate whatever sign up they want, the system requires a Hive account to make payment.
Of course, gets us back into the world of transaction fees which is "unHive-like".
Resource Credits And Hive Savings
On the road map is to development payment similar to resource credits. If this gets developed, the idea is to give people to option of paying on a per transaction basis or, for a discount, utilizing a RC-like feature.
With the latter, a user would stake HBD. Just like Hive, this would provide a certain amount of credits, i.e. activity. It would replenish each day, meaning transacting was not a direct expense. Users would stake HBD based upon individual needs.
The per transaction cost would be less using this option. A choice is given to the user how he or she would want to engage. For example, one might not use the system often, hence making a direct payment on one or two transactions could be a better option.
Here is where Hive's tokenomics can be applied. Staked coins cannot be used for payment. So how is this accomplished? The system simply places the HBD in savings, generating the 20% APR. This is used to pay the node operators. Perhaps there is a splitting, where a couple percent goes to those staking. The point here is the node operators could be paid from transaction fees and from the APR created from savings.
Hive Benefits
There are a number of benefits provided to Hive:
- multi-sig smart contract available for developers to build games and apps
- HBD as a medium of exchange for transactions
- virtual machine capability that can replace back end operations
- inexpensive nodes
- possibly locking up a large amount of HBD to fund the nodes
Roadmap
- build and test subsystems (going on right now)
- build a basic model of network
- build more advanced capabilities
- tackle larger challenges such as multi-chain capability
A DHF proposal is going to be submitted, targeted for June or July. To provide that, a working model is required. That should spell out the time frame.
While it might have restricted functionality as compared to the roadmap, this system is slated to be operational before the end of the year. In fact, the target is to have major upgrades made and be live by Hivefest (roughly November).
For more information:
Discord server.
@vsc.network
@vaultec
If you found this article informative, please give an upvote and rehive.
gif by @doze
logo by @st8z
Posted Using LeoFinance Beta
https://twitter.com/1331330355513745413/status/1649764101252427776
https://twitter.com/548714808/status/1649805006147575809
https://twitter.com/3785609412/status/1649849315551236096
https://twitter.com/1162783494910595072/status/1649959654766592006
https://twitter.com/38336946/status/1649974811232468993
https://twitter.com/3306350730/status/1650001891537870848
https://twitter.com/1647293154322776066/status/1650170444300054530
https://twitter.com/1415155663131402240/status/1650283915050090496
The rewards earned on this comment will go directly to the people( @taskmaster4450le, @wanderingmoon, @threespeak, @nasoe, @lsoto713, @zeshan120, @rzc24-nftbbg ) sharing the post on Twitter as long as they are registered with @poshtoken. Sign up at https://hiveposh.com.
I've still not got to grips with what smart contracts can do, but it seems to be a missing piece on Hive. I hope this project can resolve that.
Partially. It is one project that is being developed. SpkNetwork also have their smart contracts which stem from the Honeycomb design and Blocktrades is going to build one tied to HAF.
Posted Using LeoFinance Beta
In the Heros journey of the Hive Blockchain, this is Transformation and Revelation and we still need to reach The Return before 2024 :)
I hope the technology gets a lot of attention and wide adoption this year,
great Post Task!
Great news and I think such projects have the capacity to sky rocket Hive to the top where it deserves to be. It seems that things start building up on Hive with also the announcement from Speak Network of the Reward Nodes and also the test net for video storing prior to a maybe Q3 release to Production. Great times ahead and this year 2023 might be the biggest for the Hive blockchain that we've seen yet.
Posted Using LeoFinance Beta
Developents that are p[araelelling each other. Different use cases but certainly expanding the capabilities of Hive.
Posted Using LeoFinance Beta
Interesting concepts but I'm concerned about fees. I see a lot of people saying Hive tx are feeless but is that really true? I seem to recall there being a miniscule fee, something like 0.01%. How much of a fee are we talking?
I do think smart contracts are way overdue though. I'm anxious to see how the land I have in dcrops can be used in splinter lands or likewise the farms I have in dcity...
In the beginning a small fee will be required per transaction and longer term the goal is to be feeless in a similar way to hive. Regardless, the overall system is designed to be highly scalable, so even if there is a huge amount of network usage, you won't see a massive explosion in transaction costs.
The structure works a bit like this:
I intend fees to never go above 0.03HBD for 99.9% of transactions
That being said this is subject to change and a lot of the fee structures are somewhat arbitrary. The important factor in this is the system is scalability. What that fee ends up being will result in a natural balance between user operations & infrastructure backing.
Hello all! I am the primary developer behind the VSC project. Feel free to ask me anything about the project!
Since fees will be in HBD, a random user that want to interact with the contract must have a hive account or you will implement any kind of "vsc wallet"?
Hive account will be most likely required. However, entirely offchain identities will be supported. As for how those accounts pay fees is currently being figured out. Likely something where a hive account has to send HBD to that offchain identity for use.
Why not have an offchain dex where offchain users can buy HBD? Or like exchanges do with hive? I can have hive in a exchange and don't have hive account.
Entirely possible yeah. I have some ideas on what can be done there, but that'll take time to formulate into reality.
Yeah! 👍
Why can't you have it figured out already? You have ceramic accounts figured out have you not?
This is what kills hive projects really. Ideas, ideas... but "we'll sort out the details as we go folks" ... and the result is years of "building" that only a handful of enthusiasts stay committed to.
Case in point:
Spk."network"
Leo"finance"
Ragna(sunken)rok.
You DEVS in favorable position can keep extracting from the DHF though, so success and failure have no bearing.
Step your game up son.
Or Hive just has no chance to ever attract large userbase or exist as a dominant chain/technology.
A chain for tinkering is what it is.
It's going to be nice to see how it all works out but I like the fact that they are trying to push all the complex stuff offchain. It makes the base layer stay simple and it gives the features that people need on the next layer.
Posted Using LeoFinance Beta
Perhaps this will be the major step forward for P2E gaming in the Hive ecosystem, I hope the project becomes a success and we get a demo soon.
Will this make hashed timelock contracts (HTLC) available giving us access to atomic swaps on Hive?
Posted Using LeoFinance Beta
That would be great, if HTLC is available. !PIZZA
Yes, with the JS VM it's possible to code such functionality. I'm also exploring atomic swaps/cross chain trading in the bigger picture.
That’ll be huge! Great stuff @vaultec
Excited for this, will definitely make it a goal to convert Terracore codebase over to the smart contracts
Hey @crypt0gnome do you have a discord that I can reach out on?
https://discord.com/invite/dgJU6RqMv4
https://leofinance.io/threads/@rmsadkri/re-leothreads-2raqrhggw
The rewards earned on this comment will go directly to the people ( rmsadkri ) sharing the post on LeoThreads,LikeTu,dBuzz.
Woah. So much good alpha here. I have been expecting such a development for the Hive ecosystem for quite some time now, really since I first learned about EVMs and the BSC being the biggest one of all. I was an early user of Cub DeFi & PancakeSwap, as well as utilizing SushiSwap for PolyCUB, and the lack of other chain integration at the time seemed to be a problem.
Having an off-chain solution to processing less important transactions for Hive could be huge! And creating another use case for $HBD as well as making it a medium-of-exchange and further utilizing RCs will only bring more value to the ecosystem!
Posted Using LeoFinance Beta
$PIZZA slices delivered:
@cryptothesis(1/15) tipped @etblink