Inspiration

This project was inspired by the Chainlink Community Staking Pool and how quickly it filled up when early access became available.

What it does

The contract uses Chainlink Automation to monitor the Community Staking Pool contract. As soon as space becomes available, LINK tokens are deposited into it. If the available space is less than the LINK balance of the Auto Stake contract, an amount equal to the available space is deposited. If the available space is more than the LINK balance of the Auto Stake contract, the full balance is deposited.

onlyOwner modifiers are used to migrate tokens to the next version of staking, unstake from the Community Staking Pool contract and withdraw from the Auto Stake contract.

How we built it

The project was built in Foundry and imports Chainlink and Open Zeppelin contracts.

Challenges we ran into

I couldn't find a Community Staking Pool contract deployed on Sepolia (asked in Chainlink Discord and was told there isn't one), so I had to put together a mock staking pool contract and deploy it myself.

Accomplishments that we're proud of

I'm proud of coming up with this idea and building it so fast. It's very exciting to see Automation being used in this way.

What we learned

I learned about interacting with the Chainlink Community Staking Pool contract.

What's next for Chainlink Auto Stake

The next step will be deploying this to mainnet and waiting for someone to unstake.

I also recorded a tutorial on how to write this contract.

Built With

  • chainlink-automation
  • foundry
  • openzeppelin
  • solidity
Share this project:

Updates