Swapping
Last updated
Last updated
Buyer sends SY into the swap contract (auto-routed from any major token)
Contract withdraws more SY from the pool
Mint PTs and YTs from all of the SY
Send the YTs to the buyer
The PTs are sold for SY to return the amount from step 2
With a PT/SY pool, PT can be directly traded with SY, while YT trades are also possible via flash swaps. Flash swaps are possible due to the relationship between PT and YT. As PT and YT can be minted from and redeemed to its underlying SY, we can express the price relationship:
Knowing that YT price has an inverted correlation against PT price, we use this price relationship to utilize the PT/SY pool for YT swaps.
Choose which token you would like to swap from; i.e. in this example either ezETH or YT-ezETH
Choose the amount you would like to swap
Make sure you have the correct amount approved
Select the swap button to initialize the transaction