Auctus
  • Getting started
  • Security
  • FAQ
    • Basics
    • Exercising Options
    • Minting Options
    • Security, Fees and Governance
  • AUCTUS POOLS
    • POOLS
  • Auctus Vaults
    • Auctus Vaults
  • Use Cases - Ethereum Options
    • Buying ETH call options
    • Writing ETH call options
    • Buying ETH put options
    • Writing ETH put options
  • SMART CONTRACTS
    • Factory
    • Token
    • Flash Exercise
    • Writer
Powered by GitBook
On this page
  • Introduction
  • Code
  • Address
  • Read-Only Functions
  • weth
  • erc20proxy
  • State-Changing Functions
  • write
  • ABI

Was this helpful?

  1. SMART CONTRACTS

Writer

PreviousFlash Exercise

Last updated 4 years ago

Was this helpful?

Introduction

It is a contract to write ACO tokens. Through the data obtained on 0x protocol to market sell ACO tokens is possible to mint and market sell the tokens in only one step.

Code

Address

ACOWriter.sol is deployed at on the Ethereum mainnet.

Read-Only Functions

weth

function weth() external view returns(address);

The WETH address 0x.

erc20proxy

function erc20proxy() external view returns(address);

Address for 0x ERC20 proxy.

State-Changing Functions

write

function write(address acoToken, uint256 collateralAmount, address exchangeAddress, bytes calldata exchangeData) external payable;

Function to write ACO tokens. The tokens are minted then sold on the 0x exchange. The transaction sender receives the premium.

  • acoToken Address of the ACO token.

  • collateralAmount Amount of collateral to be deposited.

  • exchangeAddress Address to sell the tokens returned by 0x API.

  • exchangeData Data to be sent to the 0x exchange.

When the asset that should be collateralized is not Ether the allowance to the writer contract on the respective ERC20 asset is required.

The function only works when the ACO token is NOT expired yet.

ABI

ACOWriter.sol
0xE7597F774fD0a15A617894dc39d45A28B97AFa4f
JSON