Composing financial instruments with APYSwap
In this article, we will take a detailed look at the delegation procedure within the APYSwap. APYSwap has implemented a delegation function to increase the composability of users’ assets. Users are able to create and control vaults on their native blockchain and transfer vault’s ownership to the third parties. This enables them to enjoy various DeFi services without sacrificing the ownership of their assets. Now, let’s dive into the inner workings of the delegation procedure.
Working with Delegates
Delegate is an address that you own but its ownership can be transferred from one user to another. Transfer can be full or partial and it is a completely trustless system. To transfer the ownership, visit APYSwap’s website and select the desired chain. Connect your wallet and enter your APYMask (our version of MetaMask) password to unlock the delegates.
You will be transferred to the delegates management menu.
A new delegate can be created by simply pressing the “Create delegate” button. Notification will pop up, asking you to pay the required fee. After confirming it, a new delegate will be added to the list with an empty balance.
You can top the new delegate’s balance by copying its address directly to clipboard and sending tokens via the APYMask’s prompt. As soon as they are transferred, they will be displayed in the delegates menu.
Working with DeFi services
Now we will explain how ApyMask can be used to interact with DeFi services, by using PancakeSwap as an example. Select the delegate of your choice in APYMask. Your current balance will change accordingly, depending on which delegate you have chosen.
Go to PancakeSwap’s Pool. Here you can create a new transaction by pressing the “Approve CAKE” and confirming it. The owner will sign the transaction, however the delegate will be the one used to transfer it. After the confirmation, transaction will be recognized by the service.
You can stake your delegate assets by clicking the “plus” icon and selecting the amount you wish to deposit. Your assets will be displayed in the pool. Press the “Unstake CAKE” and confirm it to unstake the assets.
If you are interested in transaction’s details, you can view it on BscScan. A link to BscScan is imbedded in your wallet.
All transactions are from the owner to the Delegate, which calls smart contract on the owner’s behalf.
Ownership transfer and withdrawal of assets
Asset’s ownership can be relinquished at any time by selecting the specific Delegate and paying an appropriate amount of fee.
As soon as the ownership is relinquished, the interface will change, displaying your current share of the asset. However, you will not be able to withdraw it, unless your share is locked. Instead, you can transfer its ownership by selecting the appropriate button. Type in the recipient’s address as well as the size of the share you wish to transfer. Press “send” and the ownership transfer will be complete.
You will notice that the share percentages have changed. Lock in your ownership to withdraw the assets. You cannot select the specific amount; the entire sum will be withdrawn, should you choose it.
Assets can only be withdrawn once and any further withdrawal attempts will result in a failure.
It is important to note that users are able to shop for delegates at the APYSwap Marketplace. They can trade the shares of APYSwap Vaults, rather than selling the constituent assets within them. This enables the trading of the locked assets, thus bringing liquidity to the previously illiquid assets without suffering the penalties tied to the lock-up periods. Lastly, portfolio managers can use it to their advantage by leveraging the lending protocol, creating a dividends-generating DeFi index funds. This wraps up our explanation of the delegation procedure. If you are interested to learn more, please check our in-depth video, where we guide you through the entire process.