Tiers

Lighthouse Tier system

The first smartcontract that should be deployed is the LighthouseTier.sol

The deployment is done via scripts/deploy-tier.js

You should edit the Constructor arguments in deploying script, before running it.

It requires three constructor arguments:

  1. Crowns Token address.

  2. Claim Verifier address.

  3. Array of Tier claiming fees.

Each tier claiming requires some fee. That fee will be spend in Crowns. In order to Claim the Tier, the investor has to complete certain tasks within the Seascape Network. The tracking of the tasks are centralized. Therefore in order to verify that investor is eligible to claim the tier, the Lighthouse backend will generate a signature. Which is verified via ecrecover function in the Smartcontract. The server will sign the eligibility of investor with the privatekey which produces Claim Verifier address.

Functions

Only Owner

setFees(uint256[4] memory _fees)

Updates the Tier claiming fees.

setClaimVerifier(address _claimVerifier)

Updates the Backend claim signature signer address. In case if previous privatekey was leaked or for some other uncertainties.

addEditor(address _user)

Adds a new Smartcontract address as the editor of Investor's tier. More info about Editors in the Only Editor section below.

deleteEditorEditor(address _user)

Revokes the grant for Smartcontract to edit Investor's tier. More info about Editors in the Only Editor section below.

Only Editor

Editors are another Smartcontracts of the Lighthouse, who can use the Tier for Investor. The usage of Tier resets its level. According to plan, user can use his Tier only once per project. After that an investor has to reclaim it.

Usually it happens, if the investor won a lottery.

Only add other Lighthouse smartcontract addresses as Editors. Editors list are public and can be fetched from editors public function. If you see among editors any address besides another Lighthouse smartcontracts, immediately stop to use this IDO platform, as its indicates that it was Hacked.

use(address investor, uint8 level)

Another Lighthouse uses the Tier, by resetting it to 0. The editor should know the Tier level in order to use it.

Only Investor (User)

claim(uint8 level, uint8 v, bytes32 r, bytes32 s)

Claim a given Tier level by the investor. Note, that to obtain a Tier, investor has to get from Lighthouse backend the signature that tracks investor's activity in Seascape Network.

Level should be number between 0 and 4. If user claimed the tier before, then the claim function can be called for next tier only.

Call functions

getTierLevel(address investor)

Return the Tier level for the user.

It returns -1, if user has no tier or tier is used by Editors.