ECOx Token

Token Purpose

The ECOx token is a secondary token, related to ECO, entitled to an inflation-protected percentage of the ECO supply by burning the ECOx. ECOx tokens can be burned and converted into ECO at a defined, percentage-based conversion rate. Together these design components allow ECOx to be valued as a proxy token for the ECO economy itself. ECOx holders may also vote in community governance, but must be transferred to a staking contract to do so.

Supply and Voting Power

  • Initial Supply: 1 billion units of ECOx.

  • Supply Policy: capped at launch / deflationary with conversions.

  • Voting Power: 1 Voting Power per ECOx.

In the contracts, voting power is stored as a uint256 number with one decimal. Therefore, when reading the voting power per ECO from the contract, it is displayed as 1, and the voting power per ECOx is displayed as 10.

ECOx Token Implementation

The ECOx token is implemented as a standard ERC20 (with 18 digits of fixed precision), but has a few behaviors that are unexpected for an ERC20. Using the "Weird ERC20 Token" framework, the ECO token has the following unexpected behavior:

  1. Upgradable Token

  2. Pausable Token

  3. Revert on Transfer / Approval To Zero Address

  4. Revert on Failed Transfer

  5. Update Allowance Function

1. Upgradable Token

The ECOx token is managed through a proxy, which allows the core logic of the ERC20 contract to be modified at any time. Any modifications will be managed by the Eco Protocol’s governance system.

2. Pausable Token

To guard against potential catastrophic bugs or outside events, the Eco Protocol is equipped with a circuit breaker, as described in the Circuit Breaker page.

3. Revert on Transfer / Approval To Zero Address

The ECOx token reverts on both approvals and transfers to the zero address.

4. Revert on Failed Transfer

The external ERC20 function does not actually return false on failure but reverts. They do return true on success though.

5. Update Allowance Function

There are decreaseAllowance and increaseAllowance functions to change allowances. Also, the transferFrom method emits an Approval event marking the updated allowance.

ECOx Staking for Voting

ECOx tokens must be transferred to a staking contract to vote with them in community governance. A couple of notes about staked ECOx:

  1. The voting power of 1 ECOx is the same as the voting power of 10 ECO, which means that at genesis, the total ECOx voting power is equal to the total ECO voting power.

  2. If an address holds both ECO and ECOx, the voting power of that address is equal to the sum of the respective voting powers of the ECO and ECOx held.

  3. ECOx voting power is calculated using the same balance checkpoint system as ECO, but only balances deposited in the staking contract are tracked. In order to be snapshotted, ECOx must be staked through a generation increment.

  4. ECOx that has been staked can be delegated for users who wish to stake but not vote, but still want their voting power to be used.

  5. Staked ECOx cannot be transferred.

Staking is managed by the ECOxStaking.sol contract. To stake, users should first call the approve(address spender, uint256 amount) function and approve the transfer of ECOx to the address of the staking contract. Then, they should call the deposit(uint256 _amount). To unstake, users should call withdraw(uint256 _amount). The uint256 _amount is denominated in Wei for both functions.

ECOx Conversion

ECOx held by an account can be converted directly to ECO at any time. The conversion is irreversible and is done through a burn and mint process, mediated by the ECOx token contract. The conversion formula is:

Δa=A(eΔb/β1)\Delta a = A *( e^{\Delta b/\beta} -1)


Δa:new ECO mintedA:current ECO supplyΔb:total burned ECOxβ:initial ECOx supply\Delta a : new \ ECO \ minted\newline A: current \ ECO \ supply \newline \Delta b: total \ burned \ ECOx \newline \beta : initial \ ECOx \ supply

One should note that only the initial supply, not the current supply of ECOx is considered. This is equivalent to minting 1% of the current amount of ECO for each 1% of lifetime ECOx that is burned, adjusted by continuously compounding to account for the newly minted ECO via the process. The exponential function is estimated via a 33-term Taylor expansion with precomputed coefficients, which gives error bounds of one in 10^24 for exchange events on the order of half of the total supply, as well as rounding off-by-one errors at exchanging about 10^-13 percent of the total supply.

Exchanging is managed by the ECOx.sol contract. To exchange, users should call the exchange(uint256 _ecoXValue) function in that contract. uint256 _ecoXValue is denominated in Wei.

Last updated