6.2 Gamefi situation (MetaLine)

In the game Mateline, DeCredit provides two oracle services:

· Credit pledge: DeCredit provides off-chain credit ratings for on-chain players in the MetaLine game ecosystem. Players can reduce the pledge ratio and obtain certain gaming rewards.

· True random numbers: DeCredit VFR provides true random numbers for MetaLine.

MetaLine is a metaverse game with a medieval nautical theme as the background. The game has three systems of production, trade, and war. There are multiple ports in the game, where production and trade can be experienced, and a floating price system is added. The price level may vary between different ports and time. The game has a variety of ways to play, it’s gaming system is rich, players can freely customize their game plan according to their own time, investment amount and so on.

Credit pledge

The oracle architecture of MetaLine's access to DeCredit is similar to the credit oracle: including

• Oracle service

• Aggre Smart Contract

• Credit Adapter

The Oracle service the basic service that connects the player portrait and on-chain, and realize the mapping of the MetaLine player on-chain contract to the user portrait. Aggre Smart Contract provides players with an interface for calling credit services. Its function is to respond to user Oracle requests, reject and respond to applications according to rules. The Credit Adapter runs on the off-chain data adapter on the Oracle node, receives aggregated smart contract instructions, routes to the designated collaborative oracle sub-center network, obtains the user's asset status, and returns the result to Smart Contract through the Oracle network.

For a player, the oracle gives the player a credit score (ranging from 0 to 100), with 0 being the lowest rating and 100 being the highest. At the beginning, there are three levels, namely L0, L1, and L2.

Player credit scoring system (3 levels):

L0 :Scored P<75 (inclusive)

L1:Scored between 75 and 89

L2: Scored 89 and above (inclusive)

func (*UserSimpleReportService) TotalPointQualification (p float64) string {

var status string

if p <= 75 {

status = "L0"

}else if p > 75 && p < 89 {

status = "L1"

}else {

status = "L2"

}

return status

}

The oracle collects the user Bob, if it is a high-quality L2 user, it means that:

Production system: For production tasks, he/she can produce more goods by staking CDTC;

Trade System: Local sales consume less handling fee.

VFR True Randomness

DeCredit provides actual trusted random numbers for MetaLine, including:

• Random blind box opening chance

• Randomize how game items are placed, created, and distributed. For example, the rarity and quality level of each item can be determined in a completely random manner.

To create a fair MetaLine game, players want true randomness to generate unpredictability and fair distribution of items in the game to enhance the gaming experience. On-chain randomness needs considering the problem of avoiding central manipulation. For example, whether block hashes are exploited by blockchain miners, who can delay publishing transactions in blocks to achieve a more favorable outcome.

The DeCredit VRF scheme is that for randomness requests, DeCredit VRF will generate a random number and an encrypted proof of how the number is determined. Proofs are published and verified on-chain before being used by any consuming application. This process ensures that the results cannot be tampered with or manipulated by anyone, including oracle operators, miners, users, and even smart contract developers.

The contract have inherited three required functions of DeVRFConsumerBase:

requestRandomness, which makes an initial request for randomness.

fulfillRandomness, which is a function that receives and enforces verified randomness.

resposeRandomness, which is the random number result report

The contract needs to consume a small amount of CDTC and demands the player to have enough CDTC to pay the specified fee. Note that the following values must be configured correctly for VRF requests to work.

CDTC Token - CDTC token addresses on different chains

VRF Coordinator - Address of DeCredit VRF generator

Key Hash - Generate random public keys

Fee - The fee (in CDTC) required to complete the VRF request

最后更新于