npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@aragon/templates-externally-owned-presale-bonding-curve

v1.1.0

Published

## 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.

Downloads

100

Readme

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

| App | Permission | Grantee | Manager | | ----------------- | --------------------- | ---------------- | ---------------- | | Kernel | APP_MANAGER | Owner | Owner | | ACL | CREATE_PERMISSIONS | Owner | Owner | | Token Manager | MINT | MarketMaker | Owner | | Token Manager | MINT | Presale | Owner | | Token Manager | BURN | MarketMaker | Owner |

Fundraising apps

Agent / Reserve

Handle market maker funds

| App | Permission | Grantee | Manager | | ------- | ---------------------- | ---------------- | ---------------- | | Reserve | SAFE_EXECUTE | Owner | Owner | | Reserve | ADD_PROTECTED_TOKEN | Controller | Owner | | Reserve | REMOVE_PROTECTED_TOKEN | NULL | NULL | | Reserve | EXECUTE | NULL | NULL | | Reserve | DESIGNATE_SIGNER | NULL | NULL | | Reserve | ADD_PRESIGNED_HASH | NULL | NULL | | Reserve | RUN_SCRIPT | NULL | NULL | | Reserve | TRANSFER | MarketMaker | Owner |

Presale

Handle preliminary sale

| App | Permission | Grantee | Manager | | ------- | ---------- | ---------- | ---------------- | | Presale | OPEN | Controller | Owner | | Presale | REDUCE_BENEFICIARY_PCT | Owner | Owner | | Presale | CONTRIBUTE | Any | Owner |

MarketMaker

Handle buy and sell orders

| App | Permission | Grantee | Manager | | ----------- | ----------------------- | ---------- | ---------------- | | MarketMaker | OPEN | Controller | Owner | | MarketMaker | UPDATE_FORMULA | NULL | NULL | | MarketMaker | UPDATE_BENEFICIARY | Controller | Owner | | MarketMaker | UPDATE_FEES | Controller | Owner | | MarketMaker | ADD_COLLATERAL_TOKEN | Controller | Owner | | MarketMaker | REMOVE_COLLATERAL_TOKEN | Controller | Owner | | MarketMaker | UPDATE_COLLATERAL_TOKEN | Controller | Owner | | MarketMaker | OPEN_BUY_ORDER | Controller | Owner | | MarketMaker | OPEN_SELL_ORDER | Controller | Owner |

Controller

API contract forwarding transactions to relevant contracts

| App | Permission | Grantee | Manager | | ---------- | ------------------------------------- | ------- | ------- | | Controller | UPDATE_BENEFICIARY | Owner | Owner | | Controller | UPDATE_FEES | Owner | Owner | | Controller | ADD_COLLATERAL_TOKEN | Owner | Owner | | Controller | REMOVE_COLLATERAL_TOKEN | Owner | Owner | | Controller | UPDATE_COLLATERAL_TOKEN | Owner | Owner | | Controller | UPDATE_MAXIMUM_TAP_RATE_INCREASE_PCT | NULL | NULL | | Controller | UPDATE_MAXIMUM_TAP_FLOOR_DECREASE_PCT | NULL | NULL | | Controller | ADD_TOKEN_TAP | NULL | NULL | | Controller | UPDATE_TOKEN_TAP | NULL | NULL | | Controller | OPEN_PRESALE | Owner | Owner | | Controller | OPEN_TRADING | Presale | Owner | | Controller | CONTRIBUTE | Any | Owner | | Controller | OPEN_BUY_ORDER | Any | Owner | | Controller | OPEN_SELL_ORDER | Any | Owner | | Controller | WITHDRAW | NULL | NULL |