1. Developer
  2. Creating a Synthetic

Developer

Creating a Synthetic

Anyone can create new synthetic assets on S&F.

A synthetic asset is defined by the Oracle address, the Oracle slot (an oracle has 8 price slots referrencing each a different asset), the amount of leverage and the kind of synthetic, either long or short, which stands as stip or flip on S&F.

If an asset with the same parameters has already been created it cannot be created twice.

While the S&F contracts are completely permissionless, the frontend is not, S&F will only present a list of token it has previously approved.

The function to create a synthetic asset is createSynth and is available on the SynthFactory contract.

A word on the Oracle

To create a new Synthetic, you will probably need to create an Oracle first.

The Oracle can implement any logic you want, it does not need to implement the same contract S&F is using, however, the interface must be the same. And it must implement a receive function to get the payout from the swap fees.