# USDPG Primary Market

Primary market particpants are defined as any market actor directly involed in issuance, redemption, and arbitrage of USDPG by interacting directly with the Portfolio Protocol.

Issuance and redemption features may be accessed through the Portfolio Interface (opens in a new tab). Arbitrage must be performed via direct interaction with the Portfolio Protocol.

Due to transaction costs and USDC/USDT inventory requirements for participating in the primary market, it is recommend to first explore secondary market offerings of USDPG.

## Issuance

- Approve the Portfolio Protocol contract to transfer USDC and USDT.
- Deposit a combination of USDC and USDT into the Portfolio Protocol USDPG liquidity pool. Depositors recieve an ERC-1155 non-fungible token representing their position in the USDPG liquidity pool.
- Depositors may then wrap this ERC-1155 into the USDPG ERC-20 at their discretion using the Portfolio Interface.

## Redemption

- Unwrap the USDPG ERC-20 token into an ERC-1155.
- Approve the Portfolio Protocol contract to transfer the USDPG ERC-1155.
- Execute a withdraw, burning the ERC-1155. Depositor recieves a combination of USDC and USDT.

## Arbitrage

USDPG relies on competitive arbitraguers consistently rebalancing its underlying Portfolio protocol liquidity pool. USDPG is a single pool portfolio strategy.

### USDPG Liquidity Pool

`Pool ID: TBA`

`Parameterization: TBA`

### Transaction Costs

Transaction costs are a primary concern amoung Ethereum arbitraguers and order flow providers. Various transcation types within the Portfolio protocol may be combined together, resulting in substantial gas savings.

The table below outlines a simulated gas report for relevant USDPG arbitrage transactions.

Transaction Type | Avg. Gas Cost (wei) |
---|---|

Single Swap from Portfolio Balance | 299,295 |

Allocate from Portfolio Balance | 335,996 |

Deallocate to Portfolio Balance | 242,996 |

Allocate and Deallocate from Portfolio Balance | 153,932 |

View Complete Gas Optimization Results on Github (opens in a new tab)

### Liquidity Profile

In the world of arbitrage, the concepts of market depth and slippage serve as critical measures that allow a direct comparison between venues. Depth, broadly speaking, is a measure of how a given trade size affects the market price, while slippage in our context describes the difference in quote and executed price for that given trade. Although these two measures are heavily related, they can each be used to examine different peices of the arbitrage puzzle. Looking at the depth of various venues allows us to compare the effeciency of trades on these venues around the current price, while looking at slippage allows us a more direct measure of the effectiveness of a given arbitrage trade.

For USDPG, being a CFMM, we can determine the equations for these two metrics beforehand. For the instantaneous depth of the market, we need to deterine $D = \frac{d\Delta}{dp}$ at the current price for trade size $\Delta$. This can be done discretely, but the instantaneous value allows a more direct comparison between venues. For USDPG, because the curve is asymmetrical in its liquidity distribution, we split the view of depth into two equations: price goes up and price goes down. For a negative price change, we have:

### Relative Leverage

To calculate the relative leverage of one trading venue compared to another, we need to look at the depths of the two markets comparatively, evaluated at the current global pair price. This would take the form of the following function:

In the context of CFMMs, a good relative baseline would be the Uniswap V2 $xy=k$ curve. This curve contains equal slippage at each point on its curve implying a symmetric function and an absence of leverage. We can determine the depth again as $D = \frac{d\Delta}{dp}$. For Uniswap V2, since we have $p = \frac{y}{x}$, we can recover depth as:

Note that because Uniswap V2 is a symmetric curve, this depth function applies for both positive and negative price changes. This gives us our $D_{ref}(p)$ in our relative leverage equation.

### USDPG Equilibrium Leverage

The equilibrium price for USDPG is $1$. We can evaluate the relative leverage of USDPG at its equilibrium price to garner a picture of the efficiency of USDPG over Uniswap V2 for stablecoin trading. To compare the structures directly, we can control for liquidity by provide both pools an equal amount. Given 1 USDPG share, this would be equivalent to Uniswap V2 boasting reserves of

First, turning to $l_{down}$, we have:

For the paramterization chosen as $\sigma\sqrt{\tau} = 0.0004154549$, this yields a value of $l_{down} = 3840.65$. Contextually, this means it take 3841.65 times the amount of swap liquidity to move the price away from the peg in a negative direction on USDPG as it would on Uniswap V2. Comparatively, Curve Finance's 3pool currently boasts an amplification coefficient of 2000.