This repo contains the ProxyLogic smartcontracts. These are part of the staking rewards distribution strategy of the Threshold Network:
- There is an amount of T allocated for the Threshold staking rewards that are going to be distributed in the future. For better management of the Threshold treasury and security reasons, these future rewards have been deposited on a DSProxy contract whose owner is the Council multisig wallet. This is the future rewards proxy
- We also have a claimable rewards proxy where the calculated month-distribution rewards are sent month by month.
- The MerkleDistribution
contract is responsible for allocating the rewards for each staker. When a staker
claim
the rewards, the T amount is sent fromclaimingRewards
to the corresponding one. - For security reasons and to get a more efficient and error-proof workflow, this process is made
by the special contract:
ProxyLogic
. The methods of these (proxy) contracts are called byfutureRewards
and join several smartcontract calls in only one, automating the process and making the process easier for the council. The methods ofProxyLogic
are called by theexecute()
method in DSProxy.
Contract | Address |
---|---|
ProxyLogicV1 | 0xa604C363d44e04da91F55E6146D09ecDD004f678 |
ProxyLogicV2 | 0xE9ec5e1c6956625D2F3e08A46D9f5f4c62B563f7 |
Tests have been built using Hardhat framework.
You can install the needed dependencies by:
$ npm install
To run the tests is needed to have a .env file with the following. Since Hardhat forking requires an archive node, Alchemy is recommended.
FORKING_BLOCK=17179805
FORKING_URL=https://eth-mainnet.g.alchemy.com/v2/<API_KEY>
$ npx hardhat test