SIP-312: Cross-chain Pool Synthesis (V3)

Author
StatusDraft
TypeGovernance
NetworkEthereum & Optimism
ImplementorDaniel Beal (@dbeal-eth), Noah Litvin (@noahlitvin)
ReleaseTBD
Created2022-11-01

Simple Summary

This SIP proposes functionality that enables pools to back markets on any chain with a Synthetix core system deployment.

Abstract

This entails use of an on-demand oracle and cross-chain messaging to allow an unlimited number of pools to synthesize their debt and credit across an arbitrary number of chains. Functions that require cross-chain data on-demand will comply with EIP-3668.

Motivation

This proposal aims to achieve equivalent functionality to SIP-165 but for an unlimited number of permissionless pools without requiring custom oracles or creating additional trust assumptions.

Depending on the availability of an on-demand oracle suited to the specification below, we may propose implementing cross-chain pool synthesis in a manner more similar to SIP-165 only for pools specified by governance as an interim solution.

Technical Specification

Overview

With cross-chain messaging, the protocol is able to synchronize configuration settings across chains. With an on-demand oracle, smart contracts would be able to receive data from other chains in a trustless and decentralized manner. Relying on these systems, the protocol can be updated to achieve cross-chain pool synthesis, as outlined below.

Rationale

This proposal entails synthesizing pools across chains, rather than other entities in the system. Markets exist outside of the core system and therefore not under consideration. Accounts and their staking positions will stay unique per chain, as this ensures it is always possible to clearly associate an account with all of the staked collateral on a particular deployment of Synthetix.

Technical Specification

On-Demand Oracle

This system depends on an on-demand oracle. This is a decentralized oracle system which is able to fulfill network requests off-chain. The request could specify data to read from all chains with a Synthetix core system deployment. The return data would consist of a signed blob of data including the requested data. This blob can then be provided as parameter for on-chain functions, have the signature cryptographically verified, and then have the data cached if necessary. These off-chain data sources will be specified in compliance with EIP-3668.

Core Protocol Updates

References to markets throughout the protocol would be updated such that they include a chainId in addition to a marketId. The following functions would be updated accordingly:

  • createPool() - Trigger CCIP messages (broadcast to all chains with a Synthetix V3 core protocol deployment) to create a pool with same ID and owner on other chains. If the ID conflicts with another request to create a pool, the message with the lowest timestamp will take priority.
  • setPoolConfiguration() - Broadcast the new configuration to all chains for a given pool, have them receive the message, and update accordingly.
  • delegateCollateral() - This function will receive data from the on-demand oracle to use when determining the collateral and debt associated with the relevant pool.
  • liquidate() and liquidateVault() - Both of these functions will receive data from the on-demand oracle to determine the current total collateralization for the relevant staking position or vault.

For adjustments where pool liquidity is being reduced, the off-chain oracle must be leveraged to prove that sufficient collateral is not locked by markets, per SIP-309.

Test Cases

Relevant tests will be developed during implementation.

Configurable Values (Via SCCP)

N/A

Copyright and related rights waived via CC0.