LogoLogo
  • Swarm Network
  • Swarm Network
    • Network Governance
      • Getting started
      • Voting App
      • The Swarm Network
        • Powers
        • Governance
        • Members
        • Swarm Council
        • Treasury
      • Initiating Governance Actions
        • Introduction
        • Proposals
        • Ballot Types
        • Submitting a GAP
      • Governance Action Voting Process
        • Ballots
        • Retrieving the text of previous ballots
        • Voting
    • SWM Token
    • SWM Staking
  • Swarm Protocol
    • SRC20
      • SRC20 Token Contract
      • Transfer Rules Contract
      • Featured Contract
      • Roles Contract
      • SRC20 Registry Contract
      • Asset Registry Contract
      • Minter Contract
      • SRC20Factory Contract
    • Swarm Powered Fundraise
      • Uniswap Proxy Contract
      • Currency Registry Contract
      • Affiliate Manager Contract
      • Swarm Powered Fundraise Contract
      • Contributor Restrictions Contract
    • mySwarm.app
    • kovan.mySwarm.app (test version, please use this)
    • Mumbai Testnet
  • Open tools
    • Legacy Masternode Reward Collection
    • VerifiedExistence
    • Market Access Protocol
  • Keep up
    • Blog
    • Twitter
    • Discourse
    • Telegram
    • Voting App
    • FAQ
Powered by GitBook
On this page
  • Introduction
  • Smart Contract Index
  • Smart contracts specific to each SwarmPoweredFundraise
  • Smart contracts available across all SwarmPoweredFundraises
  • Deployment Sequence

Was this helpful?

  1. Swarm Protocol

Swarm Powered Fundraise

Note: This page describes an older version of the smart contract suite. We will update it soon!

PreviousSRC20Factory ContractNextUniswap Proxy Contract

Last updated 4 years ago

Was this helpful?

Introduction

The SwarmPoweredFundraise (SPF) is a significant addition to the open Swarm protocol and provides powerful tools to perform regulatory compliant fundraises for security tokens.

Like SRC20, the SPF stack is open source, so the Swarm network welcomes token issuers and service providers freely use, extend and customize.

Smart Contract Index

The following four contracts are created in relation to a specific SRC20 token and interact with one another and other global SRC20 smart contracts.

Smart contracts specific to each SwarmPoweredFundraise

For each new SRC20 token, one of each of these smart contracts is newly created.

Contract Name

Description

Example

Currency Registry

Registers all currencies that will be accepted in a specific Swarm Powered Fundraise

TBD

Affiliate Manager

Registers affiliates and their commissions for a SwarmPoweredFundraise

TBD

Swarm Powered Fundraise

Operates the actual SwarmPoweredFundraise; finalizes via stakeToMint

TBD

Contributor Restrictions

Manages whitelist and restrictions for each contributor in a Swarm Powered Fundraise

TBD

Smart contracts available across all SwarmPoweredFundraises

Each of the following (pre-existing) smart contracts exist across the SRC20 network and each SRC20 token interacts and registers with them.

Contract Name

Description

Example

Uniswap Proxy

Proxy Contract that makes ongoing calls to the different Uniswap exchanges to obtain the prices of accepted currencies used in Swarm Powered Fundraises

TBD

Issuer Stake Offer Pool (ISOP)

Allows SWM token holders to offer their tokens OTC for issuance stake; NOT YET FORMALLY RELEASED AND FUNCTIONAL

TBD

Deployment Sequence

  1. It needs SWM token address during deployment

  2. It needs SRC20Registry deployment address during deployment; after SRC20Factory is deployed, go to deployed SRC20Registry contract and add this SRC20Factory deployment address in addFactory() function

  3. It needs SRC20Factory deployment address during deployment

  4. It needs SWM price in the form of two variables like numerator and denominator

  5. It needs the following parameters: 1/ SRC20Registry address, 2/ AssetRegistry address and 3/ SWMPriceOracle address. After GetRateMinter is deployed, goto deployed SRC20Registry contract and add this GetRateMinter address in addMinter() function

  6. It needs owner address, most of the time it will be issuer wallet address

  7. It needs the following parameters: 1/ owner address, 2/ SRC20Registry address and 3/ TransferRules address

  8. It requires the following parameters: 1/ owner address and 2/ any number greater than 0 to enable features

  9. Go to SRC20Factory deployed contract, generate new SRC20 token using create() function

  10. Register whatever currencies you want to accept for this fundraise using addCurrency() function; most of the time it will be ZERO address for ETH, DAI address, USDC address and WBTC address. Register your base currency you want to use for this fundraise using setBaseCurrency() function.

  11. This requires several parameters: like label, SRC20 address, CurrencyRegistry address, startDate, endDate, softcap and hardcap

  12. It requires the following parameters: 1/ SwarmPoweredFundraise address and 2/ number of contributors want to allow for this fundraise

  13. Go to SwarmPoweredFundraise deployed contract and complete the remaining setup using setupContract() function. setupContract requires many parameters like SRC20 token price, minimum amount of contribution, maximum amount of contribution, AffiliateManager address, ContributorRestrictions address, GetRateMinter address and lock or unlock contributions

  14. Go to SRC20 deployed contract and set SwarmPoweredFundraise address using setFundRaiseAddr() function

  15. Go to ContributorRestrictions deployed contract and whitelist all your contributors using whitelistAccount() function. After this contributors can contribute to fundraise.

  16. Once fundraise is completed, issuer can call stakeAndMint(). This function will do the following in one process: 1/ staking his equivalent SWM tokens, 2/ minting SRC20 tokens and 3/ withdrawing total contributor funds to contract owner

The requirement is that the token for which the fundraise occurs is operated on the standard. An SFP is like a module that can be used for each distinct fundraise for an SRC20 token.

Deploy

Deploy

Deploy

Deploy

Deploy

Deploy

Deploy

Deploy

Deploy

Deploy

Deploy

Deploy

Deploy

SRC20
https://github.com/swarmfund/swarm-compliant-contract/blob/master/contracts/factories/SRC20Registry.sol
https://github.com/swarmfund/swarm-compliant-contract/blob/master/contracts/factories/SRC20Factory.sol
https://github.com/swarmfund/swarm-compliant-contract/blob/master/contracts/token/AssetRegistry.sol
https://github.com/swarmfund/swarm-compliant-contract/blob/master/contracts/factories/SWMPriceOracle.sol
https://github.com/swarmfund/swarm-compliant-contract/blob/master/contracts/factories/GetRateMinter.sol
https://github.com/swarmfund/swarm-compliant-contract/blob/master/contracts/rules/TransferRules.sol
https://github.com/swarmfund/swarm-compliant-contract/blob/master/contracts/roles/SRC20Roles.sol
https://github.com/swarmfund/swarm-compliant-contract/blob/master/contracts/token/features/Featured.sol
https://github.com/swarmfund/swarm-compliant-contract/blob/master/contracts/fundraising/UniswapProxy.sol
https://github.com/swarmfund/swarm-compliant-contract/blob/master/contracts/fundraising/CurrencyRegistry.sol
https://github.com/swarmfund/swarm-compliant-contract/blob/master/contracts/fundraising/SwarmPoweredFundraise.sol
https://github.com/swarmfund/swarm-compliant-contract/blob/master/contracts/fundraising/AffiliateManager.sol
https://github.com/swarmfund/swarm-compliant-contract/blob/master/contracts/fundraising/ContributorRestrictions.sol