SIP 94: Virtual Synth Fix to Ensure Settlement Is Connected Source

AuthorJustin J Moses
Discussions-Tohttps://research.synthetix.io
StatusApproved
Created2020-11-12

Simple Summary

Ensure the Virtual Synth (vSynth) implementation (SIP-89) correctly tracks the virtual synth address for settlement

Abstract

Patch release the vSynth implementation to ensure the following:

  1. Major: Exchange settlement tracks the virtual synth not the msg.sender.
  2. Minor: vSynths to use synth proxies not the underlying address
  3. Incidental: Adding trackingCode as final argument to exchangeWithVirtual
  4. Incidental: Minor changes to VirtualSynthCreated event signature

Motivation

  1. The vSynth release in Mimosa had a bug whereby the exchange settlement was using the msg.sender not the vSynth contract address. This meant that settling the vSynth wasn’t connected to the underlying synth settlement, and would require an additional settlement at the synth level
  2. vSynths use underlying Synth addresses to transfer synths after settlement, however this is brittle when the protocol upgrades and disconnects the old underlying Synths. The solution is to use their proxies.
  3. Adding an optional tracking code helps include volume incentive when necessary
  4. Minor changes to include the address recipient of the vSynth supply.

Specification

Please see https://github.com/Synthetixio/synthetix/pull/881

Configurable Values (Via SCCP)

N/A

Copyright and related rights waived via CC0.