Skip to content

Commit a0ce256

Browse files
Automation native billing (smartcontractkit#2063)
* draft release note * Updated release note and billing examples * Updated release note, removed native billing fee example * Edits * Edits * Edits * Bump the builds * Update formula * Replace underscroes in formula and add escape chars * Synced content lost in merge, updated dates, minor edits * minor correction --------- Co-authored-by: thedriftofwords <[email protected]> Co-authored-by: Crystal Gomes <[email protected]>
1 parent e878b54 commit a0ce256

File tree

4 files changed

+56
-44
lines changed

4 files changed

+56
-44
lines changed

src/content/chainlink-automation/guides/register-upkeep-in-contract.mdx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,18 @@ Programmatically registering an upkeep happens in two steps:
3434
Pizza code to do
3535
1. Call `registerUpkeep` on the Registrar contract using the `RegistrationParams` struct. You will receive the `upkeepID` if successful.
3636

37-
| Var type | Var Name | Example value | Description |
38-
| -------- | -------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
39-
| String | name | "Test upkeep" | Name of upkeep that will be displayed in the UI. |
40-
| bytes | encryptedEmail | 0x | Can leave blank. If registering via UI we will encrypt email and store it here. |
41-
| address | upkeepContract | | Address of your Automation-compatible contract |
42-
| uint32 | gasLimit | 500000 | The maximum gas limit that will be used for your txns. Rather over-estimate gas since you only pay for what you use, while too low gas might mean your upkeep doesn't perform. Trade-off is higher gas means higher minimum funding requirement. |
43-
| address | adminAddress | | The address that will have admin rights for this upkeep. Use your wallet address, unless you want to make another wallet the admin. |
44-
| uint8 | triggerType | 0 or 1 | 0 is Conditional upkeep, 1 is Log trigger upkeep |
45-
| bytes | checkData | 0x | checkData is a static input that you can specify now which will be sent into your checkUpkeep or checkLog, see interface. |
46-
| bytes | triggerConfig | 0x | The configuration for your upkeep. 0x for conditional upkeeps, or see next section for log triggers. |
47-
| bytes | offchainConfig | 0x | Leave as 0x, or use this field to set a [gas price threshold](/chainlink-automation/guides/gas-price-threshold) for your upkeep. Must be a JSON object and CBOR encoded - see [more details and examples on formatting](/chainlink-automation/guides/gas-price-threshold#format-and-encode-your-offchain-config). |
48-
| uint96 | amount | 1000000000000000000 | Ensure this is less than or equal to the allowance just given, and needs to be in WEI. |
37+
| Var type | Var Name | Example value | Description |
38+
| -------- | -------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
39+
| String | name | "Test upkeep" | Name of upkeep that will be displayed in the UI. |
40+
| bytes | encryptedEmail | 0x | Can leave blank. If registering via UI we will encrypt email and store it here. |
41+
| address | upkeepContract | | Address of your Automation-compatible contract |
42+
| uint32 | gasLimit | 500000 | The maximum gas limit that will be used for your txns. Rather over-estimate gas since you only pay for what you use, while too low gas might mean your upkeep doesn't perform. Trade-off is higher gas means higher minimum funding requirement. |
43+
| address | adminAddress | | The address that will have admin rights for this upkeep. Use your wallet address, unless you want to make another wallet the admin. |
44+
| uint8 | triggerType | 0 or 1 | 0 is Conditional upkeep, 1 is Log trigger upkeep |
45+
| bytes | checkData | 0x | checkData is a static input that you can specify now which will be sent into your checkUpkeep or checkLog, see interface. |
46+
| bytes | triggerConfig | 0x | The configuration for your upkeep. 0x for conditional upkeeps, or see next section for log triggers. |
47+
| bytes | offchainConfig | 0x | Leave as 0x, or use this field to set a [gas price threshold](/chainlink-automation/guides/gas-price-threshold) for your upkeep. Must be a JSON object and CBOR encoded - see [more details and examples on formatting](/chainlink-automation/guides/gas-price-threshold#format-and-encode-your-offchain-config). |
48+
| uint96 | amount | 1000000000000000000 | Ensure this is less than or equal to the allowance just given, and needs to be in WEI. |
4949

5050
## Upkeep registration parameters and examples
5151

src/content/chainlink-automation/overview/automation-economics.mdx

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,53 @@ whatsnext: { "Automation Architecture": "/chainlink-automation/concepts/automati
77
"Supported Networks for Automation": "/chainlink-automation/overview/supported-networks" }
88
---
99

10+
import { TabsContent } from "@components/Tabs"
11+
import { Aside } from "@components"
12+
1013
## Cost of using Chainlink Automation
1114

12-
Chainlink Automation only requires an execution fee for transactions onchain. This fee includes the transaction cost, a node operator percentage fee (refer to the formula below), and a small fixed gas overhead accounting for gas between the network and the registry. The percentage fee compensates the Automation Network for monitoring and performing your upkeep. The Automation percentage fee varies by chain and is listed on our [Supported Networks](/chainlink-automation/overview/supported-networks) page.
15+
Chainlink Automation requires only an execution fee for transactions onchain. This fee includes the transaction cost, a node operator percentage fee, and a small fixed gas overhead accounting for gas between the network and the registry.
16+
The percentage fee compensates the Automation Network for monitoring and performing your upkeep. The Automation percentage fee varies by chain and is listed on our [Supported Networks](/chainlink-automation/overview/supported-networks) page.
17+
18+
The fee calculation for upkeeps that are configured for LINK payments (or other non-native payments as applicable) have a conversion from native tokens to LINK (or other non-native payments as applicable).
19+
This conversion is not performed in the fee calculation for upkeeps that are configured for native token payments. Otherwise, the fee formula is the same for both payment types:
1320

14-
**Formula for Registry v2.1**
21+
{/* prettier-ignore */}
22+
<TabsContent sharedStore="paymentMethod" client:visible>
23+
<Fragment slot="tab.1">LINK</Fragment>
24+
<Fragment slot="tab.2">Native tokens</Fragment>
25+
<Fragment slot="panel.1">
26+
**Formula for Registry v2.3**
1527

16-
Fee<sub>LINK</sub> = [tx.gasPrice<sub>Native WEI</sub> * (gasUsed + gasOverhead) * (1 + premium%)]/[LINK/Native<sub>Rate in WEI</sub>]
28+
Fee<sub>LINK</sub> = [tx.gasPrice<sub>Native WEI</sub> \* gasUsed \* (1 + premium%) + (gasOverhead \* tx.gasPrice<sub>Native WEI</sub>)]/[LINK/Native<sub>Rate in WEI</sub>]
1729

18-
On Automation v2.2 and earlier, there is a flat per-transaction fee of 0.01 LINK in the following cases:
30+
</Fragment>
31+
<Fragment slot="panel.2">
32+
**Formula for Registry v2.3**
1933

20-
- For mainnet transactions on Optimism and Base, to account for L1 transaction costs, ensuring that node operators are fairly compensated
21-
- For testnet transactions on all supported networks, in order to account for node infrastructure costs
34+
Fee<sub>Native</sub> = tx.gasPrice<sub>Native WEI</sub> \* gasUsed \* (1 + premium%) + (gasOverhead \* tx.gasPrice<sub>Native WEI</sub>)
35+
36+
</Fragment>
37+
</TabsContent>
2238

2339
There is no registration fee or other fees for any offchain computation.
2440

41+
<Aside type="note" title="Additional fees for specific cases">
42+
On Automation v2.3 and earlier, there is an additional flat per-transaction fee of 0.01 LINK in the following cases:
43+
44+
- For mainnet transactions on Optimism and Base to account for L1 transaction costs, which ensures that node operators are fairly compensated
45+
- For testnet transactions on all supported networks to account for node infrastructure costs
46+
47+
</Aside>
48+
2549
### Fee calculation example
2650

27-
An upkeep transaction was [performed](https://polygonscan.com/tx/0x19309782e15952c90dcadcc02cbf34f331daaeee369d3e3acca43bade02af105) on _Polygon mainnet_. It used _110,051_ gas at a gas price of _182,723,799,380 wei_. The node operator percentage on Polygon was _70%_ at the time of this transaction, and this fee [varies by network](/chainlink-automation/overview/supported-networks). The LINK/POL exchange rate for this transaction was _7,308,290,731,273,610,000 wei_. The upkeep's LINK balance was reduced by a fee of _0.008077 LINK_. The preceding information and calculation can be found in the table below:
51+
An upkeep transaction was [performed](https://polygonscan.com/tx/0x19309782e15952c90dcadcc02cbf34f331daaeee369d3e3acca43bade02af105) on _Polygon mainnet_. It used _110,051_ gas at a gas price of _182,723,799,380 wei_.
52+
The node operator percentage on Polygon was _70%_ at the time of this transaction, and this fee [varies by network](/chainlink-automation/overview/supported-networks).
53+
54+
The tables below show how the fees are calculated for upkeeps configured for LINK payments:
55+
56+
The LINK/MATIC exchange rate for this transaction was _7,308,290,731,273,610,000 wei_. The upkeep's LINK balance was reduced by a fee of _0.008077 LINK_. The preceding information and calculation can be found in the table below:
2857

2958
| Variable | Description | Value |
3059
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |

src/content/chainlink-automation/overview/automation-release-notes.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { ClickToZoom } from "@components"
1515

1616
**Chainlink Automation Release Notes**
1717

18+
- [Native billing on Base Sepolia testnet](#2024-09-09---native-billing-on-base-sepolia-testnet)
1819
- [Log trigger upkeeps are generally available](#2024-08-29---log-trigger-upkeeps-are-generally-available)
1920
- [Migrating upkeeps on paused registries](#2024-07-30---migrating-upkeeps-on-paused-registries)
2021
- [Automation on Base Sepolia](#2024-06-28---automation-on-base-sepolia)
@@ -41,6 +42,13 @@ import { ClickToZoom } from "@components"
4142
- [Keepers v1.1 launch on Ethereum](#2021-08-05---keepers-v11-launch-on-ethereum)
4243
- [Questions](#questions)
4344

45+
## 2024-09-09 - Native billing on Base Sepolia testnet
46+
47+
Payment in native gas tokens and approved non-LINK tokens is now available for upkeeps on Automation v2.3 or later. Currently this capability is available on the Base Sepolia testnet.
48+
When you register a new upkeep, you can select whether you want to pay in LINK, the native gas token, or an approved non-LINK token for the chain that you are using. After you register the upkeep, the payment setting cannot be updated.
49+
50+
See the [Supported Networks](/chainlink-automation/overview/supported-networks#base-sepolia-testnet) page to find the contract and config information for Automation on Base Sepolia testnet.
51+
4452
## 2024-08-29 - Log trigger upkeeps are generally available
4553

4654
[Log trigger upkeeps](/chainlink-automation/guides/log-trigger) are now generally available. Learn more about [how Chainlink Automation processes logs](/chainlink-automation/concepts/automation-concepts#maximum-logs-processed-for-log-trigger-upkeeps) for log trigger upkeeps.

src/features/chainlink-automation/data/chainlink-automation-config.json

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -349,31 +349,6 @@
349349
"registrar": "0x110Bd89F0B62EA1598FfeBF8C0304c9e58510Ee5",
350350
"transcoder": "0x245675A2f4b4C1052C880cD600DCF04D58520eE7"
351351
},
352-
"BASE_MAINNET": {
353-
"paymentPremiumPPB": 500000000,
354-
"blockCountPerTurn": "Not Applicable",
355-
"maxCheckDataSize": 5000,
356-
"checkGasLimit": 10000000,
357-
"gasCeilingMultiplier": 5,
358-
"minUpkeepSpend": {
359-
"type": "BigNumber",
360-
"hex": "0x470de4df820000"
361-
},
362-
"maxPerformGas": 5000000,
363-
"fallbackGasPrice": {
364-
"type": "BigNumber",
365-
"hex": "0x3b9aca00"
366-
},
367-
"fallbackLinkPrice": {
368-
"type": "BigNumber",
369-
"hex": "0x2386f26fc10000"
370-
},
371-
"maxPerformDataSize": 2000,
372-
"flatFeeMicroLink": 0,
373-
"stalenessSeconds": 90000,
374-
"registrar": "0xD8983a340A96b9C2Bb6855E46847aE134Db71fB1",
375-
"transcoder": "0x395C8461299c9981E9D1A30d116F0c80a927d2A4"
376-
},
377352
"BASE_SEPOLIA": {
378353
"paymentPremiumPPB": 500000000,
379354
"blockCountPerTurn": "Not Applicable",

0 commit comments

Comments
 (0)