Friktion
Search…
Instructions
All volts supported by Friktion share instructions to facilitate shared user actions (e.g deposits, withdrawals, claims, referrals), change fees/capacities, and a few other things.
​

User Facing Instructions

  • Deposit
    • if a pending deposit exists for the current epoch or hasn't been claimed from previous epoch, revert transaction
    • if the user doesn't have enough tokens in wallet, revert transaction
    • user gives deposit tokens to volt
    • volt creates PendingDeposit account to track claim to fTokens after epoch ends, or mints fTokens immediately if between epochs.
    • if pending deposit, increments Round.underlying_from_pending_deposits by deposit amount.
  • ClaimPendingDeposit
    • claims a pending deposit after the epoch it was created during ends and the next epoch begins.
    • user receives fToken proportional to deposit and volt's total collateral
  • CancelPendingDeposit
    • cancels a pending deposit
    • if the epoch during which the deposit was initiated has ended, transaction fails.
    • user receives deposit tokens back.
  • DepositWithClaim
    • Same as Deposit but cancels or claims existing pending deposit first to prevent early reversion of transaction.
  • Withdraw
    • if a pending withdrawal exists for the current epoch or hasn't been claimed from previous epoch, revert transaction
    • if the user doesn't have enough fTokens in wallet, revert transaction
    • user burns fTokens
    • volt creates PendingWithdrawal account to track claim to deposit tokens after epoch ends, or transfers tokens to user immediately immediately if between epochs.
    • if pending withdrawal, increments Round.volt_tokens_from_pending_withdrawals by number of fTokens burned.
  • ClaimPendingWithdrawal
    • claims a pending withdrawal after the epoch it was created during ends and the next epoch begins.
    • user receives deposit tokens proportional to number of fTokens burned and volt's total collateral
  • CancelPendingWithdrawal
    • cancels a pending withdrawal
    • if the epoch during which the withdrawal was initiated has ended, transaction fails.
    • volt mints fTokens tokens back to user.
  • WithdrawWithClaim
    • Same as Withdraw but cancels or claims existing pending withdrawal first to prevent early reversion of transaction.

Parameter Change Instruction (Admin)

  • ChangeFees
    • change % of performance and withdrawal fee
  • ChangeAuctionParams
    • change parameters of auctions run by this volt
  • ChangeCapacity
    • adjust global and individual capacity limits
  • ChangeAdmin
    • Transfer admin power over the volt to a different public key

Miscellaneous Instructions (Admin)

  • MoveAssetsToLendingAccount
    • Sends volt assets to a safe lending protocol to earn yield. This is a backup option in case there are problems with the primary strategy of a volt
  • WithdrawAssetsFromLendingAccount
    • Withdraws assets from the lending protocol.
  • TurnOffOrOnDepositsAndWithdrawals
    • If turned off, causes all deposits and withdrawals (including claim/cancel) to fail until reenabled. Designed for a panic scenario.
  • Take Pending Withdrawal Fees
    • Called at end of epoch immediately before withdrawals are released.
    • sends (withdrawal fee) * (total pending withdrawal amount) tokens to the DAO fee account.
​
​
​
​