Amarok Hardfork: Overview #799
ArjunBhuptani
started this conversation in
Specs
Replies: 2 comments
-
Wanted to add some of our discussion points from today as a reminder. MVP may or may not include stuff from these topics, but we may want to circle back soon:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Do I understand correctly, that (long-term) you're considering having a specialized "app chain" running Cosmos SDK to auction routers' bids? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
🐺 Amarok
Amarok is the first network upgrade/hardfork for Connext. It involves extensive changes to the core protocol flow for nxtp, and will massively improve both developer experience as well as the process of running a router.
This discussion will describe our motivation for these proposed changes, walk through the new flow of a transaction or crosschain message, and then explain how the network upgrade will affect the different stakeholders in our network.
Motivation
The impetus for this upgrade is to solve the following key problems that currently exist for the different types of stakeholders in the network.
Problems for End Users
prepare
d correctly by a router. This means that users must remain online to manually "claim" a transaction if they want the flow to be noncustodial. This also means that contract-initiated transfers of funds (e.g. from a Gnosis Safe or DAO) are not able to be easily supported.Problems for Developers
Problems for Routers
Out of Scope
The following problems are explicitly out of scope for this upgrade:
TransactionManager.sol
contract. This is a core part of the locally verified security mechanism, and so will not be able to be changed.Proposed Solution
Modular Interoperability
We want Connext to become the interchain communication network that developers use to build fully expressive crosschain applications. Our thesis on how to do this is to move towards modularizing the specific functionalities that make up crosschain communication such that there is now a protocol stack rather than a monolithic system.
We believe this stack will something like the following:
(routes to the correct messaging protocol!)
Note that we are explicitly splitting out the existing functionality of Nxtp as the liquidity layer and routers who will continue to provide liquidity but eventually will also be responsible for transporting data correctly between chains.
Nomad: Generalized Crosschain Messaging
While we fully expect that Connext will plug into other trustless messaging systems within a given sovereign zone (e.g. IBC), we are tightly focusing on Nomad as the messaging back bone of the network.
Nomad is a crosschain communication protocol that uses ORU-style fraud proofs for security. Nomad is easy to deploy to new chains, cheap to use, and expressive. However, because of the fraud proof model, it introduces higher latency (30-60 minutes) for message passing. After extensive research, we believe Nomad offers the best possible set of tradeoffs for the lower level communication layer, particularly as Nxtp (liquidity layer) can still be used in many cases to execute crosschain transfers instantly. We'll explain the mechanism for this below.
To learn more about Nomad, check out their docs!
Removing Signatures
Locally verified systems require the use of some "proof" to unlock an LP's inbound funds after they have successfully fronted capital to a user. The current model uses a signature from the user to verify that a transaction was completed correctly, and the route for a given transaction (which router is used) is determined upfront and recorded onchain such that the router can claim their funds on the origin chain with the user's signature.
If there is an existing trust-minimized generalized messaging layer, like Nomad, then an external proof mechanism is no longer needed. Instead, a router can simply front capital on the destination chain, and then wait for data from the origin chain to be ported over the messaging layer to destination, where both the user and router transactions can be compared for validity (and the router can replenish their capital). This was a model explored initially in the constructions of projects like Nova and Hop.
Importantly, in this case there is no more need for a user to specify upfront which router they would be working with at all. Instead, only 1 of N routers must be willing/able to provide capital for the transaction to be completed quickly.
Consenus Routing
If no router is explicitly specified, it stands to reason that routers would race each other in the mempool to complete any given transaction. This is a suboptimal outcome for everyone as all but one router transaction would be reverted onchain and cost gas.
To fix this, routers can achieve offchain consensus on the best router to complete a given tx. It is important to note that this does not affect the security model in any way. The security of consensus affects only the fee revenue and fairness of work given to routers, not the custody of funds or safety of the system.
Our current expectation here is to use tendermint consensus for this, given the maturity of the Cosmos SDK and experience of existing routers with validating tendermint chains. We can require onchain that router operators bond value to participate in the network, and have tendermint validators slash routers that try to circumvent consensus.
In the short term, we will ship a centralized auctioneer service (similar to a rollup sequencer) to get the network live faster + maintain a whitelist of routers.
Core Flow
Now we get into the meat of the new system.
A transaction flowing through Connext will now have the following lifecycle: note: interfaces still in flux here!
xcall
function on our contracts, passing in funds, gas details, arbitrary data, and a target address object (includes chain info). Note thatxcall
is meant to mimic solidity's lower levelcall
as best as possible.--> At this point, the user's tx has already been completed!
Stakeholder Changes
Users
Developers
foo()
on destination chain contract, which then calls the callbackbar()
on origin with returned data. 👀Routers
Some trade-offs/considerations:
6. The scope of the router increases somewhat - in addition to providing liquidity for fund transfers, routers will also need to execute transactions that may have little to no value included as part of them. Our long term vision is that routers become the base crosschain transport layer described in Modular Interoperability above.
7. To mitigate liquidity fragmentation and simplify router operations, routers must hold their liquidity in Nomad-minted assets. This can and will be largely abstracted from the router experience, however.
8. Routers may need to have RPC connections to a larger number of chains - we need to think through this a little more.
Other Considerations
Open Questions (WIP)
Beta Was this translation helpful? Give feedback.
All reactions