Unilock: Campaigns Redefined.

unilock
7 min readDec 2, 2020

--

Unilock is introduced to the universe of cryptocurrencies to help legitimate projects evolve and grow. We are one of a kind, and so far, there isn’t any platform like ours.

With every passing day, numerous projects arise, but it’s quite hard for people to put in their trust and invest in them, especially where these so-called projects start off with a presale.

It’s an irrefutable fact that we live in a world of deceptions, a world full of scams, but that should be no more. Unilock revolves around that concept, giving the community a sense of security and assurance when investing in a new project. You could look at it from a different perspective too, if you create a campaign on the unilock.network platform, you are giving your project the credibility and trustworthiness it so desperately craves.

So, without further ado, here’s a detailed description of how unilock works:

You are required to fill in a form with all the required information. Here’s the list of information with explanation.

Token Address: Your token address, the one you’re raising money for.

HardCap: Maximum Ether you’re aiming for.

SoftCap: Minimum Ether required for the campaign to succeed.

Max Eth Per Wallet: Maximum Ether amount a wallet can contribute with to the campaign. We are introducing this parameter to avoid people having too much control over the campaign’s token, becoming a whale.

Min Eth Per Wallet: Minimum Ether amount one can contribute with to the campaign.

Token Amount: Amount of tokens you’re selling/exchanging.

Percentage Allocated to Uniswap: A number ranging from 0% to 100% to be used to calculate how much of the accumulated Ether will be added to the ETH/XXX pool (which is automatically created upon campaign success, XXX being your token’s symbol)

Token Per Eth (Uniswap): The initial price of the Uniswap listing. It is the equivalent of your token’s amount in reference to 1 ETH. (e.g: If the value is 10, then 10 XXX equals 1 ETH in the Uniswap pool, as an initial pricing. Again, XXX being your token’s symbol)

Liquidity Lock Duration: Duration in seconds for which the Uniswap Liquidity will be locked if the campaign succeeds.

Start Date: The date in which the campaign will start.

End Date: The date in which the campaign will end.

Case Scenarios:

  • If the campaign reaches the SoftCap, it is considered as a success. Once the “End Date” is reached, any member of the community can lock the liquidity, resulting in the creation of a Uniswap Pool following the “Percentage Allocated to Uniswap” value. (Keep in mind, the hard cap was not reached).
  • If the campaign’s HardCap is attained, the campaign is considered as a success as well. The campaign’s owner or any community member can create the pool and lock the liquidity, regardless of the “End Date” being reached or not.
  • If the campaign accumulated a lesser amount than the SoftCap, the campaign fails. Once it ends, all money collected throughout the campaign will be sent back to participants, automatically.

End Goal:

The philosophy behind Unilock is to give campaign creators the level of authenticity they choose, through the different parameters stated above, to make their project as legitimate as it can be. By locking the liquidity within the Uniswap Pool, for quite some time, you’re telling your audience that you’re here to stay, to give your community the time to decide whether they should invest and contribute to your project or not. You also get to save yourself a great deal of time, the Uniswap Pool along with the lock will be done automatically, we like to keep our contributors at ease.

Voting System:

Giving your community a voice is always a good idea. That’s why we developed an Off-Chain voting system where you can vote without paying any fees. You’d of course need to hold UNL in order to vote and voting power is calculated based on the following formulate:

Voting Power = sqrt{unl_balance^{frac{1}{4}}}

The formula ensures that all voters have almost the same voting power. Holding way more UNL than someone else doesn’t mean you have more voting power, the both of you basically have the same impact during a vote.

22th December: On this day, we’ve launched a 3 days vote to decide 2 things:

1- Minimum UNL required to create a campaign: This does not mean you need to pay a certain amount to create a campaign, you just need to hold that amount in your address to create one.

2- Fees: How much in percentage we’d take off from every created campaign.

Voting has ended on the 25th of December and here are the results:

  • Number of votes: 17
  • Minimum UNL required to launch a campaign: 1.15 UNL
  • Fees: 2.33%

=> Changes will apply on the 5th December, so everyone has a 3 days window to launch their campaigns without holding any UNL and without any fees being taken off.

Your funds are SAFU :

We will explain to you how we keep your funds safe while you use unilock, so please open the smart contract source code link so you can track step by step

1- When you create a campaign a new smart contract contains your presale informations will be created using initialaize function triggered by the factory smart contract:

unilockFactory.sol: Line 110.uniLock(campaign_address).initilaize(_data,_token,msg.sender,_pool_rate,_lock_duration,_uniswap_rate);unilock.sol: Line 432.function initilaize(uint[] calldata _data,address _token,address _owner_Address,uint _pool_rate,uint _lock_duration,uint _uniswap_rate) external returns (uint)

2- When you participate on a presale your contributed ETH will be locked on the presale smart contract , in case the presale succeed the desired liquidity amount (chosen by the presale creator) will be added to uniswap and the rest will be sent to the presale creator’s wallet.

A presale only fails when the collected ETH didn’t reach softcap and the campaign is expired. (block.timestamp refers to current date).

uniLock.sol:Line 490:function failed() public view returns(bool){
if((block.timestamp >= end_date) && (softCap > collected)){
return true;

}
return false;
}

A presale is considered ongoing (still running) only if hardcap isn’t yet reached and the presale didn’t expire:

uniLock.sol:Line 510:function isLive() public view returns(bool){
if((block.timestamp < start_date)) return false;
if((block.timestamp >= end_date)) return false;
if((collected >= hardCap)) return false;
return true;
}

A presale is a success only if hardcap or softcap is reached in the given duration , this is implemented in lock liquidity function.

uniLOCK function can be triggered only when the presale succeed which executes addLiquidity function to add liquidity.When the liquidity is successfully added to uniswap , LPTokens will be sent directly to the campaign’s contract address and unlock_date will be incremented as seen in unilock.sol : Line 473.

unilock.sol:Line 465:function uniLOCK() public returns(uint){
require(locked ==0,'Liquidity is already locked');
require(!isLive(),'Presale is still live');
require(!failed(),"Presale failed , can't lock liquidity");
require(softCap <= collected,"didn't reach soft cap");
require(addLiquidity(),'error adding liquidity to uniswap');
locked = 1;
IERC20(address(token)).transfer(address(0x000000000000000000000000000000000000dEaD),IERC20(address(token)).balanceOf(address(this)));
unlock_date = (block.timestamp).add(lock_duration);
return 1;
}

function addLiquidity() internal returns(bool){
uint campaign_amount = collected.mul(uint(IUniLockFactory(factory).fee())).div(1000);
IERC20(address(token)).approve(address(IUniLockFactory(factory).uni_router()),(hardCap.mul(rate)).div(1e18));
if(uniswap_rate > 0){
IUniswapV2Router02(address(IUniLockFactory(factory).uni_router())).addLiquidityETH{value : campaign_amount.mul(uniswap_rate).div(1000)}(address(token),((campaign_amount.mul(uniswap_rate).div(1000)).mul(pool_rate)).div(1e18),0,0,address(this),block.timestamp + 100000000);
}
payable(IUniLockFactory(factory).toFee()).transfer(collected.sub(campaign_amount));
payable(owner).transfer(campaign_amount.sub(campaign_amount.mul(uniswap_rate).div(1000)));
return true;
}

The LPTokens can only be transferred using unLock function.As seen in Line 458 unLock function can only succeed when the unlock_date is up, Which means you won’t get rug pulled unless you want to get rug pulled by miss seeing when the liquidity gets unlocked.

uniLock.sol:Line 456:function unlock(address _LPT,uint _amount) public returns (bool){
require(locked == 1 || failed(),'liquidity is not yet locked');
require(block.timestamp >= unlock_date ,"can't receive LP tokens");
require(msg.sender == owner,'You are not the owner');
IERC20(address(_LPT)).transfer(msg.sender,_amount);
}

When a presale fails every participant can execute withdrawFunds function which allows them to claim their funds back :

uniLock.sol:Line 499:function withdrawFunds() public returns(uint){
require(failed(),"campaign didn't fail");
require(participant[msg.sender] >0 ,"You didn't participate in the campaign");
uint withdrawAmount = participant[msg.sender].mul(uint(IUniLockFactory(factory).fee())).div(1000);
(msg.sender).transfer(withdrawAmount);
payable(IUniLockFactory(factory).toFee()).transfer(participant[msg.sender].sub(withdrawAmount));
participant[msg.sender] = 0;
}

As you see in the smart contract there is only 2 functions that transfer ETH from the campaign’s address (withdrawFunds and addLiquidity function).We as project devs have no control over these functions means we have no control over the ETH contributed to the presale.FUNDS ARE SAFU

Roadmap:

We KNOW the idea behind Unilock simply brilliant and big, and any big idea can get bigger.

For the upcoming three months, we have got 3 main features that we’ll build and deploy consecutively.

I — Create your ERC20 tokens right from Unilock, then launch your campaign with a click of a button.

Development time: 15 days

Deployment: Estimated to be live on the24th of December, 2020

→ To save our campaign creators time and make things more centralized, we’ll give you the option to create your ERC20 tokens directly from Unilock, giving the ability to fully focus on making a campaign to burst off with your project.

II — Support multiple coins.

Development time: 30 days

Deployment: Estimated to be live on the 1st of February, 2021

→ In the future, the community can participate to any campaign via various coins. We’d start off with stable coins such as USDT, since they’re widely used.

Stay tuned, more information will be published regarding this update.

III — Staking.

Development time: 20 days

Deployment: Estimated to be live on the 20th of February, 2021

On the long run, we’d build a new protocol for staking where any holder can stake his UNL and get a reward from the collected fees.

Again, more information will be released regarding this feature once the development has ended.

Sources:

Platform: http://unilock.network/

Twitter: https://twitter.com/unilock_network

Telegram: https://t.me/unilock_network

Github: https://github.com/unilock1/unilock

--

--