2 Saturn Token

Saturn (STN) token is issued on the Ethereum4 blockchain. Saturn is compatible with the ERC223 token standard, which means that it is already supported by major Ethereum wallets5, like Mist, MyEtherWallet and Ledger Nano S, and decentralized exchanges, like EtherDelta, IDEX, OasisDEX and raidEX. This means that businesses that use Saturn have full infrastructure support for free, customers get to use their favorite wallets instead of learning how to download and use a new one, and investors get liquidity on day one and are free to trade their tokens on decentralized exchanges.

Saturn is one of the first tokens to embrace this new standard. The benefits of using ERC223 over ERC20, currently championed by tutorials on ethereum.org and OpenZeppelin, are:

  • Lower transaction fees. Every transaction on Ethereum requires a certain amount of gas, which acts as a miner fee. Depending on implementation, ERC223 token transfers can be up to twice6 cheaper.
  • Protects users from losing their tokens. While ethereum core team have made it easy to write smart contracts, they forgot to provide developers with the tools to secure and validate smart contract correctness. In fact, we managed to fix two fairly obvious bugs in the official documentation, which means that the language creators themselves are unable to write correct smart contracts. More than $500,000 in ERC20 tokens are forever lost7 due to the lack of transaction handling mechanism. ERC223 tokens make this situation impossible and protect investors from accidentaly making a costly mistake.

2.1 Technical details

Saturn implements ERC223 token standard and has the following signature.

2.1.1 Methods

totalSupply

function totalSupply() constant returns (uint256 totalSupply)

Get total token supply.

name

function name() constant returns (string _name)

Get the name of the token.

symbol

function symbol() constant returns (string _symbol)

Get the symbol of the token.

decimals

function decimals() constant returns (uint8 _decimals)

How many decimals the token has.

balanceOf

function balanceOf(address _owner) constant returns (uint256 balance)

Get the account balance of another account with address _owner.

transfer(address, uint)

function transfer(address _to, uint _value) returns (bool)

Exists to ensure compatibility with ERC20-compliant software, such as existing wallets and exchanges. Implemented in a way that prevents lost token problem.

transfer(address, uint, bytes)

function transfer(address _to, uint _value, bytes _data) returns (bool)

ERC223 way of handling token transfer. _data can be attached to this token transaction and it will stay in blockchain forever (requires more gas). _data can be empty.

2.1.2 Events

Transfer

event Transfer(
  address indexed _from,
  address indexed _to,
  uint256 _value,
  bytes   _data
)

Triggered when tokens are transferred.

2.1.3 Saturn ERC223 Implementation

pragma solidity ^0.4.9;

import "./ERC223Token.sol";

/**
  * @title Saturn token
  * @param name string. Token name.
  * @param symbol string. Token symbol.
  * @param decimals uint. Defines the smallest denomination.
  *   In case of Saturn that's 0.0001 STN.
  * @param totalSupply uint. Total token supply plus four zeroes
  *   for decimals.
  */
contract Saturn is ERC223Token {
  string public name        = "Saturn";
  string public symbol      = "STN";
  uint   public decimals    = 4;
  uint   public totalSupply = 2000000000;

  function Saturn() {
    totalSupply          = totalSupply;
    balances[msg.sender] = totalSupply;
  }
}