PERI Finance2021
  • PERI Finance
  • PERI Finance
    • What is PERI Finance?
    • dApps
      • PERI Staking
      • PERI DEX
    • PERI Tokenomics
    • Token Contract Addresses
    • Token Contract Addresses(Testnet)
    • Guides
      • ETH-Polygon Bridge Guide
      • Staking dApp — 1. Setting/Stake-Mint
      • Staking dApp — 2. Burn
      • Staking dApp — 3. Reward
      • Staking dApp— 4. Earn(LP Reward)
      • PERI Token Swap Guide - Pancakeswap
      • PERI Finance LP Rewards Program
      • Details of APY — PERI Finance dApp
      • Pynths DEX Guide - Bridge
      • Pynths DEX Setting — Exchange
      • Pynths DEX Guide - Assets
      • Pynths DEX Guide (Testnet)
      • Guide(Testnet)
        • Pynths DEX Setting(Testnet) — Add Moonbase Alpha Testnet
        • Pynths DEX Setting(Testnet) — Get Testnet PERI Tokens on Moonbase Alpha
        • Pynths DEX Setting(Testnet) — Get DEV tokens from Moonbase community
    • Security & Audits
    • FAQs
  • Development Resources
    • Protocol
      • VALUE RECEPIENTS
      • PERI STAKING REWARDS
      • PROTOCOL CORE EQUATIONS
    • Deployed Contract
      • MAINNET
        • ETHEREUM MAINNET
        • BSC MAINNET
        • POLYGON MAINNET
      • TESTNET
        • ETHEREUM KOVAN TESTNET
        • POLYGON TESTNET
        • BSC TESTNET
    • Protocol Integrations
      • INTEGRATED PROJECT
      • PERI FINANCE HISTORICAL DATA
      • PERI FINANCE STAKING
        • STAKING PERI
    • Smart Contract Architecture
    • Deployment Procedure
    • Common Transactions
    • Source Code Description
      • SOLIDITY CONTRACT
        • AddressResolver
        • BaseDebtCache
        • BasePeriFinance
        • BaseRewardEscrowV2
        • BinaryOption
        • BinaryOptionMarket
        • BinaryOptionMarketData
        • BinaryOptionMarketFactory
        • BinaryOptionMarketManager
        • BlacklistManager
        • BridgeState
        • Collateral
        • CollateralErc20
        • CollateralEth
        • CollateralManager
        • CollateralManagerState
        • CollateralShort
        • CollateralState
        • ContractStorage
        • DappMaintenance
        • DebtCache
        • DelegateApprovals
        • Depot
        • EmptyCollateralManager
        • EmptyEtherCollateral
        • EscrowChecker
        • EternalStorage
        • EtherCollateral
        • EtherCollateralpUSD
        • ExchangeRates
        • ExchangeRatesWithoutInvPricing
        • ExchangeState
        • Exchanger
        • ExchangerWithVirtualPynth
        • ExternStateToken
        • ExternalRateAggregator
        • ExternalTokenStakeManager
        • FeePool
        • FeePoolEternalStorage
        • FeePoolState
        • FlexibleStorage
        • ImportableRewardEscrowV2
        • Issuer
        • IssuerWithoutLiquidations
        • LimitedSetup
        • Liquidations
        • Math
        • MintablePeriFinance
        • MixinResolver
        • MixinSystemSettings
        • MultiCollateralPynth
        • Owned
        • Pausable
        • PeriFinance
        • PeriFinanceBridgeToBase
        • PeriFinanceBridgeToOptimism
        • PeriFinanceEscrow
        • PeriFinanceState
        • PeriFinanceStateWithLimitedSetup
        • PeriFinanceToBSC
        • PeriFinanceToEthereum
        • PeriFinanceToPolygon
        • Proxy
        • ProxyERC20
        • Proxyable
        • PurgeablePynth
        • Pynth
        • PynthUtil
        • ReadProxy
        • RealtimeDebtCache
        • RewardEscrow
        • RewardEscrowV2
        • RewardsDistribution
        • RewardsDistributionRecipient
        • SafeDecimalMath
        • ShortingRewards
        • StakingRewards
        • StakingState
        • StakingStateUSDC
        • State
        • SupplySchedule
        • SystemSettings
        • SystemStatus
        • TokenState
        • TradingRewards
        • VirtualPynth
      • SOLIDITY INTERFACES
        • IAddressResolver
        • IBinaryOption
        • IBinaryOptionMarket
        • IBinaryOptionMarketManager
        • IBridgeState
        • ICollateralErc20
        • ICollateralEth
        • ICollateralLoan
        • ICollateralManager
        • IDebtCache
        • IDelegateApprovals
        • IDepot
        • IERC20
        • IEtherCollateral
        • IEtherCollateralpUSD
        • IExchangeRates
        • IExchangeState
        • IExchanger
        • IExternalTokenStakeManager
        • IFeePool
        • IFlexibleStorage
        • IHasBalance
        • IIssuer
        • ILiquidations
        • IPeriFinance
        • IPeriFinanceBridgeToBase
        • IPeriFinanceBridgeToOptimism
        • IPeriFinanceState
        • IPynth
        • IRewardEscrow
        • IRewardEscrowV2
        • IRewardsDistribution
        • IShortingRewards
        • IStakingRewards
        • IStakingState
        • IStakingStateUSDC
        • ISupplySchedule
        • ISystemSettings
        • ISystemStatus
        • ITradingRewards
        • IVirtualPynth
      • SOLIDITY LIBRARIES
        • AddressSetLib
        • Bytes32SetLib
        • Math
        • SafeDecimalMath
        • SafeMath
  • Resources
    • Whitepaper
      • English
    • Media Kit
      • Logo with Texts
      • Logo Only
      • Text Only
      • .ai files
      • .svg files
Powered by GitBook
On this page
  • Staking (Minting/Issuing) pUSD
  • Unstaking (Burning) pUSD
  • Claiming Fees
  • Trading (Exchanging) pynths
  1. Development Resources

Common Transactions

This is a list of the most common user-facing transactions possible in the PERI Finance ecosystem, and the events they emit on success.

Staking (Minting/Issuing) pUSD

Called contract: ProxyERC20

Target (underlying) contract: PeriFinance

Methods:

  • issuePynths(uint256 amount)

  • issuePynthsOnBehalf(address user, uint256)

  • issueMaxPynths()

  • issueMaxPynthsOnBehalf(address user)

Events Emitted:

On a successful transaction, the following events occur:

  1. Transfer from 0x0 to account for amount emitted on ProxypUSD

  2. Issued amount to account emitted on ProxypUSD

  3. IssuanceDebtRatioEntry emitted on ProxyFeePool

Unstaking (Burning) pUSD

More info

Check out our unstaking walkthru for more information

Called contract: ProxyERC20

Target (underlying) contract: PeriFinance

Methods:

  • burnPynths(uint256 amount)

  • burnPynthsOnBehalf(address user, uint256 amount)

  • burnPynthsToTarget()

  • burnPynthsToTargetOnBehalf(address user)

Events Emitted:

On a successful transaction, the following events occur:

  1. Transfer from account to 0x0 for amount emitted on ProxypUSD

  2. Burned amount from account emitted on ProxypUSD

  3. IssuanceDebtRatioEntry emitted on ProxyFeePool

Claiming Fees

Check out our claiming walkthrough for more information

Called contract: ProxyFeePool

Target (underlying) contract: FeePool

Methods:

  • claimFees()

  • claimOnBehalf(address user)

Events Emitted:

On a successful transaction, the following events occur:

  1. Transfer from FEE_ADDRESS to 0x0 for amount emitted on ProxypUSD

  2. Burned amount from FEE_ADDRESS emitted on ProxypUSD

  3. Transfer from 0x0 to account for amount emitted on ProxypUSD

  4. Issued amount to account emitted on ProxypUSD

  5. VestingEntryCreated emitted on RewardEscrow

  6. FeesClaimed emitted on ProxyFeePool

Trading (Exchanging) pynths

Check out our trading walkthrough for more information

Called contract: ProxyERC20

Target (underlying) contract: PeriFinance

Methods:

  • exchange(bytes32 src, uint256 fromAmount, bytes32 dest)

  • exchangeOnBehalf(address user, bytes32 src, uint256 fromAmount, bytes32 dest)

Events Emitted:

On a successful transaction, the following events occur:

Fee Reclamation

If fees are owing on the src pynth, these events come first:

  1. Transfer from account to 0x0 for feesOwing emitted on Proxy<pynth> for the src pynth.

  2. Burned feesOwing from account emitted on Proxy<pynth> for the src pynth.

  3. ExchangeReclaim from account for feesOwing on src synth emitted on ProxySynthetix

Else if fees are owed on the src pynth, then these events come first:

  1. Transfer from 0x0 to account for feesOwed emitted on Proxy<pynth> for the src pynth.

  2. Issued feesOwed to account emitted on Proxy<synth> for the src synth.

  3. ExchangeRebate from account for feesOwed on src pynth emitted on ProxySynthetix

For every exchange, the following events then occur:

  1. Transfer from account to 0x0 for fromAmount emitted on Proxy<pynth> for the src pynth.

  2. Burned fromAmount from account emitted on Proxy<pynth> for the src pynth.

  3. Transfer from 0x0 to account for toAmount - fee emitted on on Proxy<pynth> for the dest pynth.

  4. Issued toAmount - fee to account emitted on Proxy<pynth> for the dest pynth.

  5. Transfer from 0x0 to FEE_ADDRESS for fee emitted on ProxypUSD

  6. Issued amount to FEE_ADDRESS emitted on ProxypUSD

  7. PynthExchange for account emitted on ProxySynthetix

PreviousDeployment ProcedureNextSource Code Description

Last updated 3 years ago