-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Add USP TVL calculation for Ethereum (#1) #16907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The adapter at projects/piku-dao exports TVL: |
|
|
||
| async function tvl(api) { | ||
| // Get USP total supply and oracle price in parallel | ||
| const [totalSupply, decimals, pricePerToken] = await Promise.all([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible for us to count underlying asset deposits rather than receipt token total supply?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! We use a dynamic mint and redeem mechanism for USP, which is why using the total supply is accurate in this case.
You can verify this on Etherscan (writeProxyContract - buy function)
— specifically the buy (0xd6febde8) function.
Here are example transactions for reference:
• Mint: 0x7defc233f2f62780664446503b3f58786714e5dbbb785be16ab94b4c3e4abaea
• Redeem: 0x0220adc3e42cb0ab2ab1f1a9047b0d2c1f2ea6e46d4f922ea9a804891ac5ec7c#eventlog
If that’s not convincing enough, I can walk you through the contract architecture in more detail.
|
Also here is the stablewatch article they wrote for USP and PikuDAO |
NOTE
Please enable "Allow edits by maintainers" while putting up the PR.
package-lock.jsonfile as part of your changes, we use lockfileVersion 2, and most use v1 and using that messes up our CIName (to be shown on DefiLlama): Piku
Twitter Link: https://x.com/piku_dao
List of audit links if any:
We have four audits in total:
Omega Security – July 2025
Scope: Token, Oracle, Funding, and Payment Processor Upgrades
Report: Google Drive link
0xMacro – April 15 – May 24, 2024
Scope: Full modular contract suite — governance, staking, bonding curve, rewards, payments
Report: GitHub PDF
Hats Finance – June 2024
Scope: Full Inverter V1 contract suite powering Piku
Report: GitHub Report
Audit33 (33Audits & Co.) – May 2025
Scope: Oracle-integrated Funding Manager & queue-based payment logic
Report: PDF link
For further and detailed information please visit : https://docs.piku.co/piku/piku/security-and-risks/audits
Website Link: https://piku.co/
Logo (High resolution, will be shown with rounded borders):
https://continuous-steed-202.notion.site/Piku-Logo-29d1e6685f3d80a19985db11a47d1782?source=copy_link
Current TVL:$4,955,712 = 4.95M$
Treasury Addresses (if the protocol has treasury)
We have one treasury, one hot and one cold wallets.
Piku Backing Hot Wallet: 0xb7f15d1122c0F91eE77C1172B9EFa4C061952E3C
Piku Backing Cold Wallet: 0x16c4150e22c53eCE02bB70763625DD3d61f1E7E9
Piku Treasury Wallet: 0x32a605E91Ecc3ab972697E58712f6c9c37cabC1D
Also, here are the trackable links of the dedicated wallets’ on different chains. https://docs.piku.co/piku/piku-platform/treasury-wallet-addresses
Chain:
For now, chain is Ethereum. Soon will be multichain on Plasma, Base and more.
Coingecko ID (so your TVL can appear on Coingecko, leave empty if not listed): (https://api.coingecko.com/api/v3/coins/list)
{"id":"piku-utility-token","symbol":"piku","name":"Piku Utility Token"}
{"id":"staked-piku","symbol":"spiku","name":"Staked PIKU"}
Coinmarketcap ID (so your TVL can appear on Coinmarketcap, leave empty if not listed):
(https://api.coinmarketcap.com/data-api/v3/map/all?listing_status=active,inactive,untracked&start=1&limit=10000)
Short Description (to be shown on DefiLlama):
The USP token is classified as a yield-optimized stablecoin that uniquely combines the stability of a traditional stablecoin with the growth potential of yield-generating assets. Governed by PikuDAO, USP is initially fully backed by USD Stables at 1:1 ratio, ensuring a stable launch value of $1.00 USD. PikuDAO then diversifies and enhances this backing with a carefully selected basket of on-chain and off-chain assets that generate yield.
As these additional assets contribute yield, they inherently increase the underlying value of USP, increasing its value beyond the initial peg while reflecting the generated yield directly within the token's value. USP is a savings tool with a simple access.
Token address and ticker if any:
Contract Address: 0x098697bA3Fee4eA76294C5d6A466a4e3b3E95FE6
Ticker: USP
Category (full list at https://defillama.com/categories) *Please choose only one:
Yield
Oracle Provider(s): Specify the oracle(s) used (e.g., Chainlink, Band, API3, TWAP, etc.):
Source: Price Oracle for USP
Contract Address: 0x433471901bA1A8BDE764E8421790C7D9bAB33552
Description
The Oracle Logic Module fetches approved on-chain price feeds for both the yield optimized stablecoin and the accounting asset, normalizes them to USDC (6 decimals), and exposes the current exchange rates through:
getPriceForIssuance()
getPriceForRedemption()
These rates form the basis for all minting, redemption, and yield calculations in the protocol.
Implementation Details: Briefly describe how the oracle is integrated into your project:
Each morning at 11.00 am GMT+3 our finance team calculate the latest USP price and finalized through internal data processes. Once the daily price is verified, it is submitted to the blockchain through the Piku Backoffice interface by invoking the following oracle update functions:
setPriceForIssuance()
setPriceForRedemption()
The transaction is executed via the Fireblocks-controlled multisig wallet, ensuring full custody security and auditability. This mechanism guarantees that the on-chain price feed remains synchronized with verified off-chain market data, forming the reference point for all minting, redemption, and yield distribution operations within the protocol.
Documentation/Proof: Provide links to documentation or any other resources that verify the oracle's usage:
https://docs.piku.co/piku/piku/minting-and-redemption/how-to-get-usp-price
forkedFrom (Does your project originate from another project):
No.
methodology (what is being counted as tvl, how is tvl being calculated):
TVL is calculated by multiplying the current issuance price as returned by the oracle via getPriceForIssuance() with the total circulating supply of the USP token retrieved from the token contract.
TVL=Issuance Price×Total Supply of USP
This approach ensures that the reported TVL accurately reflects the real-time value of all minted assets within the system, normalized to USD, and automatically adjusts with any changes in price or supply on-chain.
Github org/user (Optional, if your code is open source, we can track activity):
https://github.com/piku-co