👨💻Integrations
Last updated
Last updated
Auto-compounders give small token holders the same compounding advantages as big token holders. Auto-compounders are more effective when they hold more deposits. For this reason, YY Strategies are designed to be primitives that any project can easily integrate.
Compounding BAG: https://cchain.explorer.avax.network/address/0xf487044eD85F2d47A8eAD6b86c834976B8c31736/read-contract
User balances are accounted with Yak Receipt Tokens (YRT). The number of shares corresponds to ownership of each pool's underlying assets.
User balance of BAG = YRT shares * (total BAG / total shares)
Each strategy allows users to deposit and withdraw. The simplest implementation may use only two functions:
There is no need for integrations to manage reinvest()
functionality, as the YY community “just handles” it.
Used for official listings and admin: yakcontributors@proton.me
For dev-related inquiries, visit the Yak Devs Telegram group: https://t.me/yakdevs
View Function
Description
balanceOf(address)
Amount of shares a user owns (number does not go up)
getDepositTokensForShares(uint256)
Conversion rate for a given amount of shares (number goes up over time)
Write Function
Description
deposit(uint256)
Deposit deposit tokens
withdraw(uint256)
Redeem shares to withdraw deposit tokens