Polygon - scalable, low-cost Ethereum Layer 2 network
Key Points
References
Key Concepts
Smart Contract Concepts - EUBOF - 2022
eubof-smart-contracts-paper-2022.pdf link
Ethereum Concepts
https://ethereum.org/en/developers/docs/intro-to-ethereum/
m Ethereum Smart Contract Concepts
scalable%2Clow-costEthereumLayer2network-EthereumAccounts
https://ethereum.org/en/developers/docs/transactions/
POS Proof of Stake and Liquidity Pools
Ether Concepts
https://ethereum.org/en/developers/docs/intro-to-ether/
Ethereum Accounts
https://ethereum.org/en/developers/docs/accounts/
Ethereum Wallet Services
https://finance.yahoo.com/news/ethereum-upgrade-could-harder-lose-121500207.html?fr=sycsrp_catchall
Account Abstraction (AA) aims to use smart contracts to execute crypto transactions, by creating certain validity rules. With AA, users won’t need to sign off on every transaction with one’s private keys.
DApps Concepts
https://ethereum.org/en/developers/docs/dapps/
Ethereum Smart Contract Development Languages
https://ethereum.org/en/developers/docs/smart-contracts/languages/
Ethereum and Web3 apps
https://ethereum.org/en/developers/docs/web2-vs-web3/
Your App: What goes on the blockchain? Why?
What are the costs?
What is the trust model for the app and parties?
Why is the blockchain needed for trusts?
Ethereum Layer 2 roadmap
https://cointelegraph.com/news/vitalik-buterin-outlines-endgame-roadmap-for-eth-2-0
layer2-Vitalik Buterin outlines endgame roadmap for ETH 20.pdf
both optimistic and zero knowledge proof rollups
https://finance.yahoo.com/news/ethereum-no-longer-one-chain-123000149.html
Ethereum is no longer a one-chain ecosystem. In order to achieve scalability, the Ethereum community will need to offer layer 2 technologies capable of handling transactions from billions of users. 2021 proved to be the first step in experimentation with both optimistic and zero knowledge proof rollups, and the two finally began to take significant market share in daily transactions away from Ethereum L1.
Ethereum Smart Contract Development
https://medium.com/blockchain-stories/the-story-of-an-ethereum-smart-contract-e0df5c526724
ethereum-smart-contract-dev-medium.com-Interacting with an Ethereum Smart Contract.pdf file
Basic steps to run a smart contract on a blockchain
- The distributed ledger should be equipped to record computer programs.
- Whenever a user executes a DApp, the execution should happen at every peer/computer holding the ledger copy.
- The nodes (network participants holding the blockchain copy) should have an execution environment to execute the DApp.
- The system should have a mechanism to uniquely identify a program, its associated data and its executions.
- Finally, these changes should be recorded as transactions on the chain.
Smart contract environment
- Smart contracts ( SC ) run on an emulated computer called the Ethereum Virtual Machine (EVM).
- Each node on the Ethereum network runs a local copy of the EVM to validate contract execution.
- At the same time, the Ethereum blockchain records the changing state of this world computer as it processes transactions and smart contracts.
- The EVM operates like a global, single-instance computer, running everywhere.
- Each smart contract is uniquely identified by its 20-byte contract address and has a smart contract program code
- Each SC is owned and controlled by the logic of its smart contract program code that is recorded on the Ethereum blockchain at the contract account’s creation and executed by the EVM.
- No one can steal the funds of a smart contract since it does not have a private key to be stolen.
- Contract funds are accessed only by programming the transfers in the smart contract code, which is publicly auditable.
- Externally Owned Accounts or EOAs are controlled by users using their private keys.
- They are often managed by wallet applications external to the Ethereum platform.
- Smart contract deployment is also a blockchain transaction
- Smart contracts are written in high-level languages like Solidity
Smart Contract Gas Fees on Ethereum
Ethereum introduces a metering mechanism called gas. As the EVM executes a smart contract, it carefully accounts for every instruction (computation, data access, etc.). Each instruction has a predetermined cost in units of gas. When a transaction triggers the execution of a smart contract, it must include an amount of gas that sets the upper limit of what can be consumed running the smart contract. The EVM will terminate execution if the amount of gas consumed by computation exceeds the gas available in the transaction.
The Solidity compiler (solc) converts the smart contract to EVM bytecode
The compiler also generates an Application Binary Interface (ABI). ABI serves as an interface between two program modules. It defines how data structures and functions are accessed in machine code.
Deployment after compile
the contract can be deployed using a particular contract deployment transaction. Once the transaction is included in a block, the contract can be referred to by its address. The address of a smart contract is calculated as a hash function of the originating account and account nonce (number of transactions originated from an account).
An Ethereum user who wants to interact with a smart contract can use the contract address and ABI to interact with it anytime.
MyContract is deployed in Ropsten testnet at contract address 0x0dFA0638dd508bFb4E13A06359FAF666677D7F4d. You can check the contract status at the block explorer.
Interact with Ethereum Smart Contracts
https://medium.com/blockchain-stories/interacting-with-an-ethereum-smart-contract-aa14401c30a0
ethereum-smart-contract-dev-medium.com-Interacting with an Ethereum Smart Contract.pdf
Please note that in the previous article we deployed the smart contract in Ropsten test network. Since Ropsten test network is expected to be shut down later this year, we have used a similar smart contract deployed in Goerli testnet here.
Contract Address (Goerli): 0x44E84A10341BF772906c37fFc30CDbb132eA35f2
https://goerli.etherscan.io/address/0x44e84a10341bf772906c37ffc30cdbb132ea35f2
Connect your test wallet to the testnet
We can interact with an already deployed smart contract by using its contract address and the ABI. For that, we first need to connect to the blockchain network. Wallets are simple applications allowing users to connect with a blockchain network. They act as account managers who manage the user’s keys and transactions. We will be using a MetaMask wallet to connect with the Goerli test network, which got our smart contract. MetaMask installation is already described in our previous blog on HD Wallets. Kindly follow those instructions to install MetaMask.
Connection goes to mainnet so switch to the testnet
Get test ether from a faucet to fund your wallet
Click on the network name, and enable visibility of test networks. Now switch to Goerli test network.
To interact with the contract using the wallet, it should have some ether balance. Goerli is a test network, and its cryptocurrency (Goerli ETH) is available for free from certain sources called faucets. You can go to any of the below links and request Goerli ETH by sharing your account address.
Faucets: https://goerli-faucet.slock.it/, https://faucet.goerli.mudit.blog/. Remember, these are test ethers which do not have any monetary value.
Interact with the Contract thru an IDE
Remix IDE is an open-source web and desktop application. You can directly access it from your web browser; just go to https://remix.ethereum.org.
Open a new file and copy the ABI from https://goerli.etherscan.io/address/0x44E84A10341BF772906c37fFc30CDbb132eA35f2#code. Save it as filename.abi
Switch to the deploy and run transaction tab from the menu on the left side. Select the environment as Injected Web3 to connect with the MetaMask. Make sure you are logged into MetaMask and connected to the Goerli testnet. Enter the contract address (0x44E84A10341BF772906c37fFc30CDbb132eA35f2) at the designated place and click on At Address as shown in the figure. Remix IDE will ask you for confirmation before loading the contract instance. An instance of the contract will be available under the heading deployed contracts. You can expand it to interact with it.
CALL vs TRANSACTION
Try to invoke the getMessage function by clicking on it. At the console below the editor space, you will get the status of the method call.
The getMessage function of our contract performs a simple read-only operation (CALL), which returns the current value of the message stored on the blockchain. You will be able to view the present value of the message in the log and below the function under deployed contracts.
Now, try to invoke the setMessage function. This function writes a value to the message and stores it on the blockchain. Give a string in the textbox and click on the setMessage.
Since it performs a write operation on the blockchain state, the method invocation is a transaction. The MetaMask will pop up and ask you for transaction confirmation. This operation carries a fee, as displayed in the wallet notification, and it will be deducted from your account. The cost depends upon the requested operation and also some dynamic network parameters. The same function may require a different fee at a later time.
Click on confirm. MetaMask will use your private key to sign the transaction and send it across the network. Once it gets verified by the network and added to the block, you will get a confirmation from MetaMask (it may take approximately 10–15 seconds). The transaction details can be seen in the Remix IDE console also.
Click on the view on etherscan option to view transaction in etherscan. The transaction input data will be in a default encoded format. Click on decode input data to view it in text format.
Deploy a copy of this contract
Do you wish to deploy the smart contract independently?. It’s simple, just copy the contract source code of the smart contract and save it in a .sol file in Remix IDE. Now go to the solidity compiler tab and compile the smart contract. Make sure you see a tick on the compilation icon.
Next, go to the deploy and run transactions tab. Make sure that your MetaMask is active and connected to the test network.
Select deployment environment as Injected Web3 to connect to MetaMask. Deploy the contract. Confirm the MetaMask transaction notification and wait until your contract deployment transaction is confirmed. Now you can interact with the newly deployed smart contract.
Create Solidity Smart Contracts - Baeldung
https://www.baeldung.com/smart-contracts-ethereum-solidity
Creating and Deploying Smart Contracts with Solidity-baeldung.com.pdf link
EVM overview of contract types
From a practical standpoint, the EVM can be thought of as a large, decentralized system containing millions of objects, called accounts, which can maintain an internal database, execute code and talk to each other.
The first type of account is probably the most familiar for the average user who uses the network. Its name is EOA (Externally Owned Account); it is used to transmit value (such as Ether) and is controlled by a private key.
On the other hand, there is another type of account which is the contract. Let's go ahead and see what is this about:
Web3j - run a Java class via API on an Ethereum client
Web3j is a highly modular, reactive, type safe Java and Android library for working with Smart Contracts and integrating with clients (nodes) on the Ethereum network:
Web3j is a lightweight, highly modular, reactive, type safe Java and Android library for working with Smart Contracts and integrating with Ethereum blockchains.
This allows you to work with Ethereum blockchains, without the additional overhead of having to write your own integration code for the platform.
- Web3j integrates seamlessly with the Epirus Blockchain Explorer
- Web3j is 100% open source and maintained by Web3 Labs
- Create projects to work with new or import existing decentralised apps in a single command with the Web3j CLI
- Plugins for leading build tools to simplify the developer experience
- Simple to use framework for automated integration testing against networks within your IDE
Features
- Complete implementation of Ethereum's JSON-RPC client API over HTTP and IPC
- Ethereum wallet support
- Auto-generation of Java smart contract wrappers to create, deploy, transact with and call smart contracts from native Java code (Solidity and Truffle definition formats supported)
- Reactive-functional API for working with filters
- Ethereum Name Service (ENS) support
- Support for OpenEthereum's Personal, and Geth's Personal client APIs
- Support for Alchemy and Infura, so you don't have to run an Ethereum client yourself
- Support for ERC20 and ERC721 token standards
- Comprehensive integration tests demonstrating a number of the above scenarios
- Command line tools
- Android compatible
- Support for JP Morgan's Quorum via web3j-quorum
runtime dependencies:
- RxJava for its reactive-functional API
- OKHttp for HTTP connections
- Jackson Core for fast JSON serialisation/deserialization
- Bouncy Castle for crypto
- Jnr-unixsocket for *nix IPC (not available on Android)
It also uses JavaPoet for generating smart contract wrappers
Convert Solidity Contract to a Java Class for Web3j
https://linuxtut.com/en/7ab984027aa8ff14e4b7/
If you want to use the contract used in solidity with web3j, you need to use Java classes to operate the contract.
Ethereum Optimizations
Optimistic Roll up strategies to combine offline transactions online
https://www.coindesk.com/layer2/2022/02/16/ethereums-rollups-arent-all-built-the-same/
Optimistic rollups do not largely change the trust assumptions of Ethereum, as any user is capable of running a sequencer (Arbitrum full node) that processes transactions and allows users to withdraw funds to mainnet. Sequencers are required to put up a “fidelity bond” on mainnet, thereby creating a financial incentive to be truthful. If another user disputes the sequencer’s transactions, and they are found to be dishonest, the fidelity bond is paid out to the disputer. Financial incentives and multiple sequencers will allow the layer 2s to have strong uptime performance and lean on Ethereum’s security without the concern of interference.
By socializing gas cost across bundled users and only posting calldata to mainnet, Optimistic rollups are able to achieve transaction fees 10-100x cheaper than the corresponding transaction on Ethereum layer 1. These fees will continue to get cheaper as data storage is optimized on mainnet for rollups and sharding, splitting the network in multiple chains to relieve congestion, is eventually implemented.
ZK Rollups
Zero knowledge (zk) rollups bunch together hundreds of off-chain transactions using extensive computation and post them bundled to mainnet in what is known as a “validity proof.” The validity proof is the already computed state of the layer 2 that is sent to mainnet for storage, which contains much less data than the calldata used in Optimistic rollups. Starkware, Polygon Hermez and zkSync are a few of the first implementations of Ethereum based zk rollups creating low cost, application specific layer 2s
Since zk rollups are so computationally intensive and is of limited to a few use cases.
EIP for Stake withdrawals
A new Ethereum Improvement Proposal (EIP) would set the foundation for staked ether withdrawals after the transition to proof-of-stake. BACKGROUND: While the EIP won’t immediately allow validator withdrawals, it sets the stage for the simple upgrade that makes the process possible.
POS consensus
Web3 frameworks for Ethereum
https://web3js.readthedocs.io/en/v1.2.0/getting-started.html
The web3.js library is a collection of modules which contain specific functionality for the ethereum ecosystem.
- The
web3-eth
is for the ethereum blockchain and smart contracts - The
web3-shh
is for the whisper protocol to communicate p2p and broadcast - The
web3-bzz
is for the swarm protocol, the decentralized file storage - The
web3-utils
contains useful helper functions for Dapp developers.
Adding web3.js
First you need to get web3.js into your project. This can be done using the following methods:
- npm:
npm install web3
- meteor:
meteor add ethereum:web3
- pure js: link the
dist/web3.min.js
After that you need to create a web3 instance and set a provider. Ethereum supported Browsers like Mist or MetaMask will have a ethereumProvider
or web3.currentProvider
available. For web3.js, check Web3.givenProvider
. If this property is null
you should connect to a remote/local node.
// in node.js use: var Web3 = require('web3');
var web3 = new Web3(Web3.givenProvider || "ws://localhost:8546");
That’s it! now you can use the web3
object.
EEA Off-Chain Trusted Computing Spec
https://entethalliance.github.io/trusted-computing/spec.html
This document specifies APIs that enable off-chain Trusted Computing for Enterprise Ethereum. In this release, The Trusted Computing specification enables privacy in blockchain translations, moving intensive processing from a main blockchain to improve scalability and latency, and support of attested Oracles
This specification has four objectives:
- Support private transactions on a blockchain between mutually-untrusting parties without disclosing transaction details to other parties who also have access to the blockchain.
- Support disclosure of selected information to chosen parties on a blockchain, while maintaining the secrecy of other information from those same chosen parties ("selective Privacy").
- Move intensive processing from a main blockchain to an off-chain Trusted Compute capability thereby improving throughput and scalability.
- Support Attested Oracles.
These objectives are achieved by executing some parts of a blockchain transaction off the main chain in off-chain trusted computing. There are currently three types of Trusted Compute that are supported by this specification:
- Trusted Execution Environments (Hardware based)
- Zero-Knowledge Proofs (Software based)
- Trusted Multi-Party-Compute (MPC) (Software/Hardware based)
The APIs are grouped in registration, invocation and receipt handing sections. Attested Oracles are considered a special application of Trusted Compute used to create increased trust in an Oracle, and can be implemented using the defined APIs.
Article on EEA TCE
Blockchains can greatly enhance their capacity to meet enterprise requirements around privacy and scalability by using Chainlink oracles to route transactional computation off-chain to the Trusted Computation Framework (TCF).
advantages and limitations of public blockchains, as well as outline the TCF architecture and how attested oracles via Chainlink can enable bi-directional connectivity between on-chain and off-chain environments. To demonstrate how this system works, we detail three industry uses cases in finance, insurance, and global trade in which TCF, Chainlink, and underlying blockchains can work in unison to improve backend business processes and reduce costs for both enterprises and consumers.
Key Points on Ethereum Public Blockchains
- the infrastructure that powers multi-party transactional contracts. They offer a shared computational platform that stores, maintains, executes, and settles the contract for all parties involved. Participating parties can neither decommit from their obligations nor tamper with the process once the contract is set in motion on the blockchain
- No need to trust counterparty or trusted 3rd party
- Data-driven Contract deliverables can automatically be confirmed in many cases ( eg payment, shipments, receipts etc )
- Lower cost, friction, time to settle with smart contracts
- Better transparency and traceability ( provenance ) on origins ( eg Food Trust network tracks lots )
- KYC compliance possible with Self-Sovreign Identities and Zero-Trust Knowledge proofs on public chains where supported
Challenges to overcome on public blockchains
- Scalability ( to fit specific use cases )
- Privacy
- On-chain data scope
Off-chain data, privacy and execution needed to meet these challenges.
Integration with smart contracts needed via trusted agents or oracles.
Trusted agents option
- Trusted agent is invoked by client apps or services
- Agent executes in trusted environment and can access both off-chain data and services as well as on-chain contracts and data
- Agent executes at top level, invokes contract as a service passing required data to the contract including
Oracles option
Blockchain App Development Concepts 101 - slideshare - sweetbridge
https://www.slideshare.net/Synerzip/blockchain-application-development-101
blockchain-application-development-webinar-sweetbridge-190905082233.pdf
Alternate Chains - some EVM compatible
Polygon - faster, low cost EVM compatible protocol delivers a POS multi-chain system
https://coinmarketcap.com/currencies/polygon/
Polygon effectively transforms Ethereum into a full-fledged multi-chain system (aka Internet of Blockchains). This multi-chain system is akin to other ones such as Polkadot, Cosmos, Avalanche etc. with the advantages of Ethereum’s security, vibrant ecosystem and openness.
The $MATIC token will continue to exist and will play an increasingly important role, securing the system and enabling governance.
Polygon (formerly Matic Network) is a Layer 2 scaling solution backed by Binance and Coinbase. The project seeks to stimulate mass adoption of cryptocurrencies by resolving the problems of scalability on many blockchains.
Polygon combines the Plasma Framework and the proof-of-stake blockchain architecture. The Plasma framework used by Polygon as proposed by the co-founder of Ethereum, Vitalik Buterin, allows for the easy execution of scalable and autonomous smart contracts.
Nothing will change for the existing ecosystem built on the Plasma-POS chain. With Polygon, new features are being built around the existing proven technology to expand the ability to cater to diverse needs from the developer ecosystem. Polygon will continue to develop the core technology so that it can scale to a larger ecosystem.
Polygon boasts of up to 65,000 transactions per second on a single side chain, along with a respectable block confirmation time of less than two seconds. The framework also allows for the creation of globally available decentralized financial applications on a single foundational blockchain.
The Plasma framework gives Polygon the potential of housing an unlimited number of decentralized applications on their infrastructure without experiencing the normal drawbacks common on proof-of-work blockchains. So far, Polygon has attracted more than 50 DApps to its PoS-secured Ethereum sidechain.
MATIC, the native tokens of Polygon, is an ERC-20 token running on the Ethereum blockchain. The tokens are used for payment services on Polygon and as a settlement currency between users who operate within the Polygon ecosystem. The transaction fees on Polygon sidechains are also paid in MATIC tokens.
Polygon provides a good approach to the Blockchain trilemma
https://coinmarketcap.com/alexandria/glossary/blockchain-trilemma
decentralization, security and scalability — that developers encounter when building blockchains, forcing them to ultimately sacrifice one "aspect" for as a trade-off to accommodate the other two.
Polygon performance - 65,000 TPS, 2 second block finalization, $.01 transaction fee - 221016
- Ability to process transactions quickly: By using a consensus mechanism that completes the transaction confirmation process in a single block, Polygon can maintain fast transaction processing speeds. Polygon's average block processing time is 2.1 seconds.8
Polygon uses sidechains
https://coinmarketcap.com/alexandria/glossary/side-chain
Polygon uses Layer 2 for scalability
https://coinmarketcap.com/alexandria/glossary/layer-2
Layer 2 is the name given to a scaling solution that enables high throughput of transactions while fully inheriting the security of the underlying blockchain that it is built on.
Zero Knowledge Rollups
Ethereum Scaling Tool Polygon Launches its zkEVM Public Testnet
https://finance.yahoo.com/news/ethereum-scaling-tool-polygon-launches-160000399.html
Polygon is a scaling tool aiming to facilitate lower-cost transactions, and uses the Ethereum blockchain as its base protocol. With the introduction of zero-knowledge (ZK) rollup technology, Polygon is hoping to become the chief scalable system for Ethereum.
With the public testnet going live, some of the biggest decentralized finance (DeFi) platforms, including Aave and Uniswap, as well as Web3 social platform Lens, will be among the first protocols to make use of the zkEVM testnet.
https://coinmarketcap.com/alexandria/glossary/zero-knowledge-rollups
ZK Rollups allow blockchains to validate transactions faster while also ensuring that gas fees remain minimal. Zk-rollups manage to perform better than traditional Layer 1 blockchains like Ethereum because they combine on and off-chain processes.
zk-rollup consists of two Merkle Trees which are both stored on a smart contract, or in other words, on-chain. One tree is dedicated to storing accounts, while the other stores all balances. Any other type of data generated and used by the zk-rollup is stored off-chain.
as less of the blockchain’s capacity is utilized for transaction validation, gas fees decrease
expected launch for ZK Rollup is 3/27/2023
https://thedefiant.io/polygon-zkevm-launch
The offering, which is called a zkEVM, is expected to offer enhanced privacy features and validate transactions faster than other Ethereum scaling solutions. Unlike other L2s powered by zero-knowledge proofs, developers will easily be able to deploy code written for Ethereum on Polygon’s offering.
what are the implementation differences, limitations and challenges of a Polygon private network?
needs answers from the Polygon team
Optimistic Rollups don't require Trusts up front for faster processing but can orphan bad blocks
https://coinmarketcap.com/alexandria/article/optimistic-rollups-for-the-rest-of-us
ORUs support smart contracts with open participation, like Uniswap.
ORUs do not require that users lock up capital upfront.
Unlike channels and Plasma, ORUs are resistant to chain congestion, since fraud is proven at the block level rather than the channel closure or Plasma exit level.
ORU blocks can be posted to Ethereum immediately. Since valid ORU blocks can't be rolled back, they have the same finality guarantees as Ethereum as soon as they're posted to Ethereum.
community has embraced ORUs wholeheartedly as a way to scale Ethereum-style smart contract execution without having to wait for Serenity Phase 2.
Polygon adding zk support to Main net
https://www.yahoo.com/finance/news/polygon-exploring-zk-technology-main-184156444.html
exploring ways to bring “zero knowledge,” or ZK, technology – seen by many experts as a major advancement in cryptography’s use in blockchains – to its main chain.
The effort is in addition to Polygon’s ongoing and previously disclosed plans to release a “ZK rollup” – a type of layer 2 scaling system that aims to increase the speed of blockchain transactions and reduce their cost.
some ZK-based enhancements could eventually be made to Polygon’s main proof-of-stake (POS) chain – a sidechain off Ethereum – as a way of improving transaction security.
By exploring how ZK technology can be integrated into Polygon’s mainchain, the blockchain is betting big that this scaling technique could drive its ecosystem.
“One of the things that we are experimenting with is upgrading the Polygon POS chain to become ZK-secure, so as to include the zkEVM into the Polygon POS chain itself,” Bjelic said
Polygon's ZK rollup, zkEVM
ZK rollups are a type of scaling system that processes transactions faster on the layer 2, or companion system, of a blockchain, then transporting the transaction data back to the mainnet blockchain – in this case Ethereum, which has been plagued at times in recent years with congestion and elevated fee rates. ZK rollups use “proofs” to show that a transaction is valid by only sharing a small amount of information about that transaction.
In October, Polygon released its zkEVM testnet, which deploys the Ethereum Virtual Machine (EVM) for its ZK rollup, meaning Ethereum developers won’t have to use new programming languages and can move over their smart contracts from the main blockchain without any hiccups. Polygon has not set a date for the release of its ZK rollup, other than to previously say it would happen in early 2023.
When released, the zkEVM will live on a separate chain, meaning that the Polygon POS chain will continue to be a sidechain. Sidechains are less secure than ZK rollups, since they don’t inherit the underlying same security from the main Ethereum blockchain.
“POS chain continues to exist and operate the way it does today. And the Polygon zkEVM will be a separate network,” Bjelic said. “We will have two networks running in parallel, with different value propositions, i.e., features and tradeoffs. Each application will be able to decide which level of security, scalability, and transaction fees they prefer, and basically choose the network accordingly.”
The difference between the two chains would be related to the level of security or the transaction throughput and fees that decentralized applications (dapps) would like to make use of.
The ZK rollup would store its transaction data on Ethereum, and completely derive its security from Ethereum, but the tradeoff is that the throughput is smaller, and transaction fees are more expensive. Crypto analysts have made the point that ZK technology can be computationally intensive, possibly even requiring dedicated “ZK acceleration hardware.”
If the Polygon POS becomes ZK-compatible, it would effectively become what’s known as a validium, which uses proofs like in ZK rollups to ensure that transactions aren’t spoofed with. Unlike a ZK rollup, it doesn’t store data on Ethereum, but off-chain on a separate network.
The validium on Polygon could allow for more transactions to be processed and at lower transaction fees, though it wouldn’t submit the transaction data to Ethereum, instead storing the data off-chain, which is considered less secure.
“This year is going to be very important for Polygon in terms of technology because we will be communicating several major tech milestones and upgrades,” Bjelic told CoinDesk.
Polygon believes in Web3 for all. Polygon is a decentralised Ethereum scaling platform that enables developers to build scalable user-friendly dApps with low transaction fees without ever sacrificing on security.
Polygon combines the best of Ethereum and sovereign blockchains into a full-fledged multi-chain system.
It is able to fully benefit from Ethereum’s network effects
It is inherently more secure
It is more open and powerful
Questions
- access controls and models
- security
- governance and insurance
- protocol support
- interoperability
- dev tooling
- firefly fit, portability
Stripe uses polygon for crypto payments network
https://stripe.com/blog/expanding-global-payouts-with-crypto
While the “store of value” aspects of cryptocurrencies typically receive the most attention, we view the prospect of “open-access global financial rails” as being at least equally compelling. As a result, we’ve been exploring ways to use cryptocurrency-based platforms to unlock broader access.
Today, we’re introducing crypto payouts for Connect. With crypto payouts, a select group of creators on Twitter—our first partner—will be able to use cryptocurrency-based rails to receive their earnings from Twitter.
With crypto payouts for Connect, Twitter will make it possible for creators who opt in to have their earnings paid out to a cryptocurrency wallet. Stripe will handle all crypto-related complexity and operations. No code changes are required, and platforms can avoid taking on the challenges of acquiring, storing, or transferring crypto themselves.
Stripe will initially support payouts in USDC, a stablecoin pegged to the US dollar. This will enable many people who wouldn’t otherwise be able to hold dollars to do so. Payouts will take place over the Polygon network, which we chose for its low fees, speed, integration with Ethereum, and broad wallet compatibility (including MetaMask, Coinbase Wallet, and Rainbow). Once creators receive their earnings, they can hold their balance on Polygon, or choose to bridge to Ethereum and exchange it into another currency. We plan to add support for additional rails and payout currencies over time.
wikipedia on polygon
https://en.wikipedia.org/wiki/Polygon
Polygon (formerly MATIC Network) is an Indian blockchain scalability platform. It addresses the challenges faced by Ethereum such as high fees, poor user experience, and low transaction count per second. One of the methods used to address these issues is providing a framework for Proof of Stake transactions.[3] It aims to create a multi-chain blockchain ecosystem compatible with Ethereum.[4] Polygon uses MATIC as its native token.
In April 2022, financial solutions company Stripe chose Polygon for cryptocurrency payments for its “low fees, speed, integration with Ethereum, and compatibility with many wallets”. Twitter was the first beneficiary of the service powered by Polygon
they believe that Ethereum will be the primary blockchain of Web3. But in order for Ethereum to reach the masses cost effectively and Web3 to become mainstream, Polygon will need to be utilized. Co-founder of polygon, Mihailo Bjelic, envisions Polygon eventually becoming "the holy grail of Web3 infrastructure." He believes the ideal Web3 blockchain should possess three primary characteristics: "scalability, security, and Ethereum compatibility" -- something Polygon surely possesses.
Compare Polygon, Solana and Ethereum on performance, cost
https://www.blockchain-council.org/blockchain/solana-vs-polygon-vs-ethereum/
Polygon and Solana have different approaches to performance
https://finance.yahoo.com/news/solana-vs-polygon-developer-perspective-151000538.html
Solana vs Polygon A Developers Perspective.pdf file
Solana vs Polygon A Developers Perspective.pdf link
On Solana, blocks can theoretically reach a maximum size of 128MB. The Solana Turbine protocol breaks a block into 1280 byte packets called shreds. Through Solana’s Tower BFT protocol, these can be verified concurrently by separate validators, enabling parallelized computation.
On Polygon, the block size for the POS chain is currently between 50-120KB. There is a product in development called Polygon Avail that should increase this capacity. Avail is a data availability protocol that sits on top of the Polygon POS chain to increase storage. It is currently spec’d at 2MB per block with a 20 second block time though may scale to 128MB (with a theoretical minimum block time for a block that size of 5 seconds).
scaling
A one sentence summary of how Solana and Polygon differ on their approach to scaling would be: Solana is built to keep everything on a single chain and Polygon is built to add more concurrent chains that merge state periodically.
To expand on this, a Solana cluster (set of validators contributing to consensus) has a leader schedule. This leader schedule enumerates which validator will be verifying each block (a.k.a. a slot on Solana). With a predefined leader schedule, transactions are forwarded to the scheduled leader, cutting down on unnecessary coordination.
Potential Value Opportunities
Learning basic Ethereum Blockchain
Joshua Ellul 09:44 AM
It depends. If you have programming experience, then I would say find tutorials online and just get your hands dirty. You can use remix.ethereum.org which is an easy to use IDE to start trying out some smart contracts. There are also other languages supported by different platforms, e.g. cosmos: golang; substrate/polkadot: Rust; Neo/stratis: .NET; Algorand: Python and many more
If you do not have programming experience, I would recommend starting a programming course in a language like Python.
Joshua Ellul 09:46 AM
I had also written aa tutorial, that I tried to make as easy as possible to follow:
http://blockchainthings.io/article.aspx?i=2&t=1
http://blockchainthings.io/article.aspx?i=3&t=1
http://blockchainthings.io/article.aspx?i=7&t=1
http://blockchainthings.io/article.aspx?i=9&t=1
http://blockchainthings.io/article.aspx?i=10&t=1
http://blockchainthings.io/article.aspx?i=12&t=1
http://blockchainthings.io/article.aspx?i=13&t=1
Joshua Ellul 09:49 AM
There are also some smart contract platforms that allow for them to be created using templates (e.g. a web based interface), and no-code platforms. As well as some that allow for natural language (English etc) definition of smart contracts
Joshua Ellul 09:53 AM
I haven’t tried this, but it may be something to look into: https://transientnetwork.io/
Potential Challenges
Better DLT Software Governance, Quality and Productivity Needed
https://cointelegraph.com/news/programming-languages-prevent-mainstream-defi
smart-contract-gaps-2022-Programming languages prevent mainstream DeFi.pdf file
smart-contract-gaps-2022-Programming languages prevent mainstream DeFi.pdf link
Current Contract Languages, DLTs and DSLs come up short.
DAML has a DSL that comes up short on automation, events, control on quality, extensibility
Firefly is good in approach but has room for improvement in most areas
Fabric is mature in many DLT features compared to other chains but needs better integration w multiple identity models, CA services, smarter client request management ( via APIs ) and more
Governance is missing on smart contract review and testing ( think OWASP open source solutions but applied to Smart Contracts, Assets, Custody, Settlement and more )
Candidate Solutions
Step-by-step guide for Example
sample code block