Published 25 June 2019

Commissions on CREDITS Platform

Term List

Terms

Definition

transaction

Main transaction

smart contracts transactions

deploy transaction, execute transaction, payable transaction, new state transaction

deploy transaction

Transaction for  smart contract deployment 

execute transaction

Transaction for smart contract execution 

payable transaction

Transaction to transfer funds to a smart contract 

amount

Amount to be transferred in payable transaction

new state transaction

Transaction with the new state of a smart contract 

emitted transaction

Transaction created by a contract when it’s called

max fee

The max fee that a user is willing to pay 

counted fee

Calculated fee 

execute fee

Fee for the smart contract execution 

 

transaction

Commission is calculated based on the transaction size (in bytes). The minimum transaction to be transferred over the system has the size of 96-152 bytes and the fixed commission of 0.0004284 CS, if the amount doesn’t exceed the max fee. 

smart contracts transactions

 

While smart contracts are executed and distributed over the blockchain, the commission “counted fee” is calculated based on the size of recorded data. 



Size (byte)

counted fee for deploy transaction (CS)

counted fee for any other(CS)

1024 + 512

0.008746170242

0.0004828886573

20 * 1024

0.03546746927

0.0005862733239

50 * 1024

0.1438276802

0.001104468428

100 * 1024

1.936458209

0.009641057723

256 * 1024

5.26383916

0.3813112299

512 * 1024

38.89480285

4.874110187

768 * 1024

105.7270358

19.96925763

1024 * 1024

287.3958802

103.8255221

5 * 1024 * 1024

781.2229988

259.834061

15 * 1024 * 1024

2123.584282

651.3469549

50 * 1024 * 1024

5772.500564

2309.930666

100 * 1024 * 1024

15691.28339

5165.460461

500 * 1024 * 1024

42653.3305

9959.829026

1000 * 1024 * 1024

115943.7732

115943.7732

 

Fee calculation rules for smart contract execution 

 

There are two types of transactions within smart contract deployment:

  

  • Transaction initiator action -  deploy transaction, execute transaction, payable transaction·  
  • a transaction with the new state of the smart contract - new state transaction

 

Any action performed with a contract, changes its state except for the get methods which don’t write anything in the blockchain. Yet these methods read and return requested data from a user. In other cases, it’s necessary to create a transaction request to execute smart contract method.

 

 

When creating a transaction, funds are reserved for this method execution. Transferred funds are also reserved when creating payable transaction and emitted transaction.

 

Also, in order to compile and execute a smart contract, certain amount of computing power gets used for which the “execute fee” commission must also be paid. The following commission is calculated based on the execution time followed by the currency rate:

 

1 second execution = minimum of counted fee or 0.0004828886573 CS.

0.1  sec =  0.0000482888657. 

 

deploy transaction

 

  • Funds are reserved and charged with the max fee from a user’s account
  • Then, a smart contract is compiled and new state transaction is being generated

If the “new state transaction” returns an empty state or max fee is exceeded, then

 

  • Reserved funds of max fee are returned
  • counted fee is deducted for deploy transaction
  • execute fee is deducted
  • minimum counted fee is deducted for a new state transaction

If the execution was successful:

 

 

  • Reserved funds of max fee are returned
  • counted fee is deducted for a deploy transaction
  • counted fee is deducted for a new state transaction
  • execute fee is deducted

 

execute transaction

 

  • The funds are reserved and charged with a max fee from the user’s account 
  • Then, a smart contract is compiled and new state transaction is being generated 

 

If the “new state transaction” returns an empty state or max fee is exceeded, then 

 

  • reserved funds of max fee are returned
  • counted fee is deducted for execute transaction
  • execute fee is deducted
  • minimum counted fee is deducted for new state transaction

 

If the execution was successful: 

 

  • reserved funds of max fee are returned
  • counted fee is deducted for execute transaction
  • counted fee is deducted for new state transaction
  • execute fee is deducted



payable transaction

  • The funds are reserved and charged with a max fee + amount

from the user’s account

  • Then, a smart contract  is compiled and new state transaction is being generated

 

If the “new state transaction” returns an empty state or max fee is exceeded, then reserved funds of max fee+amount are returned

  • counted fee is deducted for payable transaction
  • execute fee is deducted
  • minimum counted fee is deducted for a new state transaction

 

If the execution was successful:

 

  •   reserved funds of max fee+amount are returned
  •  amount is transferred to a smart contract account
  • counted fee is deducted for payable transaction
  • execute fee is deducted
  • minimum counted fee is deducted for a new state transaction

emitted transaction

This type of transaction generates a smart contract when it is called and can represent one of the following transactions in the system:

  •  transaction
  • execute transaction
  • payable transaction

 

This entity performs additional actions in the system to achieve a higher level automation of user experience. Commission is calculated based on the mentioned rules above.

 

Votes 0, average rating 0

Contents