Developers
Install
Implementation
All your contract needs is to inherit the function ITickerOperation::onValidatorTriggered
. Then, you connect your contract to your ticker and voila, you are hooked into the Heroglyph Protocol. The only thing missing is a validator using your ticker in their graffiti #<TICKER_NAME>
.
Fee
Presently, there is no fee for executing a ticker. That being said, there is a possibility that later on, heroglyph request each apps to pay a fixed fee for the execution.
Pay the Fee
There are two approaches to pay the fee, either deposit the ETH directly into your contract, or use a GasPool relationship.
If you create a GasPool, it must uses the IGasPool interface
Layer Zero
There is a small fee to execute a LZ message, this fee must be paid by your protocol // contract, otherwise the lz message will revert.
Hook into Heroglyph
To hook your contract, see Tickers
Security
Repeat Attack
A graffiti can contain multiple tickers, meaning your contract can be called more than once from different sources (e.g., someone creating a cheap ticker and connect your contract to it).
Therefore, it's always advisable to protect your code if this behavior is not desired.
Missing Blocks
Heroglyphs ensures that the block number will never be lower than the previously executed block, but it cannot guarantee that all valid blocks are caught.
Delay & Off-chain data
Heroglyphs is not designed for chance games or RNG (Random Number Generation). You should also avoid "Time-based" distribution token.
Heroglyphs processes blocks only at the end of an epoch and handles five blocks every two minutes. So, if a block is created at the start of an epoch, it will usually take about eleven hours for Heroglyphs to recognize it. If there are ten graffiti blocks in an epoch, it will take about four minutes to process all of them.
Hijacking
You don't permanently own your ticker; you can lose it if your deposit reaches zero, or if someone decides to buy it at your price. Either way, keep in mind that you can lose your ticker, which will require obtaining a new one and migrating the validators.
If your product offers significant advantages to the ecosystem, please contact the Heroglyphs team. We can create a Ticker Immune to those systems for a period of time.
Last updated