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.
- 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
PendingDepositaccount to track claim to fTokens after epoch ends, or mints fTokens immediately if between epochs.
- if pending deposit, increments
Round.underlying_from_pending_depositsby deposit amount.
- 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
- cancels a pending deposit
- if the epoch during which the deposit was initiated has ended, transaction fails.
- user receives deposit tokens back.
- Same as Deposit but cancels or claims existing pending deposit first to prevent early reversion of transaction.
- 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
PendingWithdrawalaccount 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_withdrawalsby number of fTokens burned.
- 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
- cancels a pending withdrawal
- if the epoch during which the withdrawal was initiated has ended, transaction fails.
- volt mints fTokens tokens back to user.
- Same as Withdraw but cancels or claims existing pending withdrawal first to prevent early reversion of transaction.
- change % of performance and withdrawal fee
- change parameters of auctions run by this volt
- adjust global and individual capacity limits
- Transfer admin power over the volt to a different public key
- 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
- Withdraws assets from the lending protocol.
- 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.