Linker Coin
ERC20
This contract is an ERC20 token.
Name
Linker Coin
Symbol
LNC
Decimals
18
Total Supply
299,998,766 LNC
About link description
Linker Coin (LNC) is a cryptocurrency and operates on the Ethereum platform. Linker Coin has a current supply of 500,000,000 with 112,776,150.004 in circulation. The last known price of Linker Coin is 0.04347497 USD and is up 4.07 over the last 24 hours. It is currently trading on 2 active market(s) with $2,616.98 traded over the last 24 hours. More information can be found at https://www.linkercoin.com/en.
Stats
Public Functions
25
Event Types
11
Code Size
13,962 bytes
Events (11) keyboard_arrow_up
State Variables (15) keyboard_arrow_up
Functions
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Source Code
function transfer(address _to, uint256 _value) public returns (bool success) {
if (
_to != 0x0 && // Prevent transfer to 0x0 address.
IsFreezedAccount(msg.sender) == false &&
balances[msg.sender] >= _value &&
_value > 0 &&
balances[_to] + _value > balances[_to]
) {
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Transfer(msg.sender, _to, _value);
return true;
} else {
return false;
}
}
transferFrom keyboard_arrow_up
Source Code
function transferFrom(
address _from,
address _to,
uint256 _value
) public returns (bool success) {
if (
_to != 0x0 && // Prevent transfer to 0x0 address.
IsFreezedAccount(_from) == false &&
balances[_from] >= _value &&
allowed[_from][msg.sender] >= _value &&
_value > 0 &&
balances[_to] + _value > balances[_to]
) {
balances[_from] = balances[_from].sub(_value);
allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Transfer(_from, _to, _value);
return true;
} else {
return false;
}
}
approve keyboard_arrow_up
Source Code
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
allowance keyboard_arrow_up
IsFreezedAccount keyboard_arrow_up
FreezeAccount keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function FreezeAccount(address target, bool freeze) public onlyOwner {
frozenAccount[target] = freeze;
FrozenFunds(target, freeze);
}
burn keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function burn(uint256 _value) public onlyOwner returns (bool success) {
if (isBurn == true) {
balances[msg.sender] = balances[msg.sender].sub(_value);
_totalSupply = _totalSupply.sub(_value);
Burn(msg.sender, _value);
return true;
} else {
return false;
}
}
setBurnStart keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function setBurnStart(bool _isBurnStart) public onlyOwner {
isBurn = _isBurnStart;
}
setPrices keyboard_arrow_up
Parameters help
Modifiers help
onlyOwner checks for the following:
Requirements help
Source Code
function setPrices(
uint256 _lpBidPrice,
uint256 _lpAskPrice,
uint256 _lpBidVolume,
uint256 _lpAskVolume
) public onlyOwner {
require(_lpBidPrice < _lpAskPrice);
require(_lpBidVolume <= lpMaxVolume);
require(_lpAskVolume <= lpMaxVolume);
lpBidPrice = _lpBidPrice;
lpAskPrice = _lpAskPrice;
lpBidVolume = _lpBidVolume;
lpAskVolume = _lpAskVolume;
SetPrices(_lpBidPrice, _lpAskPrice, _lpBidVolume, _lpAskVolume);
}
setLpMaxVolume keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Requirements help
Source Code
function setLpMaxVolume(uint256 _lpMaxVolume) public onlyOwner {
require(_lpMaxVolume < 1000000000000000000000000);
lpMaxVolume = _lpMaxVolume;
if (lpMaxVolume < lpBidVolume) {
lpBidVolume = lpMaxVolume;
}
if (lpMaxVolume < lpAskVolume) {
lpAskVolume = lpMaxVolume;
}
SetLpMaxVolume(_lpMaxVolume);
}
setEdgePerPosition keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function setEdgePerPosition(uint256 _edgePerPosition) public onlyOwner {
//require(_edgePerPosition < 100000000000000000000000000000);
edgePerPosition = _edgePerPosition;
SetEdgePerPosition(_edgePerPosition);
}
setLPTargetPostion keyboard_arrow_up
setLpFee keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function setLpFee(uint256 _lpFeeBp) public onlyOwner {
require(_lpFeeBp <= 100);
lpFeeBp = _lpFeeBp;
SetLpFee(lpFeeBp);
}
setLpIsStart keyboard_arrow_up
getLpBidPrice keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function getLpBidPrice() public constant returns (uint256) {
uint256 lpPosition = balanceOf(owner);
if (lpTargetPosition >= lpPosition) {
return lpBidPrice;
} else {
return
lpBidPrice.sub(
(
((lpPosition.sub(lpTargetPosition)).div(multiplier)).mul(
edgePerPosition
)
)
.div(multiplierOfPrice)
);
}
}
getLpAskPrice keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function getLpAskPrice() public constant returns (uint256) {
uint256 lpPosition = balanceOf(owner);
if (lpTargetPosition <= lpPosition) {
return lpAskPrice;
} else {
return
lpAskPrice.add(
(
((lpTargetPosition.sub(lpPosition)).div(multiplier)).mul(
edgePerPosition
)
)
.div(multiplierOfPrice)
);
}
}
getLpIsWorking keyboard_arrow_up
Source Code
function getLpIsWorking(int256 minSpeadBp) public constant returns (bool) {
if (isLpStart == false) return false;
if (lpAskVolume == 0 || lpBidVolume == 0) {
return false;
}
int256 bidPrice = int256(getLpBidPrice());
int256 askPrice = int256(getLpAskPrice());
if (askPrice - bidPrice > (minSpeadBp * (bidPrice + askPrice)) / 2 / 10000) {
return false;
}
return true;
}
getAmountOfLinkerBuy keyboard_arrow_up
Source Code
function getAmountOfLinkerBuy(uint256 etherAmountOfSell)
public
constant
returns (uint256)
{
return
(
((multiplierOfPrice.mul(etherAmountOfSell)).div(getLpAskPrice())).mul(
uint256(10000).sub(lpFeeBp)
)
)
.div(uint256(10000));
}
getAmountOfEtherSell keyboard_arrow_up
Source Code
function getAmountOfEtherSell(uint256 linkerAmountOfBuy)
public
constant
returns (uint256)
{
return
(
((getLpBidPrice().mul(linkerAmountOfBuy)).div(multiplierOfPrice)).mul(
uint256(10000).sub(lpFeeBp)
)
)
.div(uint256(10000));
}
constructor keyboard_arrow_up
buy keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function buy() public payable returns (uint256) {
require(getLpIsWorking(500)); // Check Whether Lp Bid and Ask spread is less than 5%
uint256 amount = getAmountOfLinkerBuy(msg.value); // calculates the amount of buy from customer
require(balances[owner] >= amount); // checks if it has enough to sell
balances[msg.sender] = balances[msg.sender].add(amount); // adds the amount to buyer's balance
balances[owner] = balances[owner].sub(amount); // subtracts amount from seller's balance
lpAskVolume = lpAskVolume.sub(amount);
Transfer(owner, msg.sender, amount); // execute an event reflecting the chang // ends function and returns
return amount;
}
sell keyboard_arrow_up
Requirements help
null
Source Code
function sell(uint256 amount) public returns (uint256) {
require(getLpIsWorking(500));
require(balances[msg.sender] >= amount); // checks if the sender has enough to sell
balances[owner] = balances[owner].add(amount); // adds the amount to owner's balance
balances[msg.sender] = balances[msg.sender].sub(amount); // subtracts the amount from seller's balance
lpBidVolume = lpBidVolume.sub(amount);
uint256 linkerSendAmount = getAmountOfEtherSell(amount);
msg.sender.transfer(linkerSendAmount); // sends ether to the seller: it's important to do this last to prevent recursion attacks
Transfer(msg.sender, this, linkerSendAmount); // executes an event reflecting on the change
return linkerSendAmount; // ends function and returns
}
transferEther keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferEther(uint256 amount) public onlyOwner {
msg.sender.transfer(amount);
Transfer(msg.sender, this, amount);
}
Internal Functions
Internal functions are parts of the contract that can't be used directly, but instead are used by the public functions listed above.