那么佛萨奇2.0是什么?有哪些改进?
经典矩阵由两种财务模型组成,一种称为S另一种称为3型矩阵,另一种称为3型矩阵S6型矩阵。所以很多合作伙伴都不知道什么是矩阵。其实很简单。矩阵是一个组织网络.Let's take a look at the S3 matrix first. How does it distribute our wealth? First of all, the S3 matrix consists of the following three positions, namely, one position and two positions, which can be understood as the position where you receive money. That is, when one fund enters your first position, you receive 100%, and when the other fund enters your second position, you receive 100%. Then, the third position comes in and you can't get it. Because after cleaning up, more Z gold comes in, and you can get 100% of the 1 # and 2 # positions.
So let's summarize, S3 matrix means that you get 100% z-gold in position 1 and 100% z-gold in position 2. After the entry of position 3 Z, it is equivalent to reinvesting your position. All positions have been reset, which means that your position has changed, so your positions 1 and 2 below have been cleared. When someone comes in, you can receive 1000%.
"100% revenue, so in the S-3 matrix, your z-gold position can only come from your own direct recommendation or another recommendation from your subordinate partner, which means the benefits your team brings to you.". This is a more working S3 matrix model.
S6matrix。这是Metaforce中的第二个模型,称为中的第二个模型,S6矩阵。S6矩阵怎么样,也就是下面的?它有六个要点。第一排的两点在哪里?也就是说,每次进来的z金上涨,你不拿,但是在二线。你的钱是第一,第二,第三个位置是100%,然后是100%或者100%。第二行的最后一个位置叫循环位。不管是在哪里S3矩阵还是S在6矩阵中,所有循环比特都有相同的含义。
循环位的作用是清空和重置你的矩阵,因为只有在仓位清空后,你才能享受到入境z金的利润。你能理解你的合作伙伴吗?S在6矩阵中,循环位是第二行的第二位或第四位,所以这取决于哪个位置先来,然后循环位会帮助你重新投资,然后位置会改变。简单地说,在S在6矩阵中,以下六点可能来自你的上级,你的上级或上级的下属,或你的左朋友,或你的右朋友,或你的下属朋友,360度。
S6矩阵的第一排有两个位置,也就是说会给你的上级。然后,倒数四个位置中有三个位置,你得到了100%。其中一个是帮助你重置矩阵的圆形位置。所以在这里,很多合作伙伴不知道的是,第一排的两个位置必须给你的上级。答案是,这是你上级的第二排。也许是给你的上级,直接拿了100%。也许他是一个圆,然后重置整个点。S矩阵可享受全球公共行。
/* The transferFrom method is used for a withdraw workflow,
allowing contracts to transfer tokens on your behalf.
This can be used for example to allow a contract to transfer tokens on your behalf and/or to charge fees in sub-currencies.
The function SHOULD throw unless the _from account has deliberately authorized the sender of the message via some mechanism.
Note Transfers of 0 values MUST be treated as normal transfers and fire the Transfer event.*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(balances[_from] >= _value); // Check if the sender has enough token
require(balances[_to] + _value >= balances[_to]); // Check for overflows
require(_value <= allowed[_from][msg.sender]); // Check allowance
balances[_from] -= _value; // Subtract from the sender
balances[_to] += _value; // Add the same amount to the receiver
allowed[_from][msg.sender] -= _value;
emit Transfer(_from, _to, _value);
return true;
}
/* Allows _spender to withdraw from your account multiple times,
up to the _value amount. If this function is called again it overwrites the current allowance with _value.
NOTE: To prevent attack vectors like the one described here and discussed here,
clients SHOULD make sure to create user interfaces in such a way that they set the allowance first to 0 before setting it to another value for the same spender.
THOUGH The contract itself shouldn’t enforce it, to allow backwards compatibility with contracts deployed before */
function approve(address _spender, uint256 _value) public returns (bool success) {
require(balances[msg.sender] >= _value);
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
//Returns the amount which _spender is still allowed to withdraw from _owner.
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
return allowed[_owner][_spender];
}
//The event for tranfer and approve
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract DeFi is Token{
//声明owner,暂时没作用
address public owner ;
//声明 用户-抵押ETH数量 mapping
mapping (address => uint) pledgeETHAmount;
//声明 抵押/赎回时的event
event Pledge(address user, uint256 amount);
event Redeem(address user, uint256 amount);
//构造函数,只在合约被部署的时候执行一次
constructor() public {
owner = msg.sender ;
}
//抵押功能
function pledge() public payable returns(bool success){
//ETH抵押金额必须大于0
require(msg.value > 0, "Not enough ETH to pledge.");
//抵押操作
// 1. 1:1贷出ERC20 Token
Token.balances[msg.sender] += msg.value;
// 2. 写入抵押信息map,记录用户抵押ETH的数量:单位wei
pledgeETHAmount[msg.sender] += msg.value;
// 3. 更新Token总量
Token.totalSupply += msg.value;
//记录抵押事件
emit Pledge(msg.sender,msg.value);
return true;
}
//赎回功能
function redeem(uint256 value) public returns(bool success){
//要求赎回ETH的数量必须 <= Token余额
require(value <= Token.balances[msg.sender],"Not enough ETH to redeem.");
//赎回操作
// 1. 在合约转出ETH到用户地址之前将待发金额清零,更新用户Token余额和Token总量,来防止重入(re-entrancy)攻击
Token.balances[msg.sender] -= value;
Token.totalSupply -= value;
// 2. 从合约里转ETH到对应用户
msg.sender.transfer(value);
//记录赎回事件
emit Redeem(msg.sender,value);
return true;
}