# Write Functions

- [Transaction Prerequisites](/developer-guides/write-functions/transaction-prerequisites.md): Before interacting with a blockchain smart contract, you need approval
- [approve() / allowance()](/developer-guides/write-functions/transaction-prerequisites/approve-allowance.md): Give permission for a contract to access your wallet
- [Trading](/developer-guides/write-functions/trading.md): 2 function that enable trade flexibility
- [tradeBySourceAmount()](/developer-guides/write-functions/trading/trading-with-bancor.md): Trade an exact amount of source tokens for as many target tokens as possible
- [tradeByTargetAmount()](/developer-guides/write-functions/trading/tradebytargetamount.md): Trade target tokens for the least amount of source tokens possible
- [Trading Troubleshooting](/developer-guides/write-functions/trading/trading-troubleshooting.md): Common errors for trading on Bancor v3
- [Adding Liquidity](/developer-guides/write-functions/adding-liquidity.md): Provide liquidity with only one asset
- [deposit()](/developer-guides/write-functions/adding-liquidity/deposit.md): Deposit tokens for ownership in a liquidity pool
- [depositFor()](/developer-guides/write-functions/adding-liquidity/depositfor.md): Deposit tokens on behalf of a different address
- [Deposit Troubleshooting](/developer-guides/write-functions/adding-liquidity/deposit-troubleshooting.md): Common errors for adding liquidity in Bancor v3
- [depositAndJoin()](/developer-guides/write-functions/adding-liquidity/depositandjoin.md): This function is in the StandardRewards.sol contract.
- [Removing Liquidity](/developer-guides/write-functions/removing-liquidity.md): Initiating withdrawal and the withdrawal process
- [Initiating Cooldown](/developer-guides/write-functions/removing-liquidity/initiating-cooldown.md): Stake pool tokens in withdrawal contracts with Bancor
- [initWithdrawal()](/developer-guides/write-functions/removing-liquidity/initiating-cooldown/initwithdrawal.md): Functions on the PendingWithdrawals contract
- [withdraw()](/developer-guides/write-functions/removing-liquidity/withdraw.md): Withdrawing funds
- [cancelWithdrawal()](/developer-guides/write-functions/removing-liquidity/cancelwithdrawal.md): This function is in the BancorNetwork.sol contract
- [Withdraw Troubleshooting](/developer-guides/write-functions/removing-liquidity/withdraw-troubleshooting.md): Common errors for removing liquidity in Bancor v3
- [Flashloan](/developer-guides/write-functions/flashloan.md): In a single block, borrow capital and return it with an additional fee
- [flashLoan()](/developer-guides/write-functions/flashloan/flashloan.md): Borrow an indicated amount from the liquidity pool
- [Flashloan Troubleshooting](/developer-guides/write-functions/flashloan/flashloan-troubleshooting.md): Common errors for flash loans in Bancor v3
- [Migrating Liquidity to v3](/developer-guides/write-functions/migrating-liquidity-to-v3.md)
- [Migrating Bancor positions to v3](/developer-guides/write-functions/migrating-liquidity-to-v3/migrating-bancor-positions-to-v3.md): Enable the migration of user liquidity
- [migratePositions()](/developer-guides/write-functions/migrating-liquidity-to-v3/migrating-bancor-positions-to-v3/migratepositions.md): Migrate Bancor v2.1 pool tokens to Bancor v3
- [migratePoolTokens()](/developer-guides/write-functions/migrating-liquidity-to-v3/migrating-bancor-positions-to-v3/migratepooltokens.md): Migrate Bancor v1 pool tokens to Bancor v3
- [Errors and Troubleshooting](/developer-guides/write-functions/migrating-liquidity-to-v3/migrating-bancor-positions-to-v3/errors-and-troubleshooting.md): Common errors for migrating Bancor positions from previous versions
- [Migrating from Uniswap v2](/developer-guides/write-functions/migrating-liquidity-to-v3/migrating-from-uniswap-v2.md)
- [migrateUniswapV2Position()](/developer-guides/write-functions/migrating-liquidity-to-v3/migrating-from-uniswap-v2/migrateuniswapv2position.md): Common errors for migrating Uniswap v2 positions to Bancor v3
- [Migrating from Sushiswap](/developer-guides/write-functions/migrating-liquidity-to-v3/migrating-from-sushiswap.md)
- [migrateSushiSwapV1Position()](/developer-guides/write-functions/migrating-liquidity-to-v3/migrating-from-sushiswap/migratesushiswapv1position.md): Common errors for migrating SushiSwap positions to Bancor v3
- [Rewards](/developer-guides/write-functions/rewards.md)
- [join()](/developer-guides/write-functions/rewards/join.md): This function is in the StandardRewards.sol contract.
- [stakeRewards()](/developer-guides/write-functions/rewards/stakerewards.md): This function is in the StandardRewards.sol contract.
- [autoProcessRewards()](/developer-guides/write-functions/rewards/autoprocessrewards.md): This function is in the AutoCompoundingRewards.sol contract.
- [claimRewards()](/developer-guides/write-functions/rewards/claimrewards.md): This function is in the StandardRewards.sol contract.
- [leave()](/developer-guides/write-functions/rewards/leave.md): This function is in the StandardRewards.sol contract.
- [Surplus migration](/developer-guides/write-functions/surplus-migration.md)
- [withdrawPOL()](/developer-guides/write-functions/surplus-migration/withdrawpol.md)
- [Network Fees](/developer-guides/write-functions/network-fees.md)
- [burnNetworkFees()](/developer-guides/write-functions/network-fees/burnnetworkfees.md)
