Astra DAO
  • 👋Introduction
  • Astra DAO
    • Indices
      • iTokens
      • Tokenomics
      • Staking
      • Fees
    • Launchpad Overview
      • Whitelisting (KYC)
      • Vesting
      • Cross-Chain Staking
    • Roadmap
  • Governance
    • Astra DAO
    • Proposals and Voting
  • Tutorials
    • Indices
      • Creating an Index
      • Entering an Astra DAO Index
      • Staking iTokens
      • Leaving an Astra DAO Index
      • Staking ASTRADAO
        • Claiming Rewards - iTokens Staking and Liquidity Mining
        • Shut-Down an Index
    • Launchpad
      • How to Create a Token Sale
      • How to Invest in a Token Sale
      • How to Complete PureFi KYC
  • Oracle
    • Chainlink
  • Developers
    • Contracts
      • Mainnet
        • Arbitrum
      • Testnet
        • Polygon Mumbai
        • BSC Testnet
    • Transaction details
      • Chef
      • Indices
      • LM Pool
      • Governance
    • Smart Contract Functionality
      • Vesting
      • Payment
      • Indices
      • Governance
      • Chef
      • LM Pool
      • AstraDAO Whitelist
      • LaunchpadConfiguration
      • Launchpad
      • LaunchpadFactory
      • LaunchpadVesting
      • CrossChainSaleManager
  • Security
    • Time Lock
    • Ownership
    • Pausing
    • Security Audits
    • Bug Bounty Program
Powered by GitBook
On this page

Was this helpful?

  1. Oracle

Chainlink

Chainlink keeper is the decentralized and highly reliable smart contract automation service. Astra platform used keepers to automate the process distribution of vested tokens. Keepers allow smart contracts to outsource regular maintenance tasks in a trust minimized and decentralized manner.

Working

Vesting contract will be registered as upkeep to enable the automation. Chainlink will check eligibility for distribution by call the checkUpKeep function. This function will provide details if contract is ready for next distribution. Chainlink keeper contract will call the performUpkeep function of vesting contract to distribute tokens.

Keepers take responsibility for Upkeeps in turns. Each turn is counted in blocks. The registered Upkeeps are broken into buckets based on the number of Keepers on the network. At the end of each turn, the buckets rotate from one Keeper to the next. Even if a Keeper goes down, chainlink have built-in redundancy and Upkeep will be performed by the next Keeper in line.

During every block the Keeper will check if the Upkeep is eligible using off-chain compute (a simulation), and then broadcast them on-chain when eligible.

Once a Keeper has performed an Upkeep, it cannot do so again until another Keeper on the network has subsequently performed the same Upkeep. This protects against a faulty or malicious Keeper from taking repeated action on a given Upkeep.

Security

Perform upkeep function is publicly available. Anyone can call this function and contract will release the eligible amount. Reentrancy library is implemented to provide additional layer for security.

Frontrunning and Flashloan attack are not relevant for the vesting contract.

PreviousHow to Complete PureFi KYCNextContracts

Last updated 11 months ago

Was this helpful?