1.1.0 • Published 4 years ago

@aragon/templates-externally-owned-presale-bonding-curve v1.1.0

Weekly downloads
1
License
(GPL-3.0-or-later...
Repository
-
Last release
4 years ago

Aragon externally owned presale and bonding curve template

Description

Aragon externally owned presale and bonding curve template is intended to deploy the bonding curve between ANT and ANJ for Aragon Network Court, along with the presale.

This pseudo-DAO has no core apps Voting, Finance or Vault, only a Token Manager for the bonded token, and it's supposed to be controlled externally (by the Aragon Network DAO in the case of ANJ), so all governing permissions are set to an external single entity (which in case of ANJ will be the Agent of the Aragon Network DAO).

Because the purpose isn't either a real fundraising campaign, but only exchange functionality given by the bonding curve, it doesn't have a Tap mechanism either.

The presale used is the simple version, that when close redirects part of the balance of the collateral token to a beneficiary in order to adjust its price to the one that the bonding curve will have given the toal supply of bonded tokens minted and the defined reserve ratio.

Usage

Install fundraising apps

template.installFundraisingApps(
    owner,
    id,
    collateralToken,
    bondedToken,
    period,
    exchangeRate,
    openDate,
    reserveRatio,
    batchBlocks,
    slippage
)
  • owner Owner that will control the pseudo-DAO
  • id Id for org, will assign id.aragonid.eth
  • collateralToken Collateral token in bonding curve and presale
  • bondedToken Bonded token in bonding curve and presale
  • period The presale period
  • exchangeRate The presale exchange rate in PPM
  • openDate The date upon which the presale will be open if 0, the presale can be open manually later
  • reserveRatio Reserve ratio of the bonding curve
  • batchBlocks The number of blocks trading batches will last
  • slippage To set up the maximum per-batch price slippage in the market maker

Permissions

System

Handle apps and permissions

AppPermissionGranteeManager
KernelAPP_MANAGEROwnerOwner
ACLCREATE_PERMISSIONSOwnerOwner
Token ManagerMINTMarketMakerOwner
Token ManagerMINTPresaleOwner
Token ManagerBURNMarketMakerOwner

Fundraising apps

Agent / Reserve

Handle market maker funds

AppPermissionGranteeManager
ReserveSAFE_EXECUTEOwnerOwner
ReserveADD_PROTECTED_TOKENControllerOwner
ReserveREMOVE_PROTECTED_TOKENNULLNULL
ReserveEXECUTENULLNULL
ReserveDESIGNATE_SIGNERNULLNULL
ReserveADD_PRESIGNED_HASHNULLNULL
ReserveRUN_SCRIPTNULLNULL
ReserveTRANSFERMarketMakerOwner

Presale

Handle preliminary sale

AppPermissionGranteeManager
PresaleOPENControllerOwner
PresaleREDUCE_BENEFICIARY_PCTOwnerOwner
PresaleCONTRIBUTEAnyOwner

MarketMaker

Handle buy and sell orders

AppPermissionGranteeManager
MarketMakerOPENControllerOwner
MarketMakerUPDATE_FORMULANULLNULL
MarketMakerUPDATE_BENEFICIARYControllerOwner
MarketMakerUPDATE_FEESControllerOwner
MarketMakerADD_COLLATERAL_TOKENControllerOwner
MarketMakerREMOVE_COLLATERAL_TOKENControllerOwner
MarketMakerUPDATE_COLLATERAL_TOKENControllerOwner
MarketMakerOPEN_BUY_ORDERControllerOwner
MarketMakerOPEN_SELL_ORDERControllerOwner

Controller

API contract forwarding transactions to relevant contracts

AppPermissionGranteeManager
ControllerUPDATE_BENEFICIARYOwnerOwner
ControllerUPDATE_FEESOwnerOwner
ControllerADD_COLLATERAL_TOKENOwnerOwner
ControllerREMOVE_COLLATERAL_TOKENOwnerOwner
ControllerUPDATE_COLLATERAL_TOKENOwnerOwner
ControllerUPDATE_MAXIMUM_TAP_RATE_INCREASE_PCTNULLNULL
ControllerUPDATE_MAXIMUM_TAP_FLOOR_DECREASE_PCTNULLNULL
ControllerADD_TOKEN_TAPNULLNULL
ControllerUPDATE_TOKEN_TAPNULLNULL
ControllerOPEN_PRESALEOwnerOwner
ControllerOPEN_TRADINGPresaleOwner
ControllerCONTRIBUTEAnyOwner
ControllerOPEN_BUY_ORDERAnyOwner
ControllerOPEN_SELL_ORDERAnyOwner
ControllerWITHDRAWNULLNULL