PegNet Part Three: Conversions, Transactions, and more — Factomize

  1. Ease-of-use: A transaction is always 1:1. If you want to pay a bill of 100 pUSD, you don’t have to worry about current exchange prices at all, you just have to send 100 pUSD. This means a transaction from one party to another will always go through provided you have the necessary funds.
  2. Regulatory Concerns: PegNet’s ability to seamlessly change assets from one to another is new ground, where the rules aren’t exactly clear. Typically taxable events are between two parties but internal conversions are not tracked. By removing the ability to convert and transact at the same time, the hope is that PegNet conversions remain internal conversions. Though I have to point out that I’m a developer with minimal knowledge of tax laws and how it ultimately will be taxed will depend on your local laws.
  3. Faster Transactions: This is described in more detail below but by separating the logic, we can process transactions in the same block they’re sent, meaning they’ll take somewhere between 0 and 10 minutes to complete.

Transactions

Conversions

  1. There are two types of conversions
  2. Conversions are processed in the next block, meaning they’ll take somewhere between 10 and 20 minutes to complete

Conversion Types

Type A: I want to convert X pUSD to pFCT

Type B: I want to convert enough pUSD to create Y pFCT

Finality: Why 20 minutes?

PegNet behavior during two factom blocks

The Problem

  1. At minute N, the price of BTC is 10,000 USD = 1 BTC
  2. At minute N+8, the price of BTC is 10,100 USD = 1 BTC
  3. A savvy trader compares the prices and sees that BTC is going to swing up, so they convert 1,000 pUSD to pBTC
  4. At minute M, the trader is credited with 0.1 BTC using the exchange rate of minute N
  5. At minute M, the price of BTC ends up being 10,990 pUSD = 1 BTC, pretty close to the number in 2.
  6. At minute M+8, the price of BTC plummets down to 9,000 USD = 1 BTC
  7. The trader converts 0.1 pBTC back to pUSD
  8. At the end of block M, the trader is credited with 1,099 pUSD

The Solution

  1. Select 50 OPRs with the highest difficulty
  2. Calculate the normalized average for every asset
  3. Throw out the OPR with values farthest from the average using a band of 1%
  4. Repeat steps 2 and 3 until there are 25 left
  5. Every OPR in 4. gets awarded 200 PEG
  6. Repeat steps 2 and 3 until there is one OPR left but this time without the band
  7. The remaining OPR is the winner

A Visual Explanation

(the real graph would have 30 axes instead of just 2)

Why 1%?

Percentage difference between the lowest and the highest price point sampled every 10 minutes
Price of USD-EUR over five day period, sampled every 10 minutes
Price of USD-Bitcoin over five day period, sampled every 10 minutes

Not The End

--

--

--

Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How Blockchain Technology Helps Science Progress

Roadshow: NGK Korea Roadshow was successfully held to boost the development of blockchain finance

Liquidity Mining Program on GYSR

Smart Contract — A Technological Innovation Step To Help Fight The Disease

GDPR Vs blockchain. The ‘right to be forgotten’ versus the technology that never forgets

The Griddl3 NFT Music Platform

The Goal of NFTs

The Tallest Building in the World is up for Sale

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Who

Who

Developer

More from Medium

US ‘negotiating deal between Saudi Arabia, Israel and Egypt’

“Financial Freedom ed” tells you about stock — SenseTime-W (00020.HK)

Lore — Chapter 10 — “GRAND OPENING”

Your Apple Watch May Know You Have Coronavirus Before You Do