pendulum-chain / pendulum

GNU General Public License v3.0
43 stars 14 forks source link

Implement pallet that extends our current treasury pallet with buyout feature #396

Closed bogdanS98 closed 4 months ago

bogdanS98 commented 5 months ago

Closes #395.

Overview

This pallet allows users which hold other assets than our native asset to exchange them against the treasury in return for our native. This is limited by the assets supported, minimum and maximum buyout amounts and buyout period (after which the total buyout amount for a user is reset).

Buyout limit can only be changed by root. If set to None, then there is no amount limit for buyouts.

This pallet was only added for Foucoco runtime in this PR.

Assets supported

Amplitude

Pendulum

Notes:

  1. We still have to properly define the values of the following parameters for each runtime:

    • SellFee
    • MinAmountToBuyout
    • BuyoutPeriod
  2. This pallet has yet to be tested in Polkadot.js

ebma commented 5 months ago

Is this ready for re-review now @bogdanS98?