Bunicorn
Launch Testnet App
  • What is Bunicorn?
  • Introduction
    • AMM DEX
    • Liquidity Mining
    • NFT Collectibles
  • Getting Started
    • Wallets that Bunicorn supports
    • Get BEP20 Tokens
    • Connect your wallet
    • Bunicorn testnet 101
  • Bunicorn Exchange TUTORIAL
    • Tutorial for Trader
    • Tutorial for Liquidity Provider
      • Setup Proxy
      • Swap native BNB to WBNB to farm
      • How to Add Liquidity on Bunicorn
        • How to add liquidity to a Flexible pool?
        • How to add liquidity to a Stable Pool?
      • How to create a new Flexible pool?
        • How to Create a New Smart Pool
        • How to Create a New Shared Pool
      • How to Remove Liquidity
    • How to Join Token Play Farms
      • Stake LPs to Token Play Farm
      • Stake Single Asset $TOP
    • How to Join Ancient Buni NFT Farms
      • NFT Farm Ends. What should I do?
      • Stake LPs to Join the Ancient Buni Farm
      • Stake Single Asset
      • Harvest NFTs (Ancient Buni)
      • How to transfer Ancient BUNI NFTs to another address?
    • How to Join Bunicorn NFT Farms
      • Prestaking Farm Ends. What's next?
      • Stake LP to Join NFT Farms
      • Stake Single Asset
      • Harvest NFTs (Chest/Egg)
      • How to unlock ingame items from Chest/Egg NFTs
      • How to Transfer Egg/Chest NFTs to another address
    • Fee Structure
  • FAQ
    • What is a Flexible Pool?
    • What is a Stable Pool?
    • Can users create Stable pools themselves?
    • Are there any constraints for setting up a Bunicorn Flexible pool?
    • What are the advantages of a Stable Pool?
  • Glossary
  • SMART CONTRACTS
    • Flexible Pools
      • Exchange Proxy
      • Smart Order Router
      • On Chain Registry
      • Smart Pools
        • Overview
        • Configurable Rights Pool
        • Component Libraries
          • Rights Manager
      • Interfaces
      • Addresses
      • Events
      • API Index
    • Stable Pools
      • Pool Addresses
      • Swap Execution
      • Providing Liquidity
      • Flash Swaps
      • Contract Addresses
      • BuniCornRouter02
      • Pool
      • Pool (ERC-20)
      • Library
  • Subgraph API
    • Stable Pools
      • Entities
      • Sample queries
    • Flexible Pools
      • Entities
      • Sample queries
Powered by GitBook
On this page

Was this helpful?

  1. SMART CONTRACTS
  2. Flexible Pools
  3. Smart Pools
  4. Component Libraries

Rights Manager

The Rights Manager library defines all the ways you can customize a Configurable Rights Pool. In general, granting more rights to a Smart Pool requires users to place greater trust in the smart pool creator.

The library is designed to be easily extensible (e.g., the method signatures don't change as more rights are added). Let's take a look at the current set of rights, and how they might be applied to real use cases.

  • Pause Swapping: allows the controller to halt trading (swaps) on the underlying core pool. Like finalized core pools, Configurable Rights Pools are created with trading enabled. With pause swapping, the controller (or logic in the smart contract) can toggle trading on and off. For instance, the controller might want to "short-circuit" the contract in certain pathological cases, such as market crashes.

  • Change Swap Fee: allows the controller to change the Swap Fee after contract deployment, within the bounds set by the underlying core pool (e.g., it cannot be zero, or greater than 10%). With this right, it would be possible to implement fee optimization strategies (e.g., maximize return, or minimize impermanent loss).

  • Change Weights: the controller can call updateWeight (to directly update a single token's weight), or updateWeightsGradually (to linearly transform a set of weights over time). This enables liquidity bootstrapping, UMA-style perpetual synthetics, and many other strategies. Note that altering weights will change balances - which means transferring tokens - in order to leave prices unchanged. When updating weights gradually, the protocol enforces a minimum time between updates, and a minimum total time for the update. These parameters are set at create time, and are immutable thereafter.

  • Add/Remove Tokens: allows the controller to change the composition of the pool. Needless to say, this requires a lot of trust in the smart pool owner, but enables powerful strategies, especially in combination with other rights. For example, a perpetual "rolling" synthetic. Adding a token is a two-step process meant to mitigate this risk and lower the trust required. The protocol emits an event when a token is "committed" (about to be added), and enforces a minimum wait time before the controller can "apply" (actually add) the token.

  • Whitelist LPs: when this right is enabled, no one can add liquidity (including the controller, beyond initial creation of the pool), unless they are added to a whitelist by the creator. This enables things private investment clubs, exclusive token launches, etc.

  • Change Cap: Inspired by PieDAO's capped pools, Configurable Rights Pools have a "cap" on the total supply of pool tokens that can be issued. This can be used for experimental/risky pools, to limit potential losses, or to halt further provision of liquidity at any time. When this right is not enabled, there is no cap. When it is enabled, the cap is set to the initial supply on creation - and can be changed later by the controller.

PreviousComponent LibrariesNextInterfaces

Last updated 3 years ago

Was this helpful?