Initial Time Offering (ITO)

The ITO protocol provides a marketplace for takers (buyers) and suppliers (sellers) to swap tokens, with optionality for the taker to return a predetermined amount of tokens for a full or partial refund if executed before expiry.

Suppliers create single sided limit orders with a custom fee and expiration date. Takers instantly receive tokens they purchase. Until expiration, the taker can return any amount of tokens purchased for a refund, having already paid the custom supplier fee for the rights to do so. The protocol fee and supplier fee are non refundable and immediately withdrawable.

Network Addresses

The ITO contracts can be deployed to any EVM compatible network.

Supplying Tokens

Anyone can create a new position by calling the supply() method. When supplying, you deposit your tokens so that others may buy them at the value you set, much like a limit sell order that can earn yield from the supply fee you set.

Any token contract address can be provided for both the supplied tokens and the tokens to receive from the buyer as payment. The exchange rate must also be provided to determine total supplied tokens to pay the buyer based on total tokens received.

The start date of when takers can begin taking from this position can be set to any date that must be in the future from when the supply() method is executed on chain.

The end date of when the position expires, when takers can no longer return tokens for refunds, can be set as far into the future as desired, so long as this value is greater than the start date value provided. The state of all upside and downside tokens for this position are locked in after the end date: the supplier can now withdraw all upside and downside tokens from this position. The associated upside tokens provided by takers can not be withdrawn before the end date since they may still be needed for refunds of untake() calls.

Supply Fee

The supplier can optionally choose to set a supply fee. Each position created can have a different supply fee. This fee is instantly paid to the supplier at the time someone takes from this position. The maximum allowed value for this fee is 49.99%.

The fee percentage is relative to the final amount the taker would pay.

Math examples:

  • Supplier provides 900 DOGE tokens and wants $1.00 USDC per DOGE token, or $900 USDC total if the full position was taken. Assuming the protocol fee is set to 0%:

    1. If supplier sets 0% as the supply fee:

      • Taker will see $1.00 as the cost per DOGE token. It will cost $900 USDC ($1.00 x 900 tokens) to buy the full position and 0% of that ($0 USDC) would be paid to the supplier as the supply fee while the rest ($900 USDC) would be the optionally refundable amount.

    2. If supplier sets 10% as the supply fee:

      • Taker will see $1.1111 as the cost per DOGE token. It will cost $1,000 USDC ($1.1111 x 900 tokens) to buy the full position and 10% of that ($100 USDC) would be paid to the supplier as the supply fee while the rest ($900 USDC) would be the optionally refundable amount.

    3. If supplier sets 20% as the supply fee:

      • Taker will see $1.25 as the cost per DOGE token. It will cost $1,125 USDC ($1.25 x 900 tokens) to buy the full position and 20% of that ($225 USDC) would be paid to the supplier as the supply fee while the rest ($900 USDC) would be the optionally refundable amount.

  • In all above scenarios: The taker could return 900 DOGE to get back $900 USDC at any time.

Refer to this helpful spreadsheet rows 7,8,9 to follow along with the above math examples

Claiming Supply Fees

Every supplier can call the claimPositionFees() method to retrieve some or all supply fees accumulated so far that are owed to them. As soon as any take() has happened for a position you are a supplier of that you have set an lpFee value of that is > 0, you can immediately withdraw those fees.

Only you can initiate your fees to be sent to you, no one can on your behalf. This means that until you choose claim your fees, they will not be sent to you.

Protocol Fee

The governance controlled protocol fee enables a fee to exist that can be sent to a governance controlled destination address.

  • The protocol fee can be read at Etherscan, and is currently set to 0%.

  • The protocol fee destination address can be read at Etherscan, and currently goes to the Epoch DAO Treasury.

Protocol fees work the same as Supply fees in several ways:

  • Adding these two fees together, the sum becomes the only fee the taker sees regarding the upside and downside ratios and quantity of refundable tokens possible before expiry.

  • As soon as a take() is executed, the protocol fee is immediately claimable.

  • This fee is non refundable to the taker.

Setting the Protocol Fee

This fee value and destination address is governance controlled.

Calling the setProtocolFee() method allows for the fee value or destination address to be changed.

The maximum allowed value for the fee is 49.99%.

Removing Tokens

The supplier can remove any unused tokens not yet taken, at any time, with no penalties, by calling the remove() method.

Untaking Tokens

The ability to untake() a position, to give tokens back for a predetermined refund rate, is where the magic happens that makes this ITO protocol so special: it introduces a more "risk-free" or "anti-rekt" way for users to buy tokens.

At any time before a position has expired due to reaching its endDate specified by the supplier, a taker can give back some or all of the tokens they took from that position, to get a refund of some or all of the tokens they initially provided when taking from that position.

Immediately after an untake() executes on chain, anyone else can now immediately take() these returned tokens from this position as though they were never previously taken: the same fees and expiry date still apply.

Math examples:

Referring to the three supply fee math examples above: if you take() the entire position of each of those, and then wanted a full refund on each of those:

  1. Scenario 1: Paid $900 USDC when taking full position to acquire 900 DOGE tokens

  2. Scenario 2: Paid $1000 USDC when taking full position to acquire 900 DOGE tokens

  3. Scenario 3: Paid $1,125 USDC when taking full position to acquire 900 DOGE tokens

In all 3 scenarios: Giving back 900 DOGE tokens will result in getting a refund of $900 USDC. All 3 scenarios had identical supply parameters except for the supplier fee ("lpFee") being 0%, 10%, and 20%, respectively.

Subgraphs

Moai Labs is currently maintaining a subgraph tracking vEPOCH positions and events. This can be found below.

Audits

Moai Labs facilitated getting 5 different audits completed for the ITO contract:

The ITO protocol has undergone rigorous testing and auditing procedures with respect to conventional ERC20 tokens, such as USDC, WETH, WBTC, and others. However, for non-standard ERC20 tokens that possess distinctive functionalities altering the token balance, such as rebasing or fees on transfer, it is essential to exercise caution. In theory, rebasing tokens like stETH could be compatible with the ITO protocol, but it is important to note that any supplementary amounts resulting from a rebase event, leading to an increase in the token balance, will become immobilized within the ITO protocol contract.

Last updated