# Funding Randomness

By [angelbattles.eth](https://paragraph.com/@angelbattles) · 2022-12-04

---

Angel Battles uses Chainlink Verifiable Random Function (VRF) in order to change mountain conditions and help users purchase the ultimate pack. This protects the integrity of the game from several attacks detailed in the [protecting randomness](https://mirror.xyz/angelbattles.eth/aQ5g3MdXyEt_LpW9CMCtqq-LqXMnhmVRXgcN0XqYsP0) post.

These random numbers aren’t free, and must be paid for with LINK tokens. As of 12/2/2022, each random number costs 0.000763 USD, or 1300 numbers per dollar. The devs will initially fund both the **BattleMtnData** contract and the **ABStore** contract with an amount of tokens that should last for a significant amount of time. For instance, if battle mountain conditions were changed at the max rate of every 24 hrs, $1 worth of link tokens could last **almost 4 years**.

However, if usage is extremely high, the game lives on for decades, if the Angel Battles DAO votes to allow more frequent battle mountain changes or deploys additional contracts that protect other actions with commit / reveal schemes, funds will have to be replenished.

The key wrinkle is that chainlink uses TWO different LINK tokens on Polygon. The ERC20 token

0xb0897686c545045aFc77CF20eC7A532E3120E0F1

[https://polygonscan.com/address/0xb0897686c545045aFc77CF20eC7A532E3120E0F1](https://polygonscan.com/address/0xb0897686c545045aFc77CF20eC7A532E3120E0F1)

is what can be purchased on exchanges, and the ERC677 version which is actually consumed when producing random numbers.

0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39

[https://polygonscan.com/address/0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39](https://polygonscan.com/address/0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39)

Users can purchase the ERC20 version and then go to pegswap.chain.link to switch between. The contract is at 0xAA1DC356dc4B18f30C347798FD5379F3D77ABC5b and the swap function requires approvals on the related contracts.

[https://pegswap.chain.link/](https://pegswap.chain.link/)

ERC677 is a standard that allows information to be sent along with token transfers.

Once you have those tokens, simply send them to the angel battles contracts through your wallets. Thank you in advance for your help in decentralizing and keeping Angel Battles alive!

---

*Originally published on [angelbattles.eth](https://paragraph.com/@angelbattles/funding-randomness)*
