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
  • UNIT
  • GHO_DECIMALS
  • AAVE_ORACLE
  • GHO
  • constructor
  • getCollateralAmount
  • getFeeAmount

Was this helpful?

  1. Dullahan
  2. Smart contracts

OracleModule

UNIT

uint256 UNIT

1e18 scale

GHO_DECIMALS

uint256 GHO_DECIMALS

Number of decimals in the GHO token

AAVE_ORACLE

address AAVE_ORACLE

Address of the Aave Price Oracle

GHO

address GHO

Address of the GHO token

constructor

constructor(address _oracle, address _gho) public

getCollateralAmount

function getCollateralAmount(address collateral, uint256 feeAmount) external view returns (uint256)

Get the amount of collateral for a given amount of fees

Calculates the amount of collateral matching the given amount of fees based on current prices

Parameters

Name
Type
Description

collateral

address

Address of the collateral

feeAmount

uint256

Amount of fees

Return Values

Name
Type
Description

[0]

uint256

uint256 : Amount of collateral

getFeeAmount

function getFeeAmount(address collateral, uint256 collateralAmount) external view returns (uint256)

Get the amount of fees for a given amount of collateral

Calculates the amount of fees matching the given amount of collateral based on current prices

Parameters

Name
Type
Description

collateral

address

Address of the collateral

collateralAmount

uint256

Amount of collateral

Return Values

Name
Type
Description

[0]

uint256

uint256 : Amount of fees

PreviousDullahanFeeModuleNextDullahanRegistry

Last updated 1 year ago

Was this helpful?