Balance transfers are used to send a balance from one account to another account.
To start transferring a balance, we can use
In Cere there are two main ways to transfer funds from one account to another:
transfer keep-alive
(default option) will not allow you to send an amount that would allow the sending account to be removed due to it going below the existential deposit of 1 CERE.transfer
will allow you to send CERE regardless of the consequence. If the balance drops below the existential deposit your account will be reaped. It may be that you do not want to keep the account alive (for example, because you are moving all of your funds to a different address). To switch the keep-alive check off visit this support article.Attempting to send less than the existential deposit to an account with 0 CERE will always fail, no matter if the keep-alive check is on or not.
For instance, attempting to transfer 0.1 CERE to an account you just generated (and thus has no balance) will fail, since 0.1 CERE is less than the existential deposit of 1 CERE and the account cannot be initialized with such a low balance.
Even if the transfer fails due to a keep-alive check, the transaction fee will be deducted from the sending account if you attempt to transfer.
CERE may have a lock placed on them to account for vesting funds. Like other types of locks, these funds cannot be transferred but can be used in other parts of the protocol such as voting in governance or being staked as a validator or nominator.
Vesting funds are on a release schedule and unlock a constant number of tokens at each block (linear vesting) or can unlock the full amount after a specific block number (cliff vesting). Although the tokens are released in this manner, it does not get reflected on-chain automatically since locks are lazy and require an extrinsic to update.
There are two ways that vesting schedules can be created.
vested_transfer
. The vested transfer function allows anyone to create a vesting schedule with a transfer of funds, as long as the account for which the vesting schedule will be created does not already have one and the transfer moves at least MinVestedTransfer
funds, which is specified as a chain constant.Vesting schedules have three parameters:
The configuration of these three fields dictates the amount of funds that are originally locked, the slope of the unlock line and the block number for when the unlocking begins.