tl;dr: Acala wants to build a Starport on Acala as a gateway into the Polkadot ecosystem. The purpose of this post is to share our proposal and receive feedback from the community.
Introduction
Acala pioneered the idea and implementation of a full-stack (Substrate + EVM) specialized blockchain focusing on decentralized finance (DeFi), and created multiple DeFi primitives that became a DeFi hub and infrastructure serving the Polkadot and Kusama ecosystem: multi-collateralized stablecoin using DOT and cross-chain assets like BTC, integrated liquidation process using Off-chain workers and a hybrid of built-in AMM and auctions, tokenized staked assets e.g. Liquid DOT (LDOT), and bring-your-own-gas where fees are payable in any supported assets like stablecoins.
Polkadot is a layer-0 protocol that merely provides shared PoS security and cross-chain communication for its connected parachains. Other chain-specific and application-specific logic, such as EVM and smart contracts, are implemented on parachains. Acala’s parachain plays the role of DeFi hub and a landing pad that aggregates assets and liquidity from a variety of blockchains.
Acala is a firm believer and a long-term builder for the multi-chain future - reducing liquidity fragmentation, increasing composability and DeFi accessibility to everyone, and sharing the same vision as the Compound Chain/Gateway. The Acala team has been building on and contributing to the Substrate code-base for 2+ years, and therefore would like to contribute to Compound Chain’s effort by deploying Acala Starport as a gateway into the Polkadot ecosystem, making such Starport implementation also available to all Polkadot parachains, and providing tooling to read events from and to both chains.
Proposal
Acala would like to propose the following:
#1 Deploy Acala Starport as the gateway into the Polkadot Ecosystem
Acala will deploy Starport as a Substrate pallet, whereby all assets are downloadable to the Starport will be available to all DeFi protocols available on Acala, in the Acala EVM useable by smart contracts, cross-chain capable with Polkadot and its parachains, and later available in Ink!. Acala will also contribute to extend and make the events and offchain workers more generic for varied blockchains.
We will integrate the Polkadot{js} extension which is the predominant signer/wallet for the Polkadot Ecosystem to the Compound Cash Dashboard. We will also integrate the Compound-Acala service into the Acala DApp and/or the mobile app via Polkawallet.
All of the Acala Starport code would be generic enough to be adopted by any parachains and Substrate-based chains for that matter, with a goal to accelerate the innovation for bridging more cross-chain assets together.
#2 New collateral asset: DOT
We’d like to propose DOT as a new collateral asset on Compound Chain. DOT can be trustlessly transferred between Polkadot Relay Chain and the Acala parachain via Cross-chain Message Passing (XCMP). Polkadot Relay chain keeps the DOT balances of each parachain, and the balances are updated when a transfer happens between the Relay chain and a parachain, as well as between parachains, all trustlessly. Since Polkadot Relay chain does not host any logic (smart contracts or pallets) other than those essential to a Relay chain, namely PoS consensus and cross-chain communication, DOT uploaded to Compound Chain will have to be done on a parachain. Shared Protected Runtime Execution Enclaves (SPREE), which is on Polkadot’s roadmap (later the year), will add another level of security guarantee to this.
Acala’s source code has been audited and any new features will also be audited before launching on mainnet. Acala’s governance is managed on-chain for both voting and execution. We employ delayed execution for runtime upgrades and parameter changes on-chain. Monitoring can be easily set up to alert any suspicious behaviors as another added layer of protection for DOT integrity.
#3 New collateral asset: Liquid DOT (LDOT)
In addition to DOT, we’d like to propose another native asset as collateral on Compound Chain - Liquid DOT (LDOT). LDOT ****is the tokenized staked DOT (similar to DAI-and-cDAI) bearing Polkadot’s staking yield. Polkadot’s economy has a targeted staking ratio of 50%, parachain bonding of about 30%, and the remainder is liquid. With an average staking yield of 20% APY, DOT is relatively expensive to be used directly in DeFi. And one also would not want to sacrifice network security for yield farming.
Therefore Acala created the Liquid Staking protocol that allows users to trustlessly stake DOT, and use the tokenized staked DOT, LDOT, in trading, borrowing, lending and other DeFi activities. We believe with its trustless and yield-bearing nature, LDOT would be a quality and popular addition to the Compound Chain collateral set.
#4 Download CASH and a potential fee token
Once CASH is downloaded to the Acala Starport pallet, it would immediately be plugged into Acala’s DeFi protocols, e.g. listed in AMM DeX, and also be cross-chain capable via cross-chain consensus (XCM) to the Polkadot Relay Chain and other connected parachains. Acala will also make CASH available as a pre-compiled ERC20 contract readily composable in the EVM.
Beyond that, we also propose to make CASH a native fee token on Acala. With pooled peer-blockchain-assets-to-protocol liquidity, the interest-bearing CASH can be expected to be a popular asset that users would hold and use to pay for things. It’s a great usability booster for CASH users to transact on Acala without the need to hold Acala/Polkadot native assets.
Motivation
Polkadot is a layer-0 blockchain scalability solution that provides network security as a service (“shared security”) and trustless cross-chain communication as a service to all parachains connected to it. Each parachain can be customized and optimized for its domain (i.e. Acala is optimized for DeFi), and many DApps (in the form of Substrate pallet or smart contract or both) can be deployed on each parachain.
Acala aims to democratize finance and make DeFi more accessible to everyone with a full-stack chain to DApp approach to delivering the user experience that would not otherwise possible. Acala’s suite of DeFi products has gained significant traction through its slick DApp design and native mobile experience via Polkawallet (a founding member of Acala, Polkawallet has 45,000+ installs and a recognized tool by Polkadot). Acala’s live testnet (TC5) has 50,000+ new accounts, and 780,000+ signed extrinsics (See Subscan) with a large and ever-growing community. Acala has completed three security audits from Trail of Bits, SRLabs and Slow Mist. As soon as parachain slots become available on Polkadot, Acala is ready to launch mainnet.
Compound is one of the most respected and established protocols in DeFi, serving many users and as a DeFi primitive to many other protocols on Ethereum. Compound Chain is a significant step towards serving a much wider audience by bridging together digital assets from a variety of blockchains. Therefore it is beneficial to all three ecosystems for us to bring Compound’s service to the wider Polkadot ecosystem through Acala’s parachain.
The Acala team is one of the earliest Substrate Builders, members of the team (e.g. @xlc) are also top contributors (outside of Parity) to the Substrate code-base. Not only would we deliver high-quality code and products, we will also make the code generic enough to be applicable for all parachains and Substrate-based chains for that matter. We have done this before - we are the creator of the open-runtime-module-library - a community repo that includes a set of common-good pallets to accelerate application development on Substrate. We have also pioneered XCM implementation for fungible tokens which has been adopted by many parachains testing on Rococo (Polkadot’s parachain testnet).
We can’t wait to make this happen!
Development Plan
Milestone #1 Starport pallet
- Support lock to upload asset
- Support execTrxRequest to execute transaction request on Compound Chain
- Support invoke to execute notices from Compound Chain
- Necessary Governance features
Milestone #2 Offchain Worker & Message Passing
- Develop Substrate RPC client for Offchain Worker
- Support subscript events to fetch and decode events from a Substrate full node
- Basic XCM asset handling in Compound Chain
- Substrate based chain will use XCM as crosschain asset identifier
Milestone #3 Integration & Oracle
- End-to-end integration
- Release public testnet
- Compound Cash Dashboard to support Acala Starport, assets and Polkadot{js} extension
- Add LDOT and DOT price feed to the Open Price Feed
Milestone #4 Dapps
- Launch Compound-Acala service in Acala web and/or mobile DApps
- Acala Starport information will be readily queryable
Effort Estimation
Total effort: 25 weeks (1 FTE)
- Milestone #1: 8 weeks (1 FTE Engineer)
- Milestone #2: 12 weeks (1 FTE Engineer)
- Milestone #3: 6 weeks (1 FTE Engineer)
-
Milestone #4: 6 weeks (1 FTE)
- 1-2 week FTE Designer
- 4-55 week FTE Full-stack Engineer
- 5 weeks FTE Product Manager
Delivery estimate: ~3 months as M1, part of M2 and M4 can be developed concurrently. If we put 2 FTE Engineers on the project, then delivery can be shortened to ~2 months.
Rough bare cost: USD$111k~
Conclusion
The Acala team firmly believes that this contribution will be beneficial to Compound Chain, Acala and Polkadot ecosystem creating a win-win-win situation with a more evolved and cheaper money market service, more collateral asset variety, and much wider user adoption across multiple blockchains. We may request small amount of grant from the Compound treasury and Web3 Foundation to partially fund the initiative, but in principle, we are keen to carry out the plan regardless.
We hope to hear your thoughts, feedback and suggestions in the thread below.
https://github.com/AcalaNetwork
Regards