Trading Markets
Pryzm is a one-stop shop when it comes to decentralized yield trading. Offering a comprehensive suite of tools and features, Pryzm empowers users to take charge of their swaps and streamline their trading experience.
YAMM Swaps
Pryzm's Yield Automated Market Maker (YAMM) DEX caters to the unique requirements of principal and yield token trading. Each yield pool in Pryzm's YAMM contains a cToken and all maturities of pTokens. As time passes, the YAMM removes expired maturities and adds in new maturities automatically, providing a passive experience for liquidity providers. The YAMM has leverage parameters that amplify liquidity in certain yield ranges to allow for larger trades with lower price impact and to generate more revenue for liquidity providers.
Flash loans
Although YAMM pools only contain cTokens and pTokens, Pryzm enables users to trade yTokens as well. It does this by employing a flash-loan mechanism.
When a user sends cTokens to the YAMM pool to swap for yTokens, the contract completes the following steps:
- the Contract withdraws cTokens from the pool in a flash loan.
- Refracts the cTokens into pTokens and yTokens.
- Sends the yTokens to the user.
- Sells the pTokens for cTokens to repay the flash loan.
When a user sends yTokens to the YAMM pool to swap for cTokens, the contract completes the following steps:
- Withdraws pTokens from the pool in a flash loan.
- Redeems the borrowed pTokens and user-supplied yTokens for cTokens.
- Sends the required amount of cTokens to the user.
- Sells the rest of the cTokens for pTokens to repay the flash loan.
The YAMM was designed to allow users to trade cTokens, pTokens, and yTokens all in one place.
To learn how to swap assets using the Pryzm app, follow this guide.
PulseTrade
Pryzm's PulseTrade feature allows you to break trades into smaller portions or invest at regular intervals, reducing the impact of pricing and timing concerns. Similar to the practice of DCA (Dollar-Cost Averaging), PulseTrade allows you to set a price limit and execute a recurring trade at a set interval.
For example, you could specify to swap 1 USDC for ETH every minute over 100 minutes. You can even specify an execution price limit to take advantage of price fluctuations, purchasing your entire amount if price drops below a certain level.
PulseTrade offers several advantages over traditional on-chain DCA using smart contracts:
- Gas-Free Trades: Individual trades are executed automatically by the blockchain without consuming any gas.
- Partial Asset Locking: You only need to lock the amount required for the next step, keeping the remainder of your assets in self-custody. This means you never have to lock your full amount.
- Flexible Deposits: You can set multiple PulseTrades using the same deposit token.
To learn how to create a PulseTrade using the Pryzm app, follow this guide.
Dollar-Cost Averaging (DCA) and Time-Weighted Average Price (TWAP) since they share many similarities:
Advantages of DCA and TWAP
- Reduces Impact of Volatility: By spreading out investments or trades over time, you can average out the cost and reduce the impact of market fluctuations. This is more applicable to DCA, where you invest fixed amounts regularly.
- Minimizes Timing Risk: Helps avoid the risk of making large investments or trades at the wrong time, reducing the impact of sudden market movements.
- Disciplined Approach: Encourages a systematic and regular investment or trading strategy, making it easier to stick to a long-term plan.
- Emotional Control: Helps avoid emotional decisions based on short-term market movements, promoting a more rational and consistent approach.
- Reduces Market Impact: By spreading out trades, it minimizes the impact of large orders on the market price, achieving a more favorable average price. This is particularly relevant for TWAP.
- Automated Execution: Both strategies can automate the execution of trades or investments, making it easier to manage without constant monitoring.
- Flexibility: Useful for both buying and selling, ensuring smoother execution and better price stability.
Clarification:
- DCA: Primarily reduces the impact of volatility by averaging the purchase price over time.
- TWAP: Focuses on minimizing market impact by executing trades evenly over a specified period.
Flow trade
FlowTrade is designed for assets with low liquidity on Automated Market Makers (AMMs). This can be particularly useful in scenarios such as new token launches or when a normal swap might route through multiple pools, resulting in cumulative fees or low liquidity.
Creators are users who create or own the tokens they want to sell. Subscribers are the people who want to buy these tokens from the creators. In a process called a flow, creators send their tokens to the subscribers, and subscribers send their tokens back to the creators.
- Locked Tokens: The creators’ tokens are locked in the flow, meaning they cannot be taken back or changed.
- Flexible Tokens: The subscribers’ tokens are not locked, allowing them to be increased or decreased at any time.
The number of subscribers’ tokens in the flow affects the price of the creators’ tokens:
- More Subscribers’ Tokens: Higher price for the creators’ tokens.
- Fewer Subscribers’ Tokens: Lower price for the creators’ tokens.
This price change is uniform for everyone in the flow, ensuring no unfair advantage or disadvantage. Additionally, creators can set a minimum price for their tokens to protect against significant price drops.
Flow Trading Example
Suppose that a creator makes a flow with a swap interval of 1 minute, a locked amount of 500 tokens called CRT, a total duration of 100 minutes, and a minimum swap price of 1 USDC per CRT.
- Once the flow starts, subscribers join the flow with 1000 USDC. During the first swap, 5 CRT are split among subscribers proportional to their contribuition, 10 USDC are sent to the creater, and the price of CRT is 2 USDC.
- Before the next swap, subscribers remove 297 USDC from the flow. 5 CRT are again sent to subscribers, and the creator recieves 7 USDC. The price of CRT is now 1.4 USDC.
- Subscribers add 686 USDC to the flow. 5 CRT are sent to subscribers, and the creator recieves 7 USDC. The price of CRT is now 2.8 USDC. This continues until the end of the flow.
To learn how to create a flow using the Pryzm app, follow this guide