Paladin Docs
  • Overview
  • Quest V2
    • Overview
    • Quest Types & Features
    • Creating a Quest
      • Fixed Quests
      • Ranged Quests
    • Voting for Quests
    • Delegating your vote
    • Claiming rewards
    • Reward Distribution
    • Smart Contracts (v2.1)
      • QuestDataTypes
      • QuestBoard
      • MultiMerkleDistributorV2
    • Smart Contracts (V2)
      • QuestDataTypes
      • QuestBoard
      • BiasCalculator
      • MultiMerkleDistributor
      • ExtraRewardsMultiMerkle
  • Vote Flywheel
    • Overview
    • Smart Contracts
      • HolyPalPower
      • Loot
      • LootCreator
      • LootVoteController
      • LootReserve
      • Boost
  • Warlord
    • Overview
    • $WAR
    • Minting and Staking WAR
    • Redeeming WAR
    • Smart contracts
  • Dullahan
    • Overview
    • Depositing stkAAVE
    • Borrowing discounted GHO
    • Smart contracts
      • DullahanVault
      • DullahanRewardsStaking
      • DullahanPod
      • DullahanPodManager
      • DullahanDiscountCalculator
      • DullahanFeeModule
      • OracleModule
      • DullahanRegistry
      • DullahanZapDeposit
  • Warden Boost
    • Boost Market
    • How to Use Warden
      • As a Seller
        • Through the UI
        • Through Smart Contracts
      • As a Buyer
        • Through the UI
        • Through Smart Contracts
    • Smart Contract
    • MultiBuy
  • Warden Pledge
    • Overview
    • How to use Pledge
      • Create a Pledge
      • Delegating veBoosts
    • Smart Contract
  • Paladin Lending
    • Protocol Overview
    • Liquidity Mining
    • Technical docs
      • PalPool
      • PalToken
      • Delegators
      • Controller
      • Interest Calculator
      • PalLoan
      • PalLoanToken
      • PalPool Variants
      • Price Oracle
      • Error Codes
  • Governance
    • $PAL
    • Holy PAL (hPAL)
      • Smart Contract
    • Delegation
    • Voting
    • Voting Proposal Framework
  • Warden Quest (V1) - Deprecated
    • Creating a Quest
    • Smart contracts
      • QuestBoard
      • MultiMerkleDistributor
      • ExtraRewardsMultiMerkle
    • Covenant
  • Deployed contracts
    • Mainnet
    • Crosschain
    • Sonic
    • Admin
    • Audits
  • Resources
    • Paladin Whitepaper
  • Twitter
  • Discord
  • Forum
  • Snapshot
Powered by GitBook
On this page

Was this helpful?

  1. Vote Flywheel
  2. Smart Contracts

HolyPalPower

Converts the hPAL Locks into a decreasing balance, similar to a veToken, with a Point structure (bias & slope). Allows to fetch past total locked supply and users past Locks

hPal

address hPal

Address of the hPAL contract

balanceOf

function balanceOf(address user) external view returns (uint256)

Returns the hPalPower balance of a user

Parameters

Name
Type
Description

user

address

Address of the user

Return Values

Name
Type
Description

[0]

uint256

uint256 : hPalPower balance

balanceOfAt

function balanceOfAt(address user, uint256 timestamp) external view returns (uint256)

Returns the hPalPower balance of a user at a given timestamp

Parameters

Name
Type
Description

user

address

Address of the user

timestamp

uint256

Timestamp to get the balance at

Return Values

Name
Type
Description

[0]

uint256

uint256 : hPalPower balance

getUserPoint

function getUserPoint(address user) external view returns (struct IHolyPalPower.Point)

Returns the user Point (slope & bias) for the current Lock

Parameters

Name
Type
Description

user

address

Address of the user

Return Values

Name
Type
Description

[0]

struct IHolyPalPower.Point

Point : User Point

getUserPointAt

function getUserPointAt(address user, uint256 timestamp) external view returns (struct IHolyPalPower.Point)

Returns the user Point (slope & bias) for the Lock at a given timestamp

Parameters

Name
Type
Description

user

address

Address of the user

timestamp

uint256

Timestamp to get the balance at

Return Values

Name
Type
Description

[0]

struct IHolyPalPower.Point

Point : User Point

locked__end

function locked__end(address user) external view returns (uint256)

Returns the user Lock end timestamp

Parameters

Name
Type
Description

user

address

Address of the user

Return Values

Name
Type
Description

[0]

uint256

uint256 : Lock end timestamp

totalSupply

function totalSupply() external view returns (uint256)

Returns the total hPALPower supply

Return Values

Name
Type
Description

[0]

uint256

uint256 : Total hPALPower supply

totalLocked

function totalLocked() external view returns (uint256)

Returns the total amount of hPAL locked

Return Values

Name
Type
Description

[0]

uint256

uint256 : Total hPAL locked

totalLockedAt

function totalLockedAt(uint256 blockNumber) external view returns (uint256)

Returns the total amount of hPAL locked at a given block

Parameters

Name
Type
Description

blockNumber

uint256

Number of the block to get the total locked at

Return Values

Name
Type
Description

[0]

uint256

uint256 : Total hPAL locked

findTotalLockedAt

function findTotalLockedAt(uint256 timestamp) external view returns (uint256)

Finds the total amount of hPAL locked at a given timestamp

Parameters

Name
Type
Description

timestamp

uint256

Timestamp to find the block number for

Return Values

Name
Type
Description

[0]

uint256

uint256 : Total Supply found for the given timestamp

PreviousSmart ContractsNextLoot

Last updated 1 year ago

Was this helpful?