Smart Contract API
Liquidation Penalty
chop()
chop()
Returns the liquidation penalty for an asset.
Parameters
The function takes:
ilk (bytes32) — identifier for a collateral. The values are:
MATIC on Polygon Mainnet —
0x63654d4154494300000000000000000000000000000000000000000000000000
.rETH on Ethereum Mainnet —
0x4d56545f72455448000000000000000000000000000000000000000000000000
.sfrxETH on Polygon Mainnet —
0x4d56545f73667278455448000000000000000000000000000000000000000000
.stMATIC on Polygon Mainnet —
0x4d56545f73744d41544943000000000000000000000000000000000000000000
.wstETH on Polygon Mainnet —
0x4d56545f77737445544800000000000000000000000000000000000000000000
.
The function returns:
penalty (uint256) — liquidation penalty per collateral. The formula to turn the result into a decimal system number is
penalty / 10^18
. For example,1120000000000000000/10^18 = 1.12 = 12%
.
Smart contracts
Dog on Polygon Mainnet (MATIC, stMATIC)
Dog on Ethereum Mainnet (rETH, sfrxETH, wstETH)
Examples
You can query for a liquidation penalty on the contract page by the links above, anytime.
Stability/Borrow Fee
ilks()
ilks()
Returns the stability fee also known as borrow fee; in simple terms, loan rate.
Parameters
The function takes:
ilk (bytes32) — identifier for a collateral. The values are:
MATIC on Polygon Mainnet —
0x63654d4154494300000000000000000000000000000000000000000000000000
.rETH on Ethereum Mainnet —
0x4d56545f72455448000000000000000000000000000000000000000000000000
.sfrxETH on Polygon Mainnet —
0x4d56545f73667278455448000000000000000000000000000000000000000000
.stMATIC on Polygon Mainnet —
0x4d56545f73744d41544943000000000000000000000000000000000000000000
.wstETH on Polygon Mainnet —
0x4d56545f77737445544800000000000000000000000000000000000000000000
.
The function returns:
duty (uint256) — stability fee a.k.a. borrow fee per collateral. The formula to turn the result into a decimal system number is
(duty ^31536000) - 1 = borrow_fee
. For example,1.000000001243680656318820313^31536000 - 1 = 0.04 = 4%
.
Smart contracts
Jug on Polygon Mainnet (MATIC, stMATIC)
Jug on Ethereum Mainnet (rETH, sfrxETH, wstETH)
Examples
You can query for a borrow fee on the contract page by the links above, anytime.
Get the minting cap for a specific collateral
ilks()
ilks()
Returns the stability fee also known as borrow fee; in simple terms, loan rate.
Parameters
The function takes:
ilk (bytes32) — identifier for a collateral. The values are:
MATIC on Polygon Mainnet —
0x63654d4154494300000000000000000000000000000000000000000000000000
.rETH on Ethereum Mainnet —
0x4d56545f72455448000000000000000000000000000000000000000000000000
.sfrxETH on Polygon Mainnet —
0x4d56545f73667278455448000000000000000000000000000000000000000000
.stMATIC on Polygon Mainnet —
0x4d56545f73744d41544943000000000000000000000000000000000000000000
.wstETH on Polygon Mainnet —
0x4d56545f77737445544800000000000000000000000000000000000000000000
.
The function returns:
duty (uint256) — stability fee a.k.a. borrow fee per collateral. The formula to turn the result into a decimal system number is
(duty ^31536000) - 1 = borrow_fee
. For example,1.000000001243680656318820313^31536000 - 1 = 0.04 = 4%
.
Smart contracts
Jug on Polygon Mainnet (MATIC, stMATIC)
Jug on Ethereum Mainnet (rETH, sfrxETH, wstETH)
Examples
You can query for a borrow fee on the contract page by the links above, anytime.
Get the borrowed rate for a specific collateral
ilks()
ilks()
Returns the stability fee also known as borrow fee; in simple terms, loan rate.
Parameters
The function takes:
ilk (bytes32) — identifier for a collateral. The values are:
MATIC on Polygon Mainnet —
0x63654d4154494300000000000000000000000000000000000000000000000000
.rETH on Ethereum Mainnet —
0x4d56545f72455448000000000000000000000000000000000000000000000000
.sfrxETH on Polygon Mainnet —
0x4d56545f73667278455448000000000000000000000000000000000000000000
.stMATIC on Polygon Mainnet —
0x4d56545f73744d41544943000000000000000000000000000000000000000000
.wstETH on Polygon Mainnet —
0x4d56545f77737445544800000000000000000000000000000000000000000000
.
The function returns:
duty (uint256) — stability fee a.k.a. borrow fee per collateral. The formula to turn the result into a decimal system number is
(duty ^31536000) - 1 = borrow_fee
. For example,1.000000001243680656318820313^31536000 - 1 = 0.04 = 4%
.
Smart contracts
Jug on Polygon Mainnet (MATIC, stMATIC)
Jug on Ethereum Mainnet (rETH, sfrxETH, wstETH)
Examples
You can query for a borrow fee on the contract page by the links above, anytime.
Last updated