Overview
The Token Sale Contract allows you to create a trustless sale of tokens against any on-chain currency. The contract serves as an escrow account, allowing for a trustless Delivery versus Payment (DvP) settlement between the seller and buyers.
The Token Sale Contract provides:
- The ability to receive payments in cryptocurrencies or any on-chain asset, including stablecoins or popular ERC-20 tokens.
- Specification of soft and hard caps, minimum and maximum investment amounts, and sale duration as well as a following lock-up period.
- Enforceable KYC and compliance rules through whitelisting and adding eligible addresses to the whitelist.
- Buyer and seller protection by allowing token exchange only if specified criteria are met. Otherwise, buyers can reclaim their payment, and sellers can reclaim their assets.
- Compatibility with all ERC-20 and ERC-1400 tokens.
You can use the Token Sale Contract to lock tokens deployed from any template in our smart contract library, such as Fireblocks contracts or other Bitbond contracts.
Deploying
When deploying the Token Sale Contract, you must define the following parameters:
- Network: The blockchain where you’re deploying the contract.
- Token contract: The address for the token to be sold. This token contract must be deployed on the blockchain you’ve defined in the Network parameter.
-
Sale currency: The address for the token you want to receive in exchange for the token you’re selling.
- If you want to use the native currency on the blockchain defined in the Network parameter, enter 0x0000000000000000000000000000000000000000. There should be 40 zeroes after the 0x.
- Price per token: The price of the token used as the sale currency.
- Total cap: The maximum amount of tokens to sell.
- Owner: The address you want to be the contract owner. The contract owner is the only address that can manage the contract.
- Start time: The date and time the sale starts. Dates and times are represented in U.S. formatting.
- End time: The date and time the sale ends. Dates and times are represented in U.S. formatting.
- Lock time: The date and time the lockup period ends. The lockup period begins after the sale ends and keeps tokens locked until your defined date and time. You can enter 0 if you don’t want to enforce a lockup period. Dates and times are represented in U.S. formatting.
-
Soft cap: The minimum amount of total tokens that must be bought for the sale to take place. If the minimum amount isn’t reached by the sale’s end time, initial funds are returned to the buyers.
- The amount entered here must be less than the amount entered for the Total cap.
- Min investment: The minimum amount of tokens a buyer must purchase. Enter 0 if you don’t want to enforce a minimum investment amount.
- Max investment: The maximum amount of tokens a buyer can purchase. Enter 0 if you don’t want to enforce a maximum investment amount.
- Whitelist enabled: Select this to limit the token sale to only those addresses you whitelist. If you don’t select this option, any address can participate in the token sale.
Operating via Bitbond
You can operate your deployed Token Sale Contract from Bitbond’s Token Tool platform.
- Go to Bitbond.
- Connect your Fireblocks Vault using WalletConnect. Learn how.
- On Bitbond, enter the address associated with the Token Sale Contract you deployed on Fireblocks.
At this point, you can use Bitbond to edit the contract’s parameters, add a link to your project’s website, and whitelist addresses for the token sale. Learn more by reading Bitbond’s documentation.