All Projects â†’ sirin-labs â†’ crowdsale-smart-contract

sirin-labs / crowdsale-smart-contract

Licence: other
No description or website provided.

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to crowdsale-smart-contract

Simple-Game-ERC-721-Token-Template
🔮 Very Simple ERC-721 Smart Contract Template to create your own ERC-721 Tokens on the Ethereum Blockchain, with many customizable Options 🔮
Stars: ✭ 83 (+112.82%)
Mutual labels:  smart-contracts, token, solidity-contracts
solidity-contracts
📦 Resources for the Ethereum Smart Contract Development tutorial series.
Stars: ✭ 64 (+64.1%)
Mutual labels:  smart-contracts, solidity-contracts
eth option
ERC20-compatible Option Contracts
Stars: ✭ 22 (-43.59%)
Mutual labels:  smart-contracts, solidity-contracts
uniswap-arbitrage-flash-swap
Uniswap flash swap arbitrage solidity contracts
Stars: ✭ 341 (+774.36%)
Mutual labels:  smart-contracts, solidity-contracts
awesome-solidity-gas-optimization
Best resources for Solidity gas optimizations ⛽
Stars: ✭ 893 (+2189.74%)
Mutual labels:  smart-contracts, solidity-contracts
ethereum-erc20
Fungible token implementation for the Ethereum blockchain.
Stars: ✭ 27 (-30.77%)
Mutual labels:  smart-contracts, token
soldoc
A solidity documentation generator, based in NatSpec format. 📃 with standalone HTML, pdf, gitbook and docsify output ✏️ just plug and play.
Stars: ✭ 54 (+38.46%)
Mutual labels:  smart-contracts, solidity-contracts
Smart Contracts
Ethereum smart contracts for security and utility tokens
Stars: ✭ 1,187 (+2943.59%)
Mutual labels:  smart-contracts, solidity-contracts
Meadow
Integrated Ethereum implementation and tool suite focused on Solidity testing and development.
Stars: ✭ 126 (+223.08%)
Mutual labels:  smart-contracts, solidity-contracts
blockstarter
This is a white label solution to create a contribution crypto-wallet that can be used in your ICO campaign.
Stars: ✭ 21 (-46.15%)
Mutual labels:  smart-contracts, token
etherbrite
🗓 Clone eventbrite on Ethereum, built in Solidity, TruffleJS, Web3js and React/Redux.
Stars: ✭ 19 (-51.28%)
Mutual labels:  smart-contracts, solidity-contracts
colonySale
Colony Token and Crowdsale Contracts
Stars: ✭ 27 (-30.77%)
Mutual labels:  smart-contracts, token
Awesome Blockchain Kor
<블록체인의 정석>, <하이퍼레저 블록체인 개발> 소스코드 및 참고자료 저장소
Stars: ✭ 243 (+523.08%)
Mutual labels:  smart-contracts, token
ethereum-crowdsale
0xcert protocol crowdsale contracts for Ethereum blockchain.
Stars: ✭ 15 (-61.54%)
Mutual labels:  smart-contracts, token
Seriality
Seriality is a library for serializing and de-serializing all the Solidity types in a very efficient way which mostly written in solidity-assembly
Stars: ✭ 105 (+169.23%)
Mutual labels:  smart-contracts, solidity-contracts
ethereum-dex
Decentralized exchange implementation for the 0xcert protocol on the Ethereum blockchain.
Stars: ✭ 18 (-53.85%)
Mutual labels:  smart-contracts, token
Solidity
🔐 Ethereum smart contracts developed for the Hanzo Platform.
Stars: ✭ 46 (+17.95%)
Mutual labels:  smart-contracts, solidity-contracts
Ethereumbook
Mastering Ethereum, by Andreas M. Antonopoulos, Gavin Wood
Stars: ✭ 11,663 (+29805.13%)
Mutual labels:  smart-contracts, token
erc721
The reference implementation of the ERC-721 non-fungible token standard.
Stars: ✭ 989 (+2435.9%)
Mutual labels:  smart-contracts, token
erc1363-payable-token
Code implementation for the ERC-1363 Payable Token
Stars: ✭ 83 (+112.82%)
Mutual labels:  smart-contracts, token

SIRIN LABS' Crowdsale Contracts

Please see below Sirin Labs smart contracts' for the Sirin Crowdsale.

SirinLabs Token

SRN is an ERC-20 compliant cryptocurrency built on top of the Ethereum blockchain.

Overview

SIRIN LABS - the developer of SOLARIN, the ultra-secure smartphone - is holding a crowdsale event. Funds raised will support the development of FINNEY, the first open source smartphone and all-in-one PC built for the blockchain era. Customers will be able to purchase all SIRIN LABS products (SOLARIN and FINNEY) with SIRIN LABS token, the SRN.

Contracts

Please see the contracts/ directory.

The Crowdsale Specification

  • SRN token is ERC-20 compliant.
  • SRN Token is Bancor compliant.
  • Token allocation:
    • 40% of the total number of SRN tokens will be allocated to contributors during the token sale.
    • 10% of the total number of SRN tokens will be allocated to the team.
    • 10% of the total number of SRN tokens will be allocated to OEMs, Operating System implementation, SDK developers and rebate of sold devices.
    • 5% of the total number of SRN tokens will be allocated to professional fees and bounties.
    • 35% of the total number of SRN tokens will be allocated to SIRIN LABS, to be used for future strategic plans and to develop the SIRIN LABS' ecosystem.

SRN PRICING PROGRAM

Duration from token Crowdsale event start SRN / ETH
First 24 hours 1000
2nd day 950
3rd day 900
4th day 855
5th day 810
6th day 770
7th day 730
8th day 690
9th day 650
10th day 615
11th day 580
12th day 550
13th day 525
14th day 500

Refund Route - SRN tokens with guarantee

Investors can choose to buy SRN tokens with guarantee.

refund route rates are 50% of the regular rate (starting from 500 SRNs for 1 ETH at the first day and ending at 250 SRNs for 1 ETH at the last day of the crowd sale).

SRN tokens and the ETH funds are deposited to a RefundVault contract owned by the SirinCrowdsale contract.

Investors bought SRNs on the refund route can get refund of their ETH or claim their SRN tokens only after the crowd sale ends.

Refund ETH period is limited to 60 days after the crowd sale ends. SRN token claim is not limited in time.

Any of the actions (refund ETH and SRN token claim) can be executed by the investor directly on the RefundVault contract.

Any of the actions (refund ETH and SRN token claim) can be done on parts of the amount.

  • In case of refund ETH, the proportional amount of SRN tokens will be burned.
  • In case of SRN token claim, the proportional amount of ETH will be transferred to Sirin ETH Wallet.
  • In Case of partial action the remaining ETH and SRN tokens will be available to more refund or claim actions according to the refund period and updated amounts.

Develop

  • Contracts are written in Solidity and tested using Truffle and testrpc.

  • Our smart contract is based on Open Zeppelin smart contracts v1.3.0 (latest OZ commit merged is 8e01dd14f9211239213ae7bd4c6af92dd18d4ab7 from 24.10.2017).

  • SRN token is a SmartToken, implementing Bancor's SmartToken contract.

Audit

The contract was audited by several Ethereum blockchain experts.

No potential vulnerabilities have been identified in the crowdsale and token contract.

Code

Class Diagram

Class Diagram

SirinCrowdsale Functions

getRate

function getRate() public view returns (uint256)

Returns the rate in SRN per 1 ETH according to the time of the tx and the SRN pricing program.

getTotalFundsRaised

function getTotalFundsRaised() public view returns (uint256)

Returns the total funds collected in wei(ETH and none ETH).

addUpdateGrantee

function addUpdateGrantee(address _grantee, uint256 _value) external onlyOwner onlyWhileSale

Adds/Updates address and token allocation for token grants.

Granted tokens are allocated to non-ether, presale, buyers.

isActive

function isActive() public view returns (bool)

Return true if the crowdsale is active, hence users can buy tokens

deleteGrantee

function deleteGrantee(address _grantee) external onlyOwner onlyWhileSale

Deletes entries from the grants list.

setFiatRaisedConvertedToWei

function setFiatRaisedConvertedToWei(uint256 _fiatRaisedConvertedToWei) external onlyOwner onlyWhileSale

Sets funds collected outside the crowdsale in wei. funds are converted to wei using the market conversion rate of USD\ETH on the day on the purchase.

claimTokenOwnership

function claimTokenOwnership() external onlyOwner

Accepts new ownership on behalf of the SirinCrowdsale contract. This can be used, by the token sale contract itself to claim back ownership of the SirinSmartToken contract.

claimRefundVaultOwnership

function claimRefundVaultOwnership() external onlyOwner

Accepts new ownership on behalf of the SirinCrowdsale contract. This can be used, by the token sale contract itself to claim back ownership of the refundVault contract.

buyTokensWithGuarantee

function buyTokensWithGuarantee() public payable

Buy tokes with guarantee, these tokens and the ETH are saved in refundVault, so investor can refund them up to 60 days after the crowdsale ends.

SirinCrowdsale Events

GrantAdded

event GrantAdded(address indexed _grantee, uint256 _amount);

GrantUpdated

event GrantUpdated(address indexed _grantee, uint256 _oldAmount, uint256 _newAmount);

GrantDeleted

event GrantDeleted(address indexed _grantee, uint256 _hadAmount);

FiatRaisedUpdated

event FiatRaisedUpdated(address indexed _address, uint256 _fiatRaised)

TokenPurchaseWithGuarantee

event TokenPurchaseWithGuarantee(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);

RefundVault Functions

deposit

function deposit(address investor, uint256 tokensAmount) onlyOwner public payable

Adds Investor tokens and ETH to the vault.

close

function close() onlyOwner public

Closes the refunds, all ETH is transfered to Sirin ETH wallet. After this function is called investors cannot refund their ETH anymore but can claim their tokens.

enableRefunds

function enableRefunds() onlyOwner public

Start the refunding. Should be called after the crowdsale.

refundETH

function refundETH(uint256 ETHToRefundAmountWei) isInRefundTimeFrame isRefundingState public

Refund ETH back to the investor in return of proportional amount of SRN back to Sirin wallet.

claimTokens

function claimTokens(address investor, uint256 tokensToClaim) isRefundingOrCloseState public

Transfer tokens from the vault to the investor while transferring proportional amount of ETH to Sirin ETH wallet.

Can be triggered by the investor only.

claimAllTokens

function claimAllTokens() public

Investors can claim all remaining tokens from the vault.

RefundVault Events

Active

event Active();

Deposit

event Deposit(address indexed beneficiary, uint256 etherWeiAmount, uint256 tokenWeiAmount);

Closed

event Closed();

RefundsEnabled

event RefundsEnabled();

RefundedETH

event RefundedETH(address indexed beneficiary, uint256 weiAmount);

TokensClaimed

event TokensClaimed(address indexed beneficiary, uint256 weiAmount);

SirinVestingTrustee Functions

Vesting trustee contract for Sirin Labs token.

grant

function grant(address _to, uint256 _value, uint256 _start, uint256 _cliff, uint256 _end, bool _revokable)
    public onlyOwner 

Grant tokens to a specified address.

revoke

function revoke(address _holder) public onlyOwner

Revoke the grant of tokens of a specifed address.

vestedTokens

 function vestedTokens(address _holder, uint256 _time) public constant returns (uint256)

Calculate the total amount of vested tokens of a holder at a given time.

unlockVestedTokens

 function unlockVestedTokens() public 

Unlock vested tokens and transfer them to their holder.

SirinVestingTrustee Events

NewGrant

event NewGrant(address indexed _from, address indexed _to, uint256 _value);

UnlockGrant

event UnlockGrant(address indexed _holder, uint256 _value);

RevokeGrant

event RevokeGrant(address indexed _holder, uint256 _refund);

Dependencies

# Install Truffle and testrpc packages globally:
$ npm install -g truffle ethereumjs-testrpc

# Install local node dependencies:
$ npm install

Test

$ ./scripts/test.sh

Code Coverage

$ ./scripts/coverage.sh

Collaborators

License

Apache License v2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].