JediSwap

0 20
Avatar for Erasto6525
2 years ago

JediSwap

First permissionless AMM on StarkNet

Introduction:

JediSwap is the first fully permissionless and composable AMM on StarkNet. Thanks to StarkNet, on JediSwap, users will be able to swap their assets instantaneously without any gas fee while relying on the security of Ethereum as the base layer. Once JediSwap comes out of beta, anyone will be able to add a pair on JediSwap without asking for anyone’s permission. Also, builders can build any kind of advanced applications leveraging the composable nature of JediSwap.


JediSwap Thesis

The blockchain trilemma

Monolithic Blockchains suffer from the infamous blockchain trilemma.


All blockchains have three properties- scalability, decentralization, and security. The blockchain trilemma dictates that you can only optimize for two of the three properties. Due to technical limitations, you must sacrifice one of the properties to optimize the other two. Those three properties of a blockchain are: 


  • Scalability - What’s the data throughput of the system? How many TPS?

  • Decentralization - How many nodes are there? Where are the centers of power?

  • Security -  How difficult is it to attack?


Modular Blockchains solve this trilemma.

Multiple components drive these blockchain properties. 

  • Consensus

  • Execution

  • Data Availability


Monolithic Blockchains try to do all three things in the same spot. Most blockchains to date, including Ethereum(as it currently stands), are monolithic blockchains. When you modularize these components, the limitations of the blockchain trilemma disappear.


Modular blockchains take the three components and compartmentalize them and allow us to optimize each component individually and produce a far better architecture as a whole.


Ethereum has the best strategy for blockchain scaling


Consensus

ETH is moving to Proof of Stake(POS) for its consensus mechanism. POS substantially decreases the cost of providing security to the blockchain. That enables more participants to contribute to the consensus.


Data Availability

Ethereum is modularizing its data storage capacity via sharding. Shards maximize the block space available on L1. Sharding redistributes security across a higher number of chains, rather than having all the system’s security wholly pointed upon one single chain. 


Execution

Ethereum is moving towards a rollup-centric architecture. Rollups can process transactions orders of magnitude faster than the mainchain!


The bridge between a rollup and Ethereum allows the settlement assurances of Ethereum regardless of whether the rollup is online and functioning. This bridge connects the security and decentralization of Ethereum to the transaction execution environment of the rollup.


Synergies between these Optimized Modules 

The beauty of the modular design is that the optimizations of each module amplify the optimizations in the others.


  • POS enables more validators to come online, which supports additional data. Thus, more decentralization leads to more scale. 

  • Additional shards amplify the execution capacity of rollups. Rollups can compress a lot of data before adding it to an L1 shard, so shards’ additional space has outsized impacts on the space available on rollups. Hence more scale leads to faster execution.

  • Higher transaction activity on rollups means more fees are paid for buying L1 block space. It leads to higher revenue paid to L1 validators, incentivizing additional validators to spin up. Adding more validators to the L1 adds computational resources to create more shards.



This modular architecture will make Ethereum capable of securing micro-transactions. And everyone in the world will be using Ethereum on the backend via different applications.


Check out the links below to learn more on monolithic blockchain vs. modular blockchains and why Ethereum has the best chance to win as an L1. 

https://newsletter.banklesshq.com/p/ultra-scalable-ethereum 

https://www.youtube.com/watch?v=xjxyjgWiqLE


ZKRollups are the best solution to blockchain scalability.


There are two types of rollups with different security models:


  • Optimistic Rollups: assumes transactions are valid by default and only runs computation, via a fraud-proof, in the event of a challenge.

  • Zero-knowledge Rollups: runs computation off-chain and submits a validity proof to the chain.


ZKRollups are far more advanced solutions, especially for use cases that require higher transaction activity.

  • Faster finality time since the state is instantly verified once the proofs are sent to the main chain

  • Not vulnerable to the economic attacks that Optimistic Rollups can be vulnerable to

  • Secure and decentralized since the data needed to recover the state is stored on the L1 chain.


StarkNet is leading the charge with ZK-Rollups.

StarkNet is a permissionless decentralized ZK-Rollup that operates as an L2 network over Ethereum. StarkNet enables any dapp to achieve unlimited scale without compromising Ethereum’s composability and security.


Types to ZK proofs


There are majorly two types of Zero-Knowledge Proofs used by different blockchains/applications:

  • ZK-Snarks

  • ZK-Starks


StarkNet uses ZK-Starks proofs which have certain advantages compared to ZK-Snarks.


  • ZK-STARKs are more efficient computationally.

  • ZK-STARKs do not require an initial trusted setup.


ZK-STARKs rely on leaner cryptography through collision-resistant hash functions. This approach eliminates the number-theoretic assumptions of ZK-SNARKs that are computationally expensive and theoretically prone to attack by quantum computers. Ethereum’s plan for quantum resistance later this decade is to ZK-STARK the entire blockchain.


ZK-Starks’ only major drawback is that ZK-Stark proof size is huge, which means it will require more block space on L1. StarkNet solves this issue using SHARP. Also, EIP-4488 will reduce the block space required by rollups on L1 by a factor of 5.


SHARP

Sharp (SHARed Prover) collects batches from several StarkNet-powered applications before packing them into one proof. Because of this, StarkNet offers significantly better gas usage per transaction and faster finality time, even for low bandwidth applications.



Check out the below links to learn more on Zero-Knowledge Proofs:

https://academy.binance.com/en/articles/zk-snarks-and-zk-starks-explained

https://docs.starkware.co/starkex-v3/starkex-deep-dive/how-cairo-is-used-in-starkex

https://vitalik.ca/general/2021/01/05/rollup.html

https://newsletter.banklesshq.com/p/the-best-comparison-on-zkrollups

https://github.com/matter-labs/awesome-zero-knowledge-proofs

https://ethereum.stackexchange.com/a/68726

https://en.wikipedia.org/wiki/Zero-knowledge_proof#Zero-Knowledge_Proof_Protocols


The need for an affordable, fast, and secure DeFi ecosystem

DeFi has to be affordable, fast, and secure to be usable by everyone in the world. StarkNet is the front runner to enable such an ecosystem.


To spin up a wide DeFi ecosystem, we have to build the basic building blocks of DeFi on StarkNet. Few of the basic building blocks include

  • Bridge: Bridges enable the transfer of assets/messages from L1 to L2 and vice versa. StarkWare is soon launching an official bridge for StarkNet.

  • AMM: AMMs enable the exchange of assets in a permissionless way and help attract liquidity by opening passive yield opportunities. AMMs also open up design space for developers to build more advanced applications on top of them.

  • Lending and Borrowing: Lending helps attract liquidity by enabling passive yield opportunities for asset holders. Borrowing enables advanced use cases like leverage trading. Lending and Borrowing also open up the design space for developers to build more advanced applications on top of them.


JediSwap: The 1st permissionless AMM on StarkNet

JediSwap is the first AMM on StarkNet, powering a gasless, instant exchange of assets in a permissionless way. To achieve this, JediSwap uses the constant product market-making model (x*y=k) first published by Yi Zhang, Xiaohong Chen, and Daejun Park. JediSwap has taken inspiration from the Uniswap v2 architecture for implementation.


JediSwap is going to be a permissionless and composable protocol. Users can add any asset pair without asking for anyone’s permission. Builder can build different protocols/applications on top of the JediSwap contracts on StarkNet. 


JediSwap believes in the power of open source and how it helps humanity innovate further. All of JediSwap’s code is open source, and one can use it in any way they see fit.


Read more about the Constant Product Market Maker model below links. https://github.com/runtimeverification/verified-smart-contracts/blob/uniswap/uniswap/x-y-k.pdf 

https://uniswap.org/whitepaper.pdf


Milestones:

  • V1 Smart contracts with swap and pool adding functionality

  • Testing on local StarkNet instance

  • Charts(TVL, trade volume, etc.) - waiting for events support in cairo

  • Website: By Dec end

    • Design

    • Development - In progress

  • Public alpha launch - By Dec end - Waiting for StarkNet bridge to be launched

  • Ability to add pools in a permissionless way- waiting for the factory pattern from StarkNet

  • Leverage trading - In progress

  • Market make on order book exchange like ZigZag - In progress

  • Custom Fee pools



Team:

Mesh Finance DAO: a community of deeply passionate folks to bring DeFi to everyone

  • A community of 700 folks deeply passionate about DeFi

  • 100+ contributors - #people who invest their time building Mesh Finance (devs, design, product, research, growth, etc.)

Led by Mudrex team - Prince and Rohit

  • Founded Mudrex - backed by Y Combinator, Naval, Nexus Ventures, Arkam Ventures, Village Global, Tribe Cap

  • Processed $2B in trade volume

  • Used by 50k users

  • Deployed multiple contracts on Ethereum, Arbitrum, and Polygon

  • $1M TVL in 72 hours for 1st alpha product (smart contract hard cap for testing)

  • Deep understanding of web3, well connected with passionate web3 devs

Rohit:

  • Rohit advise multiple web3 projects, including Questbook, BIP.so, Stader

  • Founded a gaming studio and bootstrapped it to 3M users

  • Loves coding, community building, hosting and joining web3 podcasts, writing about web3

Prince:

  • Founded Niffler (raised venture capital and sold)

  • Started career as an Algo Trader for Deutsche Bank

  • Tech lead at Tapzo (acquired by Amazon)

  • Love hacking and building


Mesh Advisors:

  • Ryan Sean Adams from Bankless

  • Vijay Chetty from DyDx



Supported by:

  • StarkWare

  • Blocktower

  • Maven 11

  • Solidity Ventures

1
$ 0.00
Avatar for Erasto6525
2 years ago

Comments