Skip to content

dbxe/mvu-token

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SIRIN LABS' Crowdsale Contracts

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

MEVU Token

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

Contracts

Please see the contracts/ directory.

The Crowdsale Specification

  • MVU token is ERC-20 compliant.
  • MVU Token is Bancor compliant.

MVU PRICING PROGRAM

*Will be adjusted to reflect prices at time of sale, this chart assumes 1 ETH = $1000 USD

Duration from token Crowdsale event start MVU / ETH
1st day 2500
2nd day 2500
3rd day 2500
4th day 2500
5th day 2500
6th day 2500
7th day 2500
8th day 2500
9th day 2500
10th day 2439
11th day 2381
12th day 2326
13th day 2273
14th day 2222
15th day 2174
16th day 2128
17th day 2083
18th day 2041
19th day 2000
20th day 2000
35th day 2000

Refund Route - MVU tokens with guarantee

Investors can choose to buy MVU tokens with guarantee.

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

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

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

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

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

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

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

Develop

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 MVU per 1 ETH according to the time of the tx and the MVU 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 Mevu 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 MVU back to Mevu 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 Mevu 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

About

The MVU token contracts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 73.8%
  • Solidity 24.3%
  • Shell 1.9%