/

AccessManager.sol provides a default mechanism to allow geo restrictions based on user IP and excluded countries (as decided by the DAO). The mechanism can be replaced at any point by the DAO with alternatives ranging from no restriction for any region to full KYC restriction.

Exchange access restricted by the AccessManager includes staking SALT, and depositing liquidity.

Proposing ballots and voting are not restricted by the AccessManager - to prevent the unlikely event that a new AccessManager approved by the DAO that inadvertently restricts all users (which could then effectively cripple the DAO by preventing further proposals and voting).

Swaps are not restricted at the contract level either (but may be restricted at the interface level if the DAO chooses to) - to reduce swap gas costs by approximately 10%.

With the default AccessManager, a user's IP address is checked offchain to see if it is valid for the current DAO defined geo restrictions. The approval signature is then passed to the grantAccess function to record in the blockchain that the user has access. Again, this default AccessManager can be replaced by the DAO as needed.

Upkeep.sol contains the publicly callable performUpkeep() function which performs multiple upkeep steps for the DEX. Users calling performUpkeep() are given a default 5% of the SALT that has been generated from arbitrage since the last performUpkeep was called.

There are 8 perform upkeep steps which do everything from withdrawing arbitrage profits, distributing emissions, emiting rewards, handling team and DAO wallet vesting, and more.

While the upkeep functionality is extensive, maximum simulated gas costs (with the maximum number of pools on the DEX of 100) and full distribution of rewards and profits is about 1.1 million gas.

Last updated