Skip to content

Conversation

@uwezukwechibuzor
Copy link

NOTE

Please enable "Allow edits by maintainers" while putting up the PR.


  • If you would like to add a tvl adapter please submit the PR here.
  1. Once your adapter has been merged, it takes time to show on the UI. If more than 24 hours have passed, please let us know in Discord.
  2. Please fill the form below only if the PR is for listing a new protocol else it can be ignored/replaced with reason/details about the PR
  3. For updating listing info It is a different repo, you can find your listing in this file: https://github.com/DefiLlama/defillama-server/blob/master/defi/src/protocols/data4.ts, you can edit it there and put up a PR
  4. Do not edit/push package.json/package-lock.json file as part of your changes
  5. No need to go to our discord/other channel and announce that you've created a PR, we monitor all PRs and will review it asap

Name (to be shown on DefiLlama):
Twitter Link:
List of audit links if any:
Website Link:
Logo (High resolution, will be shown with rounded borders):
Current TVL:
Treasury Addresses (if the protocol has treasury)
Chain:
Coingecko ID (so your TVL can appear on Coingecko, leave empty if not listed): (https://api.coingecko.com/api/v3/coins/list)
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):
Token address and ticker if any:
Category (full list at https://defillama.com/categories) *Please choose only one:
Oracle Provider(s): Specify the oracle(s) used (e.g., Chainlink, Band, API3, TWAP, etc.):
Implementation Details: Briefly describe how the oracle is integrated into your project:
Documentation/Proof: Provide links to documentation or any other resources that verify the oracle's usage:
forkedFrom (Does your project originate from another project):
methodology (what is being counted as tvl, how is tvl being calculated):
Github org/user (Optional, if your code is open source, we can track activity):

@llamabutler
Copy link

The shmonad adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts fees shmonad

🦙 Running SHMONAD adapter 🦙
---------------------------------------------------
Start Date:	Sun, 30 Nov 2025 12:14:00 GMT
End Date:	Mon, 01 Dec 2025 12:14:00 GMT
---------------------------------------------------

MONAD 👇
Backfill start time: 1/11/2024
Daily fees: 1.78 k
Daily revenue: 1.78 k
Daily protocol revenue: 89.00
Daily supply side revenue: 1.69 k
Daily holders revenue: 1.69 k
End timestamp: 1764591239 (2025-12-01T12:13:59.000Z)

@treeoflife2 treeoflife2 self-assigned this Dec 2, 2025
@noateden noateden assigned noateden and unassigned treeoflife2 Dec 2, 2025
* @return totalZeroYieldPayable The MON amount earmarked for zero-yield obligations (e.g., commission accruals).
* https://github.com/FastLane-Labs/fastlane-contracts/blob/485e9305b251089b94f62ef22b7ab9a74e0d32c3/src/shmonad/Storage.sol#L157
*/
const globalLiabilitiesAbi = "function globalLiabilities() view returns (uint128 rewardsPayable, uint128 redemptionsPayable, uint128 totalZeroYieldPayable)";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would wrap all abi variables inside a single variable like ABIS = { getAtomicCapitalAbi, ... }, it makes codes easier to read

const getAtomicCapitalAbi = "function getAtomicCapital() view returns (uint256 allocated, uint256 distributed)";
const getCurrentAssetsAbi = "function getCurrentAssets() view returns (uint256)";
const getWorkingCapitalAbi = "function getWorkingCapital() view returns (uint256 staked, uint256 reserved)";
const totalSupplyAbi = "function totalSupply() view returns (uint256)";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let you know we support simple form of abi for function like totalSupply
Instead of function totalSupply() view returns (uint256)
you can use uint256:totalSupply

atomicCapital.allocated +
currentAssets;

const totalLiabilities =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to calculate this? Because I can see we can get Liabilities from atomicCapital, something like this:
https://github.com/DefiLlama/DefiLlama-Adapters/blob/main/projects/shmonad/index.js#L27

return totalAssets - totalLiabilities;
}

const getFetch = () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't do this, except when you need to pass parameters to getFetch function. I would use simple function

const fetch = async (options: FetchOptions) => {
   // code logics
}

const dailyProtocolRevenue = options.createBalances();
const dailySupplySideRevenue = options.createBalances();

try {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need try catch here, you should throw Error when failed to read contract

options.fromApi.call({ target: SHMONAD_CONTRACT, abi: getWorkingCapitalAbi }),
options.fromApi.call({ target: SHMONAD_CONTRACT, abi: getAtomicCapitalAbi }),
options.fromApi.call({ target: SHMONAD_CONTRACT, abi: getCurrentAssetsAbi }),
options.fromApi.call({ target: SHMONAD_CONTRACT, abi: globalLiabilitiesAbi }),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check this codes, you can reduce the globalLiabilitiesAbi contract call
https://github.com/DefiLlama/DefiLlama-Adapters/blob/main/projects/shmonad/index.js#L27


// CONVERT TO BIGINT
// Helper function to safely convert contract return objects to BigInt structure.
const toBigInt = (obj: any) => ({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need to do this, because sdk return data in BigInt already

Copy link
Contributor

@noateden noateden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you check the contract again? I believe it was an ERC 4626 vault, so you can get the exchange rate before/after by using 2 api calls only

if (totalRewards > 0n) {
dailyFees.addGasToken(totalRewards);

// Protocol revenue = 5%
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does shmond distribute rewards to stakers pre or post protocol revenue cut?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does shmond distribute rewards to stakers pre or post protocol revenue cut?

shmond distribute rewards to stakers post protocol revenue cut

@uwezukwechibuzor
Copy link
Author

Thanks for the detailed review @noateden — noted on all points.
I’ll update the PR accordingly

@llamabutler
Copy link

The shmonad adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts fees shmonad

🦙 Running SHMONAD adapter 🦙
---------------------------------------------------
Start Date:	Tue, 02 Dec 2025 01:27:09 GMT
End Date:	Wed, 03 Dec 2025 01:27:09 GMT
---------------------------------------------------

MONAD 👇
Backfill start time: 1/11/2024
Daily fees: 4.19 k
Daily revenue: 210.00
Daily protocol revenue: 210.00
Daily supply side revenue: 3.98 k
Daily holders revenue: 3.98 k
End timestamp: 1764725228 (2025-12-03T01:27:08.000Z)

@uwezukwechibuzor
Copy link
Author

can you check the contract again? I believe it was an ERC 4626 vault, so you can get the exchange rate before/after by using 2 api calls only

The contract is indeed an ERC 4626 vault. Thanks for the clarification!

dailyRevenue: dailyProtocolRevenue,
dailyProtocolRevenue,
dailySupplySideRevenue,
dailyHoldersRevenue: dailySupplySideRevenue,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this project doesn't has a token, we don't count rewards to LST as holders revenue

@llamabutler
Copy link

The shmonad adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts fees shmonad

🦙 Running SHMONAD adapter 🦙
---------------------------------------------------
Start Date:	Tue, 02 Dec 2025 10:01:25 GMT
End Date:	Wed, 03 Dec 2025 10:01:25 GMT
---------------------------------------------------

MONAD 👇
Backfill start time: 1/11/2024
Daily fees: 6.50 k
Daily revenue: 325.00
Daily protocol revenue: 325.00
Daily supply side revenue: 6.17 k
End timestamp: 1764756084 (2025-12-03T10:01:24.000Z)

@llamabutler
Copy link

The shmonad adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts fees shmonad

🦙 Running SHMONAD adapter 🦙
---------------------------------------------------
Start Date:	Tue, 02 Dec 2025 10:08:27 GMT
End Date:	Wed, 03 Dec 2025 10:08:27 GMT
---------------------------------------------------

MONAD 👇
Backfill start time: 1/11/2024
Daily fees: 6.54 k
Daily revenue: 327.00
Daily protocol revenue: 327.00
Daily supply side revenue: 6.21 k
End timestamp: 1764756506 (2025-12-03T10:08:26.000Z)

@llamabutler
Copy link

The shmonad adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts fees shmonad

🦙 Running SHMONAD adapter 🦙
---------------------------------------------------
Start Date:	Tue, 02 Dec 2025 11:44:33 GMT
End Date:	Wed, 03 Dec 2025 11:44:33 GMT
---------------------------------------------------

MONAD 👇
Backfill start time: 1/11/2024
Daily fees: 10.02 k
Daily revenue: 501.00
Daily protocol revenue: 501.00
Daily supply side revenue: 9.52 k
End timestamp: 1764762272 (2025-12-03T11:44:32.000Z)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants