1. A MAYZ User will be able to Create Swap Scripts. When creating it, he/she must specify the parameters that will remain fixed throughout the life of the Swap. Among them will determine who will be the Swap Administrators. The Swap becomes Uninitialized

  1. One of the Swap Administrators must Initiate the Swap. To do so, he/she will have to specify the variable parameters that will be included in the Swap Datum, such as the commissions that the Users will pay for the service. The maximum, minimum, and recommended values of this commission will be established in the Datum of the Protocol. The Swap becomes Initialized

  1. The Swap Administrators will be able to update the variable parameters of the Swap with the operation Update Swap Datum.

  1. The Fund Managers will create and manage the Deposit UTxOs with the operations Create Deposit UTxO, Join Deposit UTxO and Split Deposit UTxO, and Delete Deposit UTxO.

    The more UTxOs there are, the more Users will be able to use the service at the same time. Each of these UTxOs will have a Deposit Datum and a Deposit NFT.

  1. The Swap Managers will deposit and withdraw ADA and LP in the different Deposit UTxOs with the operations Deposit ADA, Withdraw ADA, Deposit LP, and Withdraw LP.

  1. Users will be able to deliver ADA or LP in any of the Deposit UTxOs and receive in exchange LP or ADA, respectively, according to the value in ADA of the LP, provided by the Oracle Contract with the operations Swap ADA / LP and Swap LP / ADA.

    In these operations, the Users will pay commissions according to the amount they are delivering. They will pay them in the same operation. The commissions will be deducted from the total amount they deposit, and from the remainder, it will be calculated how much ADA or LP they are entitled to. The commissions will be stored in the contract in the form of LP in the Deposit UTxOs that were used for this operation.

    The ADA or LP delivered by the User as the LP or ADA that the contract will return will be stored in the different existing Deposit UTxOs. If a UTxO does not have enough ADA or LP to deliver to the User, more than one Deposit UTxO may be consumed at the same time.

  1. The Fund Managers may move tokens between the different Deposit UTxOs by means of the operation Move Deposit UTxO Tokens.

  1. The Swap Managers will be able to collect the stored commissions by means of the Collect Commissions operation. The commissions will be spread over the different Deposit UTxOs that were used. More than one UTxO can be consumed at the same time, or the Join Deposit UTxO Commissions operation can be used to join all the commissions into one UTxO and then collect them from there.

  1. Swap Managers will be able to change the status of the Swap between Active and Not Active with the Change Status operation. As long as the Swap is Not Active, no ADA / LP Swap or LP / ADA Swap operations can be performed.

  1. If necessary, the Swap Administrators can change the Swap status to Terminated with the Terminate operation. Once the Swap is terminated, it cannot be used again; no Deposit ADA, Deposit LP, Swap ADA / LP, or Swap LP / ADA operations will be allowed.

  1. Swap Managers will be able to Recover MAYZ when the Swap is Terminated.

  1. In case of emergency, the Swap Managers may change the Swap status to Emergency with the Emergency operation.

Last updated