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

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.
The requirement is that the token for which the fundraise occurs is operated on the SRC20 standard. An SFP is like a module that can be used for each distinct fundraise for an SRC20 token.
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
It needs SWM token address during deployment
It needs SRC20Registry deployment address during deployment; after
SRC20Factoryis deployed, go to deployedSRC20Registrycontract and add thisSRC20Factorydeployment address inaddFactory()functionDeploy https://github.com/swarmfund/swarm-compliant-contract/blob/master/contracts/token/AssetRegistry.sol
It needs
SRC20Factorydeployment address during deploymentIt needs SWM price in the form of two variables like numerator and denominator
It needs the following parameters: 1/
SRC20Registry address, 2/AssetRegistryaddress and 3/SWMPriceOracleaddress. AfterGetRateMinteris deployed, goto deployedSRC20Registrycontract and add thisGetRateMinteraddress inaddMinter()functionDeploy https://github.com/swarmfund/swarm-compliant-contract/blob/master/contracts/rules/TransferRules.sol
It needs owner address, most of the time it will be issuer wallet address
Deploy https://github.com/swarmfund/swarm-compliant-contract/blob/master/contracts/roles/SRC20Roles.sol
It needs the following parameters: 1/
owner address, 2/SRC20Registry addressand 3/TransferRules addressIt requires the following parameters: 1/
owner addressand 2/ any number greater than 0 to enable featuresGo to
SRC20Factorydeployed contract, generate new SRC20 token usingcreate()functionRegister 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 usingsetBaseCurrency()function.This requires several parameters: like
label,SRC20 address,CurrencyRegistry address,startDate,endDate,softcapandhardcapIt requires the following parameters: 1/
SwarmPoweredFundraise addressand 2/number of contributorswant to allow for this fundraiseGo to
SwarmPoweredFundraisedeployed contract and complete the remaining setup usingsetupContract()function.setupContractrequires many parameters likeSRC20 token price,minimum amount of contribution,maximum amount of contribution,AffiliateManager address,ContributorRestrictions address,GetRateMinter addressandlockorunlockcontributionsGo to
SRC20deployed contract and setSwarmPoweredFundraiseaddress usingsetFundRaiseAddr()functionGo to
ContributorRestrictionsdeployed contract and whitelist all your contributors usingwhitelistAccount()function. After this contributors can contribute to fundraise.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
Last updated
Was this helpful?