F Tokens

fTokens are yield-generating tokens that are minted and burned upon deposit and withdraw. The fTokens' value is pegged to the value of the corresponding deposited asset at a 1:1 ratio, and can be safely stored, transferred or traded. All interest collected by the fTokens reserves are distributed to fTokens holders directly by continuously increasing their wallet balance.

For all minting and burning actions, see Deposit() and Withdraw() methods in the LendingPool contract.

EIP20 Methods

All standard EIP20 methods are implemented, such as balanceOf(), transfer(), transferFrom(), approve(), totalSupply(), etc.

balanceOf() will always return the most up to date balance of the user, which includes their principal balance + the interest generated by the principal balance.

EIP2612 Methods

permit()

function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)

Allows a user to permit another account (or contract) to use their funds using a signed message. This enables gas-less transactions and single approval/transfer transactions.

ParameterTypeDescription

owner

address

The owner of the funds

spender

address

The spender for the funds

value

uint256

The amount the spender is permitted to use

deadline

uint256

The deadline timestamp that the permit is valid. Use type(uint).max for no deadline.

v

uint8

Signature parameter

r

bytes32

Signature parameter

s

bytes32

Signature parameter

import { signTypedData_v4 } from 'eth-sig-util'
import { fromRpcSig } from 'ethereumjs-util'

// ... other imports

import fTokenAbi from "./fTokenAbi.json"

// ... setup your web3 provider

const fTokenAddress = "FTOKEN_ADDRESS"
const fTokenContract = new web3.eth.Contract(fTokenAbi, fTokenAddress)

const privateKey = "YOUR_PRIVATE_KEY_WITHOUT_0x"
const chainId = 1
const owner = "OWNER_ADDRESS"
const spender = "SPENDER_ADDRESS"
const value = 100 // Amount the spender is permitted
const nonce = 1 // The next valid nonce, use `_nonces()`
const deadline = 1600093162

const permitParams = {
  types: {
    EIP712Domain: [
      { name: "name", type: "string" },
      { name: "version", type: "string" },
      { name: "chainId", type: "uint256" },
      { name: "verifyingContract", type: "address" },
    ],
    Permit: [
      { name: "owner", type: "address" },
      { name: "spender", type: "address" },
      { name: "value", type: "uint256" },
      { name: "nonce", type: "uint256" },
      { name: "deadline", type: "uint256" },
    ],
  },
  primaryType: "Permit",
  domain: {
    name: "fTOKEN_NAME",
    version: "1",
    chainId: chainId,
    verifyingContract: fTokenAddress,
  },
  message: {
    owner,
    spender,
    value,
    nonce,
    deadline,
  },
}

const signature = signTypedData_v4(
  Buffer.from(privateKey, "hex"),
  { data: permitParams }
)

// The signature can now be used to execute the transaction

const { v, r, s } = fromRpcSig(signature)

await fTokenContract.methods
    .permit({
      owner,
      spender,
      value,
      deadline,
      v,
      r,
      s
    })
    .send()
    .catch((e) => {
        throw Error(`Error permitting: ${e.message}`)
    })

_nonces()

function _nonces(address owner) public

Returns the next valid nonce to submit when calling permit()

Methods

UNDERLYING_ASSET_ADDRESS()

function UNDERLYING_ASSET_ADDRESS()

Returns the underlying asset of the fToken.

RESERVE_TREASURY_ADDRESS()

function RESERVE_TREASURY_ADDRESS()

Returns the address of the fTokens reserve treasury.

POOL()

function POOL()

Returns the address of the associated LendingPool for the fToken.

scaledBalanceOf()

function scaledBalanceOf(address user)

Returns the scaled balance of user as a uint256.

The scaled balance is the balance of the underlying asset of the user (amount deposited), divided by the current liquidity index at the moment of the update.

I.e. scaledBalance=amountDeposited/currentLiquidityIndexscaledBalance = amount Deposited / currentLiquidityIndex

This essentially 'marks' when a user has deposited in the reserve pool, and can be used to calculate the users current compounded fToken balance.

Example:

  • User A deposits 100 ETH at the liquidity index of 1.1

  • User B deposits another amount into the same pool

  • The liquidity index is now 1.2.

  • Therefore to calculate User A's current compounded fToken balance, the reverse operation should be performed: fTokenBalance=scaledBalancecurrentLiquidityIndexfTokenBalance = scaledBalance * currentLiquidityIndex

getScaledUserBalanceAndSupply()

function getScaledUserBalanceAndSupply(address user)

Returns the scaled balance of user and the principal total supply.

Return values

TypeDescription

uint256

scaled balance of user

uint256

principal total supply

scaledTotalSupply()

function scaledTotalSupply()

Returns the scaled total supply of the fToken as uint256.

The scaled total supply is the sum of all the updated stored balances, divided by the reserve index at the moment of the update.

function isTransferAllowed(address user, uint256 amount)

Returns true if a transfer is allowed.

Specifically, a transfer will fail if the resulting Health Factor of user will end up being below 1.

FToken ABI
{
  "abi": [
    {
      "inputs": [],
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "spender",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "Approval",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "index",
          "type": "uint256"
        }
      ],
      "name": "BalanceTransfer",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "target",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "index",
          "type": "uint256"
        }
      ],
      "name": "Burn",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "creatorAddress",
          "type": "uint256"
        }
      ],
      "name": "CreatorAddressUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "creatorPercentage",
          "type": "uint256"
        }
      ],
      "name": "CreatorPecentageUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "underlyingCollateral",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "underlyingAsset",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "lendingPool",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "incentivesController",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "treasury",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "creator",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "creatorPercentage",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "auctionCallerPercentage",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "auctionCreatorPercentage",
          "type": "uint256"
        }
      ],
      "name": "Initialized",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint8",
          "name": "version",
          "type": "uint8"
        }
      ],
      "name": "Initialized",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "index",
          "type": "uint256"
        }
      ],
      "name": "Mint",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "Transfer",
      "type": "event"
    },
    {
      "inputs": [],
      "name": "POOL",
      "outputs": [
        {
          "internalType": "contract ILendingPool",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "RESERVE_TREASURY_ADDRESS",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "UNDERLYING_ASSET_ADDRESS",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "UNDERLYING_COLLATERAL_ADDRESS",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "UNDERLYING_MAX_TOKEN_ID",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "UNDERLYING_MIN_TOKEN_ID",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "spender",
          "type": "address"
        }
      ],
      "name": "allowance",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "spender",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "approve",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "user",
          "type": "address"
        }
      ],
      "name": "balanceOf",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "user",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "receiverOfUnderlying",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "index",
          "type": "uint256"
        }
      ],
      "name": "burn",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "decimals",
      "outputs": [
        {
          "internalType": "uint8",
          "name": "",
          "type": "uint8"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "spender",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "subtractedValue",
          "type": "uint256"
        }
      ],
      "name": "decreaseAllowance",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "exchangeRate",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getAuctionCallerPercentage",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getAuctionCreatorPercentage",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getPoolIncentivesController",
      "outputs": [
        {
          "internalType": "contract IPoolIncentivesController",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getReserveCreatorAddress",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getReserveCreatorPercentage",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getReserveNormalizationFactor",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "user",
          "type": "address"
        }
      ],
      "name": "getScaledUserBalanceAndSupply",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "spender",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "addedValue",
          "type": "uint256"
        }
      ],
      "name": "increaseAllowance",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IAddressProvider",
          "name": "addressProvider",
          "type": "address"
        },
        {
          "components": [
            {
              "internalType": "address",
              "name": "underlyingCollateral",
              "type": "address"
            },
            {
              "internalType": "string",
              "name": "underlyingCollateralName",
              "type": "string"
            },
            {
              "internalType": "string",
              "name": "underlyingCollateralSymbol",
              "type": "string"
            },
            {
              "internalType": "uint256",
              "name": "underlyingMaxTokenId",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "underlyingMinTokenId",
              "type": "uint256"
            },
            {
              "internalType": "address",
              "name": "underlyingAsset",
              "type": "address"
            },
            {
              "internalType": "string",
              "name": "underlyingAssetName",
              "type": "string"
            },
            {
              "internalType": "string",
              "name": "underlyingAssetSymbol",
              "type": "string"
            },
            {
              "internalType": "uint8",
              "name": "underlyingAssetDecimals",
              "type": "uint8"
            },
            {
              "internalType": "address",
              "name": "fTokenImpl",
              "type": "address"
            },
            {
              "internalType": "string",
              "name": "fTokenName",
              "type": "string"
            },
            {
              "internalType": "string",
              "name": "fTokenSymbol",
              "type": "string"
            },
            {
              "internalType": "address",
              "name": "stableDebtTokenImpl",
              "type": "address"
            },
            {
              "internalType": "string",
              "name": "stableDebtTokenName",
              "type": "string"
            },
            {
              "internalType": "string",
              "name": "stableDebtTokenSymbol",
              "type": "string"
            },
            {
              "internalType": "address",
              "name": "variableDebtTokenImpl",
              "type": "address"
            },
            {
              "internalType": "string",
              "name": "variableDebtTokenName",
              "type": "string"
            },
            {
              "internalType": "string",
              "name": "variableDebtTokenSymbol",
              "type": "string"
            },
            {
              "internalType": "address",
              "name": "interestRateStrategy",
              "type": "address"
            },
            {
              "internalType": "uint256",
              "name": "baseLTV",
              "type": "uint256"
            },
            {
              "internalType": "address",
              "name": "treasury",
              "type": "address"
            },
            {
              "internalType": "address",
              "name": "creator",
              "type": "address"
            },
            {
              "internalType": "uint256",
              "name": "creatorPercentage",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "auctionCallerPercentage",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "auctionCreatorPercentage",
              "type": "uint256"
            },
            {
              "internalType": "string",
              "name": "assetPriceFeed",
              "type": "string"
            }
          ],
          "internalType": "struct ConfigTypes.InitReserveInput",
          "name": "input",
          "type": "tuple"
        }
      ],
      "name": "initialize",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "user",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "index",
          "type": "uint256"
        }
      ],
      "name": "mint",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "user",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "caller",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "liquidationFee",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "index",
          "type": "uint256"
        }
      ],
      "name": "mintAuctionPaymentToStakeholders",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "user",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "index",
          "type": "uint256"
        }
      ],
      "name": "mintStableDebtRepaymentToStakeholders",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "index",
          "type": "uint256"
        }
      ],
      "name": "mintVariableDebtRepaymentToStakeholders",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "name",
      "outputs": [
        {
          "internalType": "string",
          "name": "",
          "type": "string"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "user",
          "type": "address"
        }
      ],
      "name": "scaledBalanceOf",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "scaledTotalSupply",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "auctionCallerPercentage",
          "type": "uint256"
        }
      ],
      "name": "setAuctionCallerPercentage",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "auctionCreatorPercentage",
          "type": "uint256"
        }
      ],
      "name": "setAuctionCreatorPercentage",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "creator",
          "type": "address"
        }
      ],
      "name": "setReserveCreatorAddress",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "creatorPercentage",
          "type": "uint256"
        }
      ],
      "name": "setReserveCreatorPercentage",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "symbol",
      "outputs": [
        {
          "internalType": "string",
          "name": "",
          "type": "string"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "totalSupply",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "transfer",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "transferFrom",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "target",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "transferUnderlyingTo",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "bytecode": {
    "object": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b612c6680620000f46000396000f3fe608060405234801561001057600080fd5b50600436106102325760003560e01c806357f1b83711610130578063acac18e4116100b8578063c35be0171161007c578063c35be01714610486578063d7020d0a1461048e578063dd62ed3e146104a1578063e8f7a1a5146104b4578063f9e2bf6b146104c757600080fd5b8063acac18e414610436578063ae16733514610449578063b16a19de1461045a578063b1bf962d1461046b578063bc1d19dd1461047357600080fd5b80637535d246116100ff5780637535d246146103ed5780637ccd3b46146103f557806395d89b4114610408578063a457c2d714610410578063a9059cbb1461042357600080fd5b806357f1b837146103a3578063679d0095146103b45780636b8465f8146103c757806370a08231146103da57600080fd5b80631da24f3e116101be57806336a722341161018257806336a722341461035c57806339509351146103645780633ba0b9a91461037757806347bec6f01461037f5780634efecaa51461039057600080fd5b80631da24f3e1461030657806323b872dd146103195780632d6aa1281461032c57806330c1e38b14610334578063313ce5671461034757600080fd5b806314ff75c91161020557806314ff75c9146102ae578063156e29f6146102b657806318160ddd146102c957806319ef9268146102d15780631d165564146102f157600080fd5b8063046016081461023757806306fdde031461024e578063095ea7b3146102635780630afbcdc914610286575b600080fd5b606a545b6040519081526020015b60405180910390f35b6102566104cf565b6040516102459190612654565b61027661027136600461269f565b610561565b6040519015158152602001610245565b6102996102943660046126cb565b61057b565b60408051928352602083019190915201610245565b606e5461023b565b6102766102c43660046126e8565b610593565b61023b610690565b6102d96107b3565b6040516001600160a01b039091168152602001610245565b6103046102ff36600461271d565b6107c2565b005b61023b6103143660046126cb565b610bcc565b610276610327366004612775565b610bd7565b606c5461023b565b6103046103423660046127b6565b610bfb565b60655460405160ff9091168152602001610245565b61023b610c68565b61027661037236600461269f565b610d66565b61023b610d88565b6066546001600160a01b03166102d9565b61023b61039e36600461269f565b610e92565b6068546001600160a01b03166102d9565b6103046103c23660046126e8565b610f08565b6103046103d536600461281b565b610f6f565b61023b6103e83660046126cb565b610fcb565b6102d96110dd565b61030461040336600461281b565b6110e7565b610256611143565b61027661041e36600461269f565b611152565b61027661043136600461269f565b6111cd565b61030461044436600461281b565b6111db565b6067546001600160a01b03166102d9565b6069546001600160a01b03166102d9565b61023b611237565b6103046104813660046126cb565b611242565b606b5461023b565b61030461049c366004612834565b6112bb565b61023b6104af36600461287a565b6113d8565b6103046104c23660046128a8565b611403565b606d5461023b565b6060603680546104de906128ca565b80601f016020809104026020016040519081016040528092919081815260200182805461050a906128ca565b80156105575780601f1061052c57610100808354040283529160200191610557565b820191906000526020600020905b81548152906001019060200180831161053a57829003601f168201915b5050505050905090565b60003361056f81858561146f565b60019150505b92915050565b60