Governance Token
Kickflow's Governance Token is based on the FA1.2 token standard on Tezos. We have customised the original token contract to record historical balances at various block levels. This assists in voting and flash loan resistance.
The code for our governance token can be found here. We selected SmartPy's official FA1.2 token template and customised it based on our needs. All the changes are properly documented in the code- using comments.


To record historical balance snapshots, we have added snapshots big_map as follows- big_map %snapshots (pair address nat) (pair (nat %level) (nat %balance))
The nat as the right element of the snapshots pair key type- represents the index of the snapshot. Indexing was shifted to the key instead of keeping a map on the value side, based on the warning mentioned in Section-3 of Smartlink's audit report.
To track the value of the index to be used, we have a numSnapshots big_map as follows- big_map %numSnapshots address nat
A functionality to permanently disable minting is also added. Minting would be disabled immediately after the initial mint- by the admin.
The original functionalities of pausing, changing admin and updating metadata have been removed, as they are deemed redundant in Kickflow's design.
Description of entrypoints and storage structure could be found here.
Last modified 3mo ago
Copy link