Token Holding & Staking

Token Holding & Staking

The standard way of defining token mechanics where tokens are exchanged between agents in the simulation is through token flows, where we define the quantity to be exchanged each simulation step. However, sometimes it is more convenient to instead specify the target amount of tokens that the agent has at each simulation step. This is precisely the purpose of the token holding optional feature described here.

Token holding

In the Agents table, the user has the possibility of defining a formula for a target amount of tokens to be held by an agent, in the column Token holding.

If there is no formula specified for an agent, this feature is ignored. The agent will hold the net amount of tokens resulting from the rest of the token flows affecting it (vesting and user-specified flows in the “Flows” tab). The only restriction is that the agent cannot have negative tokens.

If there is a formula specified for an agent, each simulation time step the agent will buy or sell tokens against the market so that it ends up holding the amount of tokens specified by the formula, when taking into account the vesting and user-specified flows that may affect it as well. The new purchase or sale of tokens counts as a new token flow that gets added to the others in the simulation.

It is important to note that any user-defined flows in the Flows table between the market and an agent with a token holding formula will be "overwritten" by the token holding formula, since it will add an additional flow that will compensate any other flows so that the agent ends up with the desired amount of tokens.

Similarly to the above, if the agent is the beneficiary of a vesting schedule from the Vesting table, the flow of unlocked tokens will be instantly traded against the market until the agent meets the target amount of tokens held. Therefore, it is advisable to separate agent roles and not have agents with both a vesting schedule and a token holding formula.

Token staking

In the Agents table, the user has the possibility of defining a formula for a target amount of tokens to be staked by an agent, in the column Token staking.

This feature works like the "Token holding" above, with key differences:

  • We can specify a locking time through a formula in the Staking locking period column. The simulation will keep track internally of the locked and unlocked amounts of tokens. The actual amount of staked tokens cannot go below the locked amount, even if the Token staking formula is below that number.

  • If both Token staking and Token holding are defined, they are treated as two different buckets. The agent will trade against the market until it has exactly the amount of tokens specified by the sum of both constraints.

Last updated