Skip to content
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

[Bucket-airdrop farm ] add missing credits value #12800

Closed
wants to merge 18 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions projects/bucket-farm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ async function tvl(api) {
let assetType = type.slice(type.indexOf("<"), type.indexOf(">")).split(",")[1].trim()

if(assetType == "0x922d15d7f55c13fd790f6e54397470ec592caa2b508df292a2e8553f3d3b274f::msui::MSUI" || assetType == "0x41ff228bfd566f0c707173ee6413962a77e3929588d010250e4e76f0d1cc0ad4::ksui::KSUI") assetType = ADDRESSES.sui.SUI

api.add(assetType, degenPool.fields.balance)
const credits = degenPool.fields.sheet.fields.credits.fields.contents.reduce((acc,content)=> acc + Number(content.fields.value.fields.pos0),0)
Copy link
Member

Choose a reason for hiding this comment

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

hi @Jarekkkkk what is this credit field

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's the borrowed value from other protocols

Copy link
Member

Choose a reason for hiding this comment

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

sorry, you need to expand on that. It is not like other farms where people lock tokens and wait for points/tokens as reward?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, this is some feature we might be utilized on in the future that might integrate with our protocol. if the borrowed value can't be counted, then it's fine.

thanks for your reply, sir

Copy link
Member

Choose a reason for hiding this comment

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

yeah, sorry we cant count borrowed value


api.add(assetType, Number(degenPool.fields.balance) + credits)
}
}

Expand Down
Loading