All news

Commissions on Credits Platform

transaction

The commission is calculated based on the transaction size (in bytes). The minimum transaction size is 96-152 bytes depending on payload, with a fixed commission of 0.0004284 CS, if the amount doesn’t exceed the max fee. 

smart contracts transactions

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

 

Pic. 1 demonstrates the dependence of fees for deploy transaction

Pic. 2 demonstrates the dependence of fees for execute transaction, payable transaction, new state transaction, emitted transaction

 

fee calculation rules for smart contract execution 

There are two types of transactions within smart contract deployment:

  • Transaction initiator action -  deploy transaction, execute a transaction, payable transaction·  
  • a transaction where the smart contract is in a “new state” whereby a change has been made- new state transaction

 Any action performed with a contract changes its state, excepting the get methods which only read information and do not write anything to the blockchain. In all other cases, it is necessary to create a transaction request to execute a smart contract method.

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

Also, in order to compile and execute a smart contract, a certain amount of computing power is also required 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 generated

If the “new state transaction” is null or max fee is exceeded, then

  • Reserved funds of the max fee are returned
  • The 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 the max fee are returned
  • The counted fee is deducted for a deploy transaction
  • The 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 generated 

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

  • Reserved funds of the max fee are returned
  • The 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 the max fee are returned
  • The counted fee is deducted for execute transaction
  • The 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 generated

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

  • The 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
  • The amount is transferred to a smart contract account
  • The 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

Emitted transactions perform additional actions in the system to provide a higher level of automation. The commission is calculated based on the mentioned rules above.

Share: twitter logo facebook logo reddit logo linkedin logo