bZx / iToken

iSAI - LoanToken

0x14094949152eddbfcd073717200da82fed8dc960
AdvancedTokenStorage
function

allowance

view

Inputs

ParameterTypeDescription
_owneraddress
_spenderaddress

Outputs

TypeDescription
uint256
     function allowance(
         address _owner,
         address _spender)
         public
         view
         returns (uint256)
     {
         return allowed[_owner][_spender];
     }
 
function

balanceOf

view

Inputs

ParameterTypeDescription
_owneraddress

Outputs

TypeDescription
uint256
     function balanceOf(
         address _owner)
         public
         view
         returns (uint256)
     {
         return balances[_owner];
     }
 
function

totalSupply

view

Inputs

(void)

Outputs

TypeDescription
uint256
     function totalSupply()
         public
         view
         returns (uint256)
     {
         return totalSupply_;
     }
 
event

Burn

Inputs

ParameterTypeDescription
burneraddress
tokenAmountuint256
assetAmountuint256
priceuint256

Outputs

(void)
     event Burn(
         address indexed burner,
         uint256 tokenAmount,
         uint256 assetAmount,
         uint256 price
     );
 
event

Mint

Inputs

ParameterTypeDescription
minteraddress
tokenAmountuint256
assetAmountuint256
priceuint256

Outputs

(void)
     event Mint(
         address indexed minter,
         uint256 tokenAmount,
         uint256 assetAmount,
         uint256 price
     );
 
event

Approval

Inputs

ParameterTypeDescription
owneraddress
spenderaddress
valueuint256

Outputs

(void)
     event Approval(
         address indexed owner,
         address indexed spender,
         uint256 value
     );
 
event

Transfer

Inputs

ParameterTypeDescription
fromaddress
toaddress
valueuint256

Outputs

(void)
     event Transfer(
         address indexed from,
         address indexed to,
         uint256 value
     );
 
LoanToken
function

setTarget

nonpayable
Restricted (onlyOwner)

Inputs

ParameterTypeDescription
_newTargetaddress

Outputs

(void)
     function setTarget(
         address _newTarget)
         public
         onlyOwner
     {
         _setTarget(_newTarget);
     }
 
fallback

(fallback)

payable

Inputs

(void)

Outputs

(void)
     function()
         external
         payable
     {
         address target = target_;
         bytes memory data = msg.data;
         assembly {
             let result := delegatecall(gas, target, add(data, 0x20), mload(data), 0, 0)
             let size := returndatasize
             let ptr := mload(0x40)
             returndatacopy(ptr, 0, size)
             switch result
             case 0 { revert(ptr, size) }
             default { return(ptr, size) }
         }
     }
 
LoanTokenStorage
event

Claim

Inputs

ParameterTypeDescription
claimantaddress
tokenAmountuint256
assetAmountuint256
remainingTokenAmountuint256
priceuint256

Outputs

(void)
     event Claim(
         address indexed claimant,
         uint256 tokenAmount,
         uint256 assetAmount,
         uint256 remainingTokenAmount,
         uint256 price
     );
 
event

Borrow

Inputs

ParameterTypeDescription
borroweraddress
borrowAmountuint256
interestRateuint256
collateralTokenAddressaddress
tradeTokenToFillAddressaddress
withdrawOnOpenbool

Outputs

(void)
     event Borrow(
         address indexed borrower,
         uint256 borrowAmount,
         uint256 interestRate,
         address collateralTokenAddress,
         address tradeTokenToFillAddress,
         bool withdrawOnOpen
     );
 
Ownable
function

transferOwnership

nonpayable
Restricted (onlyOwner)

Inputs

ParameterTypeDescription
_newOwneraddress

Outputs

(void)
   function transferOwnership(address _newOwner) public onlyOwner {
     _transferOwnership(_newOwner);
   }
 
constructor

LoanToken

nonpayable

Inputs

ParameterTypeDescription
_newTargetaddress

Outputs

(void)
   constructor() public {
     owner = msg.sender;
   }
 
event

OwnershipTransferred

Inputs

ParameterTypeDescription
previousOwneraddress
newOwneraddress

Outputs

(void)
   event OwnershipTransferred(
     address indexed previousOwner,
     address indexed newOwner
   );
 
function

loanOrderHashes

view

Inputs

ParameterTypeDescription
uint256

Outputs

TypeDescription
bytes32
     mapping (uint256 => bytes32) public loanOrderHashes; // mapping of levergeAmount to loanOrderHash
 
function

burntTokenReserveListIndex

view

Inputs

ParameterTypeDescription
address

Outputs

TypeDescription
uint256
bool
     mapping (address => ListIndex) public burntTokenReserveListIndex; // mapping of lender address to ListIndex objects
 
function

spreadMultiplier

view

Inputs

(void)

Outputs

TypeDescription
uint256
     uint256 public spreadMultiplier;
 
function

leverageList

view

Inputs

ParameterTypeDescription
uint256

Outputs

TypeDescription
uint256
     uint256[] public leverageList;
 
function

bZxContract

view

Inputs

(void)

Outputs

TypeDescription
address
     address public bZxContract;
 
function

bZxOracle

view

Inputs

(void)

Outputs

TypeDescription
address
     address public bZxOracle;
 
function

symbol

view

Inputs

(void)

Outputs

TypeDescription
string
     string public symbol;
 
function

owner

view

Inputs

(void)

Outputs

TypeDescription
address
   address public owner;
 
function

bZxVault

view

Inputs

(void)

Outputs

TypeDescription
address
     address public bZxVault;
 
function

loanTokenAddress

view

Inputs

(void)

Outputs

TypeDescription
address
     address public loanTokenAddress;
 
function

burntTokenReserveList

view

Inputs

ParameterTypeDescription
uint256

Outputs

TypeDescription
address
uint256
     TokenReserves[] public burntTokenReserveList; // array of TokenReserves
 
function

tokenizedRegistry

view

Inputs

(void)

Outputs

TypeDescription
address
     address public tokenizedRegistry;
 
function

wethContract

view

Inputs

(void)

Outputs

TypeDescription
address
     address public wethContract;
 
function

rateMultiplier

view

Inputs

(void)

Outputs

TypeDescription
uint256
     uint256 public rateMultiplier = 39000000000000000000; // 39%
 
function

decimals

view

Inputs

(void)

Outputs

TypeDescription
uint8
     uint8 public decimals;
 
function

loanOrderData

view

Inputs

ParameterTypeDescription
bytes32

Outputs

TypeDescription
bytes32
uint256
uint256
uint256
uint256
uint256
     mapping (bytes32 => LoanData) public loanOrderData; // mapping of loanOrderHash to LoanOrder
 
function

totalAssetBorrow

view

Inputs

(void)

Outputs

TypeDescription
uint256
     uint256 public totalAssetBorrow = 0; // current amount of loan token amount tied up in loans
 
function

baseRate

view

Inputs

(void)

Outputs

TypeDescription
uint256
     uint256 public baseRate = 1000000000000000000; // 1.0%
 
function

initialPrice

view

Inputs

(void)

Outputs

TypeDescription
uint256
     uint256 public initialPrice;
 
function

burntTokenReserved

view

Inputs

(void)

Outputs

TypeDescription
uint256
     uint256 public burntTokenReserved; // total outstanding burnt token amount
 
function

name

view

Inputs

(void)

Outputs

TypeDescription
string
     string public name;