Developing Smarter Blockchain Applications
In developing on Fantom’s Opera network, I’ve had to rethink what makes a good decentralized application. Gas costs are no longer at the front of my mind, nor is miner extractable value. So what is?
What’s the point?
When developing on Ethereum, gas-costs hold far too much weight in the decision making process. Though sometimes these constraints can help push the limits of a developer’s creativity, oftentimes they just lead to frustration and even failure. My first big Ethereum project was derailed by exploding gas costs and I’m sure many independent developers have experienced something similar in the past few months. Deploying our system would have cost a third of our budget!
How can we create truly decentralized applications on Ethereum when we need to rely on venture capitalists or shady fundraising practices to build out ideas? I believe Ethereum has (unintentionally) deviated from its original purpose of offering financial freedom to those without it, and I believe alt-chain developers can pick up the slack.
Unleashing the power of Blockchain.
Ethereum initiated a financial revolution, and it’s time for its contemporaries to carry the torch. As developers on alternative EVM-based blockchains, we have access to a wealth of battle-tested code, security resources, and development tools to build out our projects, as well as a tremendous amount of power to take them to the next level.
Developers can now store more data on-chain without worrying about cost, as well as abstract away responsibilities that are often left to keepers on Ethereum. This means we can create more secure, efficient systems at the root level without relying on external scripts or data sources to do our heavy lifting.
I no longer fear the sstore opcode.
The blockchain is a place for inalienable truth. When our systems and our understanding of those systems rely on inputs from external sources, we undermine this fact. Gas-saving design decisions can cause our code to rust, and expose unforeseen vulnerabilities over time.
By storing more data in our smart contracts, we can perform increasingly complex operations without the need for external dependencies. The security implications of this are enormous, as developers can distribute incentives more intelligently and create smarter internal processes. Check out this example of a lightweight Social Network implementation, designed to fit right into your ERC20 transaction hooks.
Using this module, I can track relationships between users, as well as each user’s trading volume. This provides me with a pair of behaviors I can incentivize. How would the trading landscape of a token be affected by an incentive placed on transactions with Sushiswap? How would an incentive for mutual transactions affect network growth?
I believe these questions represent the tip of the iceberg for high-performance blockchains, and I look forward to answering them with my fellow Fantom developers.
Reduce attack surface and improve UX.
I remember cracking up the first time I experienced someone “forgetting to advance the epoch” in a seignorage project I participated in. Imagine if our perception of real time was left to some guy in his pajamas remembering to hit the “advance” button.
If your protocol relies on keepers to function properly, then it’s vulnerable. On-chain tooling exists to mitigate these risks, but they still exist, and securing them eats up incentives and developer resources that would be better used elsewhere.
When gas costs aren’t a problem, developers have much more flexibility in developing automation solutions. I can reduce the number of state-changing functions users have access to by nesting them within other functions. When the difference in transaction cost is less than a cent, developers can focus on other aspects of their user’s experience.
You can check out the Lottery project myself and my team are working on for an example of automation in action. Creating secure, predictable systems is much easier when gas cost isn’t the first thing on your mind.
Welcome to the next generation!
I feel lucky that I’m able to experience the cautious excitement that comes with such a massive advance in technology as we’re experiencing in all the high performance blockchain networks that are sprouting up. Smart Contracts can better fulfill their promises of being ‘smart,’ with greater on-chain data collection, better automation, and more robust interfaces. This doesn’t only mean that individual contracts are smarter, but the entire network is smarter.
About Byte Masons
Our team is laser focused on high-performance blockchain networks and building custom applications that take full advantage of their power. Our contracts offer richer on-chain data and more advanced automation so that users can enjoy seamless experiences tailored to their needs.
Find us on Github