Operation

  1. A User who owns MAYZ will be able to Create Escrow Scripts.

    When creating it, he/she must specify the parameters that will remain fixed throughout the Escrow's life. Among them will determine who will be the Escrow Administrators. The Escrow becomes Uninitiated.

  2. One of the Escrow Administrators must Initiate the Escrow. To do so, he/she must specify the variable parameters that will be included in the Escrow 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 Escrow becomes Initiated.

  3. Escrow administrators can update the Escrow variable parameters with the Update Escrow Datum operation.

    The Escrow Administrators 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.

    In the Deposit Datums, there will be a list of all the Users who have made deposits in that UTxO. If this list is too large, errors can be generated due to memory overflow. The Protocol Portal will have to have a good design so that the User can choose where to deposit. If there are no UTxOs available, with few Users, for example, it should not let him deposit or should only allow him to create a new UTxO. The number of Users that can contribute to a single UTxO with their tokens will be limited to a certain number, possibly less than 20.

  4. It will be the task of the Swap Administrators to balance the load of Users and Tokens in the different UTxOs by means of the operation Move Tokens between Escrow UTxOs.

  5. Users will be able to perform Deposit Tokens and Withdraw Tokens operations. These operations will consume some of the Deposit UTxO's to add or remove tokens, and the Deposit Datum will be updated with the holdings that each User has made.

    When the Escrow Managers have organized some Deposit UTxO with enough tokens to cover a certain amount of UI, they can perform the Convert Tokens to LP operation to obtain LP in exchange for those tokens. These LPs will be stored in the used Deposit UTxO and will be available for Users to claim. Part of these LPs will be used to pay commissions and will be available for collection by the Escrow Managers.

    The Deposit Datum of such UTxO will be updated, noting how many tokens were used and how many remain for each User. If more than one User has deposited the same token, it should take a similar percentage of tokens from each User so as not to give preference to any of them. From how many tokens were taken from each User and using the values provided by the Oracle Contract, each User's share in the transaction can be calculated. That share is a percentage and will be used to entitle each User to a portion of the LPs generated. A note will be made in the Deposit Datum of this participation percentage and also of the commissions generated.

  6. Users will be able to Withdraw LP according to their participation. A value that is updated with each operation of Convert Tokens to LP.

  7. The Escrow Administrators will be able to collect the stored commissions through 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 operation Join Commissions from Deposit UTxOs can be used to join all commissions into one UTxO and then collect them from there.

  8. The Escrow Administrators will be able to change the status of the Escrow between Active and Not Active with the operation Change Status. While the Escrow is Not Active, performing Deposit Token operations will not be possible.

  9. If necessary, the Escrow Administrators can change the Escrow status to Terminated with the Terminate operation. Once the Escrow is terminated, it cannot be used again, and no Deposit Token operations will be allowed.

  10. The Escrow Administrators may Retrieve MAYZ when the Escrow is Terminated.

  11. In case of emergency, the Escrow Administrators may change the Escrow status to Emergency with the Emergency operation.

Last updated