Phantazm
  • Intro
    • What is Phantazm?
  • V2
    • TVL & Emission Sustainability
    • Two Token Model
    • Supplying assets into LPs
    • Staking Mechanism(Soon)
  • The Core Protocol
    • Protocol Overview
    • LendingPool
      • ILendingPool
    • Addresses Provider
      • ILendingPoolAddressesProvider
    • Addresses Provider Registry
      • ILendingPoolAddressesProviderRegistry
    • Protocol Data Provider
      • IProtocolDataProvider
    • aTokens (TBD)
      • IAToken
    • Debt Tokens
      • IStableDebtToken
      • IVariableDebtToken
    • Phantazm Token (TBD)
    • Price Oracle
      • IPriceOracle
  • Deployed Contracts
    • Main market (TBD)
  • Getting Started
    • SDKs
    • Subgraph data (GraphQL)
    • Gas Limits
  • Guides
    • APY and APR
    • Liquidity Mining
    • Flash Loans
      • IFlashLoanReceiver
    • Liquidations
    • Troubleshooting Errors
  • Security & Audits
  • Glossary
  • Socials
Powered by GitBook
On this page
  • Deployed Contracts
  • Methods
  • permit()
  • _nonces()
  • event SnapshotDone
  1. The Core Protocol

Phantazm Token (TBD)

PreviousIVariableDebtTokenNextPrice Oracle

Last updated 1 year ago

The Phantazm token is an ERC-20 compatible token with the addition of a snapshot feature (used in governance balance tracking) and integrates permit function, allowing gas-less transactions and one transaction approval/transfer.

This section will cover the technical aspects of the token.

The source code for the Phantazm token can be found on our Github

Deployed Contracts

Proxy Contracts
Address and ABIs

Phantazm Token

Methods

Besides the standard ERC20 token features (transfer(), balanceOf(), allowance(), etc), the following features are also available.

permit()

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

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.

Parameter
Type
Description

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

_nonces()

function _nonces(address owner) public

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

event SnapshotDone

event SnapshotDone(address owner, uint128 oldValue, uint128 newValue)

An event emitted on every transfer, mint (with a valid to address), and burn (with a valid from address).

The snapshots are used for governance balance tracking.

Parameter
Type
Description

owner

address

The owner of the Phantazm tokens

oldValue

uint128

The value before the operation was executed

newValue

uint128

The value after the operation was executed.

EIP 2612